diff options
Diffstat (limited to 'TAO/tests')
45 files changed, 174 insertions, 77 deletions
diff --git a/TAO/tests/RTCORBA/Banded_Connections/client.cpp b/TAO/tests/RTCORBA/Banded_Connections/client.cpp index badd76f3043..d772f9652a6 100644 --- a/TAO/tests/RTCORBA/Banded_Connections/client.cpp +++ b/TAO/tests/RTCORBA/Banded_Connections/client.cpp @@ -104,10 +104,6 @@ invocation_exception_test (Test_ptr obj, int main (int argc, char *argv[]) { - // Make sure we can support multiple priorities that are required - // for this test. - check_supported_priorities (); - ACE_TRY_NEW_ENV { // Initialize ORB. @@ -125,6 +121,10 @@ main (int argc, char *argv[]) if (result != 0) return result; + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in ()); + // Get the RTORB. CORBA::Object_var object = orb->resolve_initial_references ("RTORB" diff --git a/TAO/tests/RTCORBA/Banded_Connections/server.cpp b/TAO/tests/RTCORBA/Banded_Connections/server.cpp index ea801e29409..42a062ebb7d 100644 --- a/TAO/tests/RTCORBA/Banded_Connections/server.cpp +++ b/TAO/tests/RTCORBA/Banded_Connections/server.cpp @@ -346,10 +346,6 @@ poa_creation_exception_test (PortableServer::POA_ptr root_poa, int main (int argc, char *argv[]) { - // Make sure we can support multiple priorities that are required - // for this test. - check_supported_priorities (); - ACE_TRY_NEW_ENV { // Initialize ORB. @@ -367,6 +363,10 @@ main (int argc, char *argv[]) if (result != 0) return result; + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); + // Get the RTORB. CORBA::Object_var object = orb->resolve_initial_references ("RTORB" diff --git a/TAO/tests/RTCORBA/Banded_Connections/svc.conf b/TAO/tests/RTCORBA/Banded_Connections/svc.conf new file mode 100644 index 00000000000..37973382e2c --- /dev/null +++ b/TAO/tests/RTCORBA/Banded_Connections/svc.conf @@ -0,0 +1,2 @@ +# Regular test +static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO" diff --git a/TAO/tests/RTCORBA/Client_Propagated/client.cpp b/TAO/tests/RTCORBA/Client_Propagated/client.cpp index 9d893ebf504..d4ee23f0a5d 100644 --- a/TAO/tests/RTCORBA/Client_Propagated/client.cpp +++ b/TAO/tests/RTCORBA/Client_Propagated/client.cpp @@ -37,10 +37,6 @@ parse_args (int argc, char *argv[]) int main (int argc, char *argv[]) { - // Make sure we can support multiple priorities that are required - // for this test. - check_supported_priorities (); - ACE_TRY_NEW_ENV { // Register the interceptors to check for the RTCORBA @@ -65,6 +61,10 @@ main (int argc, char *argv[]) if (parse_args (argc, argv) != 0) return 1; + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); + CORBA::Object_var object = orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -128,9 +128,9 @@ main (int argc, char *argv[]) mapping_manager->mapping (); int max_priority = - ACE_Sched_Params::priority_max (ACE_SCHED_OTHER); + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO); int min_priority = - ACE_Sched_Params::priority_min (ACE_SCHED_OTHER); + ACE_Sched_Params::priority_min (ACE_SCHED_FIFO); CORBA::Short native_priority = (max_priority + min_priority) / 2; diff --git a/TAO/tests/RTCORBA/Client_Propagated/server.cpp b/TAO/tests/RTCORBA/Client_Propagated/server.cpp index a22a3155703..74cf16df245 100644 --- a/TAO/tests/RTCORBA/Client_Propagated/server.cpp +++ b/TAO/tests/RTCORBA/Client_Propagated/server.cpp @@ -109,10 +109,6 @@ parse_args (int argc, char *argv[]) int main (int argc, char *argv[]) { - // Make sure we can support multiple priorities that are required - // for this test. - check_supported_priorities (); - ACE_TRY_NEW_ENV { // Standard initialization: @@ -125,6 +121,10 @@ main (int argc, char *argv[]) if (parse_args (argc, argv) != 0) return 1; + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); + CORBA::Object_var object = orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; @@ -171,7 +171,7 @@ main (int argc, char *argv[]) poa_policy_list ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + Test_i server_impl (orb.in ()); PortableServer::ObjectId_var id = @@ -243,3 +243,4 @@ main (int argc, char *argv[]) return 0; } + diff --git a/TAO/tests/RTCORBA/Client_Propagated/svc.conf b/TAO/tests/RTCORBA/Client_Propagated/svc.conf new file mode 100644 index 00000000000..37973382e2c --- /dev/null +++ b/TAO/tests/RTCORBA/Client_Propagated/svc.conf @@ -0,0 +1,2 @@ +# Regular test +static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO" diff --git a/TAO/tests/RTCORBA/Collocation/Collocation.cpp b/TAO/tests/RTCORBA/Collocation/Collocation.cpp index 847a96ffc6c..7e76ae823f0 100644 --- a/TAO/tests/RTCORBA/Collocation/Collocation.cpp +++ b/TAO/tests/RTCORBA/Collocation/Collocation.cpp @@ -425,6 +425,10 @@ Server::Server (int argc, ACE_ENV_ARG_PARAMETER); ACE_CHECK; + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (this->orb_.in ()); + CORBA::Object_var object = this->orb_->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER); @@ -850,10 +854,6 @@ Server::shutdown (ACE_ENV_SINGLE_ARG_DECL) int main (int argc, char *argv[]) { - // Make sure we can support multiple priorities that are required - // for this test. - check_supported_priorities (); - ACE_TRY_NEW_ENV { Server server (argc, diff --git a/TAO/tests/RTCORBA/Collocation/svc.conf b/TAO/tests/RTCORBA/Collocation/svc.conf new file mode 100644 index 00000000000..37973382e2c --- /dev/null +++ b/TAO/tests/RTCORBA/Collocation/svc.conf @@ -0,0 +1,2 @@ +# Regular test +static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO" diff --git a/TAO/tests/RTCORBA/Destroy_Thread_Pool/Destroy_Thread_Pool.cpp b/TAO/tests/RTCORBA/Destroy_Thread_Pool/Destroy_Thread_Pool.cpp index 10fb0be1150..338137917d7 100644 --- a/TAO/tests/RTCORBA/Destroy_Thread_Pool/Destroy_Thread_Pool.cpp +++ b/TAO/tests/RTCORBA/Destroy_Thread_Pool/Destroy_Thread_Pool.cpp @@ -3,6 +3,7 @@ #include "ace/Get_Opt.h" #include "tao/corba.h" #include "tao/RTCORBA/RTCORBA.h" +#include "../check_supported_priorities.cpp" ACE_RCSID(Destroy_Thread_Pools, Destroy_Thread_Pools, "$Id$") @@ -99,6 +100,10 @@ main (int argc, char *argv[]) "" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; + + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); CORBA::Object_var object = orb->resolve_initial_references ("RTORB" diff --git a/TAO/tests/RTCORBA/Destroy_Thread_Pool/svc.conf b/TAO/tests/RTCORBA/Destroy_Thread_Pool/svc.conf new file mode 100644 index 00000000000..37973382e2c --- /dev/null +++ b/TAO/tests/RTCORBA/Destroy_Thread_Pool/svc.conf @@ -0,0 +1,2 @@ +# Regular test +static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO" diff --git a/TAO/tests/RTCORBA/Explicit_Binding/client.cpp b/TAO/tests/RTCORBA/Explicit_Binding/client.cpp index ee6196753fe..6afe1ccee94 100644 --- a/TAO/tests/RTCORBA/Explicit_Binding/client.cpp +++ b/TAO/tests/RTCORBA/Explicit_Binding/client.cpp @@ -5,6 +5,7 @@ #include "tao/Strategies/advanced_resource.h" #include "tao/RTCORBA/RTCORBA.h" +#include "../check_supported_priorities.cpp" const char *ior = "file://test.ior"; @@ -61,6 +62,10 @@ main (int argc, char *argv[]) if (parse_args (argc, argv) != 0) return 1; + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); + // RTORB. CORBA::Object_var object = orb->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER); diff --git a/TAO/tests/RTCORBA/Explicit_Binding/server.cpp b/TAO/tests/RTCORBA/Explicit_Binding/server.cpp index ba4d598df0d..6147761533c 100644 --- a/TAO/tests/RTCORBA/Explicit_Binding/server.cpp +++ b/TAO/tests/RTCORBA/Explicit_Binding/server.cpp @@ -6,6 +6,7 @@ #include "tao/Strategies/advanced_resource.h" #include "tao/RTCORBA/RTCORBA.h" #include "tao/RTPortableServer/RTPortableServer.h" +#include "../check_supported_priorities.cpp" class Test_i : public POA_Test { @@ -145,6 +146,10 @@ main (int argc, char *argv[]) // Parse arguments. if (parse_args (argc, argv) != 0) return 1; + + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); // RootPOA. CORBA::Object_var object = diff --git a/TAO/tests/RTCORBA/Explicit_Binding/svc.conf b/TAO/tests/RTCORBA/Explicit_Binding/svc.conf index 3dec1aece65..75b59c6d97a 100644 --- a/TAO/tests/RTCORBA/Explicit_Binding/svc.conf +++ b/TAO/tests/RTCORBA/Explicit_Binding/svc.conf @@ -2,3 +2,5 @@ # $Id$ # static SHMIOP_Factory "-MMAPFilePrefix server_shmiop" + +static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO"
\ No newline at end of file diff --git a/TAO/tests/RTCORBA/Linear_Priority/client.cpp b/TAO/tests/RTCORBA/Linear_Priority/client.cpp index f5e49dde321..a16684a7d4c 100644 --- a/TAO/tests/RTCORBA/Linear_Priority/client.cpp +++ b/TAO/tests/RTCORBA/Linear_Priority/client.cpp @@ -162,9 +162,6 @@ Worker_Thread::svc (void) int main (int argc, char **argv) { - // Make sure we can support multiple priorities that are required - // for this test. - check_supported_priorities (); ACE_TRY_NEW_ENV { @@ -179,6 +176,10 @@ main (int argc, char **argv) parse_args (argc, argv); if (result != 0) return result; + + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in ()); CORBA::Object_var object = orb->resolve_initial_references ("RTORB" diff --git a/TAO/tests/RTCORBA/Linear_Priority/server.cpp b/TAO/tests/RTCORBA/Linear_Priority/server.cpp index 4e443f13252..4b6aa5268bf 100644 --- a/TAO/tests/RTCORBA/Linear_Priority/server.cpp +++ b/TAO/tests/RTCORBA/Linear_Priority/server.cpp @@ -141,10 +141,6 @@ write_iors_to_file (CORBA::Object_ptr object, int main (int argc, char **argv) { - // Make sure we can support multiple priorities that are required - // for this test. - check_supported_priorities (); - ACE_TRY_NEW_ENV { CORBA::ORB_var orb = @@ -154,6 +150,10 @@ main (int argc, char **argv) ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in ()); + CORBA::Object_var object = orb->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER); diff --git a/TAO/tests/RTCORBA/Linear_Priority/svc.conf b/TAO/tests/RTCORBA/Linear_Priority/svc.conf index 7e4bf9ae870..0d4878fae68 100644 --- a/TAO/tests/RTCORBA/Linear_Priority/svc.conf +++ b/TAO/tests/RTCORBA/Linear_Priority/svc.conf @@ -1,5 +1,5 @@ # Regular test -static RT_ORB_Loader "-ORBPriorityMapping linear" +static RT_ORB_Loader "-ORBPriorityMapping linear -ORBSchedPolicy SCHED_RR" # For testing of RT threads # static RT_ORB_Loader "-ORBPriorityMapping linear -ORBSchedPolicy SCHED_RR -ORBScopePolicy SYSTEM" diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp index 29d46e55c91..055cbc5fb7f 100644 --- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp +++ b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp @@ -141,10 +141,6 @@ check_for_nil (CORBA::Object_ptr obj, const char *msg) int main (int argc, char *argv[]) { - // Make sure we can support multiple priorities that are required - // for this test. - check_supported_priorities (); - ACE_TRY_NEW_ENV { // Initialize the ORB, resolve references and parse arguments. @@ -157,6 +153,10 @@ main (int argc, char *argv[]) // Parse arguments. if (parse_args (argc, argv) != 0) return 1; + + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); // Priority Mapping Manager. CORBA::Object_var object = diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp index 7326bf6d5fe..39fd715b0f7 100644 --- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp +++ b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp @@ -92,10 +92,6 @@ check_for_nil (CORBA::Object_ptr obj, const char *msg) int main (int argc, char *argv[]) { - // Make sure we can support multiple priorities that are required - // for this test. - check_supported_priorities (); - ACE_TRY_NEW_ENV { // ORB. @@ -107,6 +103,10 @@ main (int argc, char *argv[]) if (parse_args (argc, argv) != 0) return 1; + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); + // RTORB. CORBA::Object_var object = orb->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER); diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/svc.conf b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/svc.conf new file mode 100644 index 00000000000..37973382e2c --- /dev/null +++ b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/svc.conf @@ -0,0 +1,2 @@ +# Regular test +static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO" diff --git a/TAO/tests/RTCORBA/ORB_init/ORB_init.cpp b/TAO/tests/RTCORBA/ORB_init/ORB_init.cpp index a401b67193f..8dcd0109718 100644 --- a/TAO/tests/RTCORBA/ORB_init/ORB_init.cpp +++ b/TAO/tests/RTCORBA/ORB_init/ORB_init.cpp @@ -3,6 +3,7 @@ #include "tao/corba.h" #include "tao/RTCORBA/RTCORBA.h" #include "ace/Get_Opt.h" +#include "../check_supported_priorities.cpp" int test_multiple_orbs (const char *test_name, @@ -34,6 +35,10 @@ test_multiple_orbs (const char *test_name, ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orbs[i].in()); + if (rt_orb) { CORBA::Object_var object = diff --git a/TAO/tests/RTCORBA/ORB_init/svc.conf b/TAO/tests/RTCORBA/ORB_init/svc.conf new file mode 100644 index 00000000000..37973382e2c --- /dev/null +++ b/TAO/tests/RTCORBA/ORB_init/svc.conf @@ -0,0 +1,2 @@ +# Regular test +static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO" diff --git a/TAO/tests/RTCORBA/Persistent_IOR/client.cpp b/TAO/tests/RTCORBA/Persistent_IOR/client.cpp index 9fc50f20a4b..d99f3548e2b 100644 --- a/TAO/tests/RTCORBA/Persistent_IOR/client.cpp +++ b/TAO/tests/RTCORBA/Persistent_IOR/client.cpp @@ -2,6 +2,7 @@ #include "ace/Get_Opt.h" #include "testC.h" +#include "../check_supported_priorities.cpp" static int iterations = 5; static int shutdown_server = 0; @@ -65,6 +66,10 @@ main (int argc, char **argv) parse_args (argc, argv); if (result != 0) return result; + + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); CORBA::Object_var object = orb->string_to_object (ior diff --git a/TAO/tests/RTCORBA/Persistent_IOR/server.cpp b/TAO/tests/RTCORBA/Persistent_IOR/server.cpp index 8b4269ac9e7..927310ca868 100644 --- a/TAO/tests/RTCORBA/Persistent_IOR/server.cpp +++ b/TAO/tests/RTCORBA/Persistent_IOR/server.cpp @@ -3,6 +3,7 @@ #include "ace/Get_Opt.h" #include "testS.h" #include "tao/RTPortableServer/RTPortableServer.h" +#include "../check_supported_priorities.cpp" class test_i : public POA_test, @@ -339,6 +340,10 @@ main (int argc, char **argv) parse_args (argc, argv); if (result != 0) return result; + + // Make sure we can support multiple priorities that are required + // for this test. + //check_supported_priorities (orb.in()); CORBA::Object_var object = orb->resolve_initial_references ("RTORB" diff --git a/TAO/tests/RTCORBA/Persistent_IOR/svc.conf b/TAO/tests/RTCORBA/Persistent_IOR/svc.conf new file mode 100644 index 00000000000..37973382e2c --- /dev/null +++ b/TAO/tests/RTCORBA/Persistent_IOR/svc.conf @@ -0,0 +1,2 @@ +# Regular test +static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO" diff --git a/TAO/tests/RTCORBA/Policies/svc.conf b/TAO/tests/RTCORBA/Policies/svc.conf new file mode 100644 index 00000000000..37973382e2c --- /dev/null +++ b/TAO/tests/RTCORBA/Policies/svc.conf @@ -0,0 +1,2 @@ +# Regular test +static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO" diff --git a/TAO/tests/RTCORBA/Policy_Combinations/client.cpp b/TAO/tests/RTCORBA/Policy_Combinations/client.cpp index 665b75c0b4e..9048662ae0b 100644 --- a/TAO/tests/RTCORBA/Policy_Combinations/client.cpp +++ b/TAO/tests/RTCORBA/Policy_Combinations/client.cpp @@ -55,10 +55,6 @@ parse_args (int argc, char **argv) int main (int argc, char **argv) { - // Make sure we can support multiple priorities that are required - // for this test. - check_supported_priorities (); - ACE_TRY_NEW_ENV { CORBA::ORB_var orb = @@ -73,6 +69,10 @@ main (int argc, char **argv) if (result != 0) return result; + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); + // 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 diff --git a/TAO/tests/RTCORBA/Policy_Combinations/server.cpp b/TAO/tests/RTCORBA/Policy_Combinations/server.cpp index 52122ce985c..b27d0567f4b 100644 --- a/TAO/tests/RTCORBA/Policy_Combinations/server.cpp +++ b/TAO/tests/RTCORBA/Policy_Combinations/server.cpp @@ -754,10 +754,6 @@ server::test_lanes_bands_server_declared_poa (ACE_ENV_SINGLE_ARG_DECL) int main (int argc, char **argv) { - // Make sure we can support multiple priorities that are required - // for this test. - check_supported_priorities (); - ACE_TRY_NEW_ENV { CORBA::ORB_var orb = @@ -767,6 +763,10 @@ main (int argc, char **argv) ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); + CORBA::Object_var object = orb->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER); diff --git a/TAO/tests/RTCORBA/Policy_Combinations/svc.conf b/TAO/tests/RTCORBA/Policy_Combinations/svc.conf index 7b06f1319bb..2f674555d9f 100644 --- a/TAO/tests/RTCORBA/Policy_Combinations/svc.conf +++ b/TAO/tests/RTCORBA/Policy_Combinations/svc.conf @@ -1 +1,2 @@ -static RT_ORB_Loader "-ORBPriorityMapping continuous" +static RT_ORB_Loader "-ORBPriorityMapping continuous -ORBSchedPolicy SCHED_FIFO" + diff --git a/TAO/tests/RTCORBA/Private_Connection/client.cpp b/TAO/tests/RTCORBA/Private_Connection/client.cpp index 0815c6c4973..afd2254d188 100644 --- a/TAO/tests/RTCORBA/Private_Connection/client.cpp +++ b/TAO/tests/RTCORBA/Private_Connection/client.cpp @@ -3,6 +3,7 @@ #include "testC.h" #include "tao/RTCORBA/RTCORBA.h" #include "ace/Get_Opt.h" +#include "../check_supported_priorities.cpp" const char *ior1 = "file://test1.ior"; const char *ior2 = "file://test2.ior"; @@ -63,6 +64,10 @@ main (int argc, char *argv[]) // Parse arguments. if (parse_args (argc, argv) != 0) return 1; + + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); // RTORB. CORBA::Object_var object = diff --git a/TAO/tests/RTCORBA/Private_Connection/server.cpp b/TAO/tests/RTCORBA/Private_Connection/server.cpp index 792bd559cbf..580fb8a361c 100644 --- a/TAO/tests/RTCORBA/Private_Connection/server.cpp +++ b/TAO/tests/RTCORBA/Private_Connection/server.cpp @@ -4,6 +4,7 @@ #include "tao/RTCORBA/RTCORBA.h" #include "tao/RTPortableServer/RTPortableServer.h" #include "ace/Get_Opt.h" +#include "../check_supported_priorities.cpp" class Test_i : public POA_Test { @@ -149,6 +150,10 @@ main (int argc, char *argv[]) // Parse arguments. if (parse_args (argc, argv) != 0) return 1; + + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); // RootPOA. CORBA::Object_var object = diff --git a/TAO/tests/RTCORBA/Private_Connection/svc.conf b/TAO/tests/RTCORBA/Private_Connection/svc.conf new file mode 100644 index 00000000000..37973382e2c --- /dev/null +++ b/TAO/tests/RTCORBA/Private_Connection/svc.conf @@ -0,0 +1,2 @@ +# Regular test +static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO" diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/client.cpp b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/client.cpp index 85bc57cf0cd..07621823453 100644 --- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/client.cpp +++ b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/client.cpp @@ -396,10 +396,6 @@ Client::reset_policies (ACE_ENV_SINGLE_ARG_DECL) int main (int argc, char **argv) { - // Make sure we can support multiple priorities that are required - // for this test. - check_supported_priorities (); - ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY @@ -415,6 +411,10 @@ main (int argc, char **argv) orb->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; + + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); RTCORBA::RTORB_var rt_orb = RTCORBA::RTORB::_narrow (object.in () diff --git a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/server.cpp b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/server.cpp index c9f7ba2365e..37b0eea457f 100644 --- a/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/server.cpp +++ b/TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/server.cpp @@ -312,10 +312,6 @@ rt_poa (CORBA::ORB_ptr orb, int main (int argc, char **argv) { - // Make sure we can support multiple priorities that are required - // for this test. - check_supported_priorities (); - ACE_TRY_NEW_ENV { CORBA::ORB_var orb = @@ -324,6 +320,10 @@ main (int argc, char **argv) 0 ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; + + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); CORBA::Object_var object = orb->resolve_initial_references ("RTORB" diff --git a/TAO/tests/RTCORBA/RTMutex/server.cpp b/TAO/tests/RTCORBA/RTMutex/server.cpp index 70c129f16ad..06d416283e1 100644 --- a/TAO/tests/RTCORBA/RTMutex/server.cpp +++ b/TAO/tests/RTCORBA/RTMutex/server.cpp @@ -5,6 +5,7 @@ #include "ace/Thread_Manager.h" #include "ace/High_Res_Timer.h" #include "ace/Get_Opt.h" +#include "../check_supported_priorities.cpp" static int test_try_lock_flag = #if defined (ACE_HAS_MUTEX_TIMEOUTS) && !defined (ACE_HAS_WTHREADS) @@ -512,6 +513,10 @@ main (int argc, char *argv[]) // Parse arguments. if (parse_args (argc, argv) != 0) return 1; + + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); // RTORB. CORBA::Object_var object = diff --git a/TAO/tests/RTCORBA/RTMutex/svc.conf b/TAO/tests/RTCORBA/RTMutex/svc.conf new file mode 100644 index 00000000000..37973382e2c --- /dev/null +++ b/TAO/tests/RTCORBA/RTMutex/svc.conf @@ -0,0 +1,2 @@ +# Regular test +static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO" diff --git a/TAO/tests/RTCORBA/Server_Declared/client.cpp b/TAO/tests/RTCORBA/Server_Declared/client.cpp index 3d5583a0f41..5e6be15a68e 100644 --- a/TAO/tests/RTCORBA/Server_Declared/client.cpp +++ b/TAO/tests/RTCORBA/Server_Declared/client.cpp @@ -80,10 +80,6 @@ check_policy (Test_ptr server int main (int argc, char *argv[]) { - // Make sure we can support multiple priorities that are required - // for this test. - check_supported_priorities (); - ACE_TRY_NEW_ENV { // Initialize the ORB, resolve references and parse arguments. @@ -97,7 +93,11 @@ main (int argc, char *argv[]) if (parse_args (argc, argv) != 0) return 1; - // Test object 1. + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); + + // Test object 1. CORBA::Object_var object = orb->string_to_object (ior1 ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; diff --git a/TAO/tests/RTCORBA/Server_Declared/server.cpp b/TAO/tests/RTCORBA/Server_Declared/server.cpp index 4091d002eb5..78322d043b9 100644 --- a/TAO/tests/RTCORBA/Server_Declared/server.cpp +++ b/TAO/tests/RTCORBA/Server_Declared/server.cpp @@ -205,10 +205,6 @@ create_object (RTPortableServer::POA_ptr poa, int main (int argc, char *argv[]) { - // Make sure we can support multiple priorities that are required - // for this test. - check_supported_priorities (); - ACE_TRY_NEW_ENV { // ORB. @@ -220,6 +216,10 @@ main (int argc, char *argv[]) if (parse_args (argc, argv) != 0) return 1; + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); + // RTORB. CORBA::Object_var object = orb->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER); diff --git a/TAO/tests/RTCORBA/Server_Declared/svc.conf b/TAO/tests/RTCORBA/Server_Declared/svc.conf new file mode 100644 index 00000000000..37973382e2c --- /dev/null +++ b/TAO/tests/RTCORBA/Server_Declared/svc.conf @@ -0,0 +1,2 @@ +# Regular test +static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO" diff --git a/TAO/tests/RTCORBA/Server_Protocol/client.cpp b/TAO/tests/RTCORBA/Server_Protocol/client.cpp index 2d8a3340175..03ca0cf6bd2 100644 --- a/TAO/tests/RTCORBA/Server_Protocol/client.cpp +++ b/TAO/tests/RTCORBA/Server_Protocol/client.cpp @@ -4,6 +4,7 @@ #include "ace/Get_Opt.h" #include "tao/RTCORBA/RTCORBA.h" #include "tao/Strategies/advanced_resource.h" +#include "../check_supported_priorities.cpp" const char *ior = "file://test.ior"; @@ -44,6 +45,10 @@ main (int argc, char *argv[]) if (parse_args (argc, argv) != 0) return 1; + + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); CORBA::Object_var object = orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); diff --git a/TAO/tests/RTCORBA/Server_Protocol/server.cpp b/TAO/tests/RTCORBA/Server_Protocol/server.cpp index feee0fb030c..94066b34410 100644 --- a/TAO/tests/RTCORBA/Server_Protocol/server.cpp +++ b/TAO/tests/RTCORBA/Server_Protocol/server.cpp @@ -6,6 +6,7 @@ #include "tao/RTCORBA/RT_Policy_i.h" #include "tao/RTPortableServer/RTPortableServer.h" #include "tao/Strategies/advanced_resource.h" +#include "../check_supported_priorities.cpp" class Test_i : public POA_Test { @@ -174,6 +175,10 @@ main (int argc, char *argv[]) if (parse_args (argc, argv) != 0) return 1; + + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); CORBA::Object_var object = orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER); diff --git a/TAO/tests/RTCORBA/Server_Protocol/svc.conf b/TAO/tests/RTCORBA/Server_Protocol/svc.conf new file mode 100644 index 00000000000..37973382e2c --- /dev/null +++ b/TAO/tests/RTCORBA/Server_Protocol/svc.conf @@ -0,0 +1,2 @@ +# Regular test +static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO" diff --git a/TAO/tests/RTCORBA/Thread_Pool/client.cpp b/TAO/tests/RTCORBA/Thread_Pool/client.cpp index c2623195e68..4036a75c1a2 100644 --- a/TAO/tests/RTCORBA/Thread_Pool/client.cpp +++ b/TAO/tests/RTCORBA/Thread_Pool/client.cpp @@ -51,10 +51,6 @@ parse_args (int argc, char *argv[]) int main (int argc, char *argv[]) { - // Make sure we can support multiple priorities that are required - // for this test. - check_supported_priorities (); - ACE_TRY_NEW_ENV { CORBA::ORB_var orb = @@ -65,6 +61,10 @@ main (int argc, char *argv[]) parse_args (argc, argv); if (result != 0) return result; + + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); CORBA::Object_var object = orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); diff --git a/TAO/tests/RTCORBA/Thread_Pool/server.cpp b/TAO/tests/RTCORBA/Thread_Pool/server.cpp index 63b1ea466d3..814b9fdb2d8 100644 --- a/TAO/tests/RTCORBA/Thread_Pool/server.cpp +++ b/TAO/tests/RTCORBA/Thread_Pool/server.cpp @@ -161,10 +161,6 @@ create_POA_and_register_servant (CORBA::Policy_ptr threadpool_policy, int main (int argc, char *argv[]) { - // Make sure we can support multiple priorities that are required - // for this test. - check_supported_priorities (); - ACE_TRY_NEW_ENV { CORBA::ORB_var orb = @@ -174,6 +170,10 @@ main (int argc, char *argv[]) ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; + // Make sure we can support multiple priorities that are required + // for this test. + check_supported_priorities (orb.in()); + CORBA::Object_var object = orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); diff --git a/TAO/tests/RTCORBA/Thread_Pool/svc.conf b/TAO/tests/RTCORBA/Thread_Pool/svc.conf new file mode 100644 index 00000000000..37973382e2c --- /dev/null +++ b/TAO/tests/RTCORBA/Thread_Pool/svc.conf @@ -0,0 +1,2 @@ +# Regular test +static RT_ORB_Loader "-ORBSchedPolicy SCHED_FIFO" diff --git a/TAO/tests/RTCORBA/check_supported_priorities.cpp b/TAO/tests/RTCORBA/check_supported_priorities.cpp index b7e36f98ebb..808bc1b84bc 100644 --- a/TAO/tests/RTCORBA/check_supported_priorities.cpp +++ b/TAO/tests/RTCORBA/check_supported_priorities.cpp @@ -1,16 +1,27 @@ // $Id$ #include "ace/Sched_Params.h" +#include "tao/ORB_Core.h" void -check_supported_priorities (void) +check_supported_priorities (CORBA::ORB_ptr orb) { + long current_policy = + orb->orb_core ()->orb_params ()->sched_policy (); + + // Conversion. + int sched_policy = ACE_SCHED_OTHER; + if (current_policy == THR_SCHED_FIFO) + sched_policy = ACE_SCHED_FIFO; + else if (current_policy == THR_SCHED_RR) + sched_policy = ACE_SCHED_RR; + // 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 (ACE_SCHED_OTHER); + ACE_Sched_Params::priority_max (sched_policy); int min_priority = - ACE_Sched_Params::priority_min (ACE_SCHED_OTHER); + ACE_Sched_Params::priority_min (sched_policy); if (max_priority == min_priority) { @@ -18,5 +29,5 @@ check_supported_priorities (void) "Not enough priority levels on this platform" " to run the test, aborting\n")); ACE_OS::exit (2); - } + } } |