summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2003-02-10 22:50:22 +0000
committerbala <balanatarajan@users.noreply.github.com>2003-02-10 22:50:22 +0000
commit05de7a46c1b7666c9a26beaae800c889dd1a964f (patch)
tree7b07f44a23e26608ea333abc0c5b3897a217cb3d
parente4aa50119950a8ed6eca19a866ff46a9d377e5ad (diff)
downloadATCD-05de7a46c1b7666c9a26beaae800c889dd1a964f.tar.gz
ChangeLogTag:Mon Feb 10 17:12:30 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
-rw-r--r--TAO/ChangeLog64
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/client.cpp8
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/server.cpp8
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/svc.conf2
-rw-r--r--TAO/tests/RTCORBA/Client_Propagated/client.cpp12
-rw-r--r--TAO/tests/RTCORBA/Client_Propagated/server.cpp11
-rw-r--r--TAO/tests/RTCORBA/Client_Propagated/svc.conf2
-rw-r--r--TAO/tests/RTCORBA/Collocation/Collocation.cpp8
-rw-r--r--TAO/tests/RTCORBA/Collocation/svc.conf2
-rw-r--r--TAO/tests/RTCORBA/Destroy_Thread_Pool/Destroy_Thread_Pool.cpp5
-rw-r--r--TAO/tests/RTCORBA/Destroy_Thread_Pool/svc.conf2
-rw-r--r--TAO/tests/RTCORBA/Explicit_Binding/client.cpp5
-rw-r--r--TAO/tests/RTCORBA/Explicit_Binding/server.cpp5
-rw-r--r--TAO/tests/RTCORBA/Explicit_Binding/svc.conf2
-rw-r--r--TAO/tests/RTCORBA/Linear_Priority/client.cpp7
-rw-r--r--TAO/tests/RTCORBA/Linear_Priority/server.cpp8
-rw-r--r--TAO/tests/RTCORBA/Linear_Priority/svc.conf2
-rw-r--r--TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp8
-rw-r--r--TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp8
-rw-r--r--TAO/tests/RTCORBA/MT_Client_Protocol_Priority/svc.conf2
-rw-r--r--TAO/tests/RTCORBA/ORB_init/ORB_init.cpp5
-rw-r--r--TAO/tests/RTCORBA/ORB_init/svc.conf2
-rw-r--r--TAO/tests/RTCORBA/Persistent_IOR/client.cpp5
-rw-r--r--TAO/tests/RTCORBA/Persistent_IOR/server.cpp5
-rw-r--r--TAO/tests/RTCORBA/Persistent_IOR/svc.conf2
-rw-r--r--TAO/tests/RTCORBA/Policies/svc.conf2
-rw-r--r--TAO/tests/RTCORBA/Policy_Combinations/client.cpp8
-rw-r--r--TAO/tests/RTCORBA/Policy_Combinations/server.cpp8
-rw-r--r--TAO/tests/RTCORBA/Policy_Combinations/svc.conf3
-rw-r--r--TAO/tests/RTCORBA/Private_Connection/client.cpp5
-rw-r--r--TAO/tests/RTCORBA/Private_Connection/server.cpp5
-rw-r--r--TAO/tests/RTCORBA/Private_Connection/svc.conf2
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/client.cpp8
-rw-r--r--TAO/tests/RTCORBA/Profile_And_Endpoint_Selection/server.cpp8
-rw-r--r--TAO/tests/RTCORBA/RTMutex/server.cpp5
-rw-r--r--TAO/tests/RTCORBA/RTMutex/svc.conf2
-rw-r--r--TAO/tests/RTCORBA/Server_Declared/client.cpp10
-rw-r--r--TAO/tests/RTCORBA/Server_Declared/server.cpp8
-rw-r--r--TAO/tests/RTCORBA/Server_Declared/svc.conf2
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/client.cpp5
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/server.cpp5
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/svc.conf2
-rw-r--r--TAO/tests/RTCORBA/Thread_Pool/client.cpp8
-rw-r--r--TAO/tests/RTCORBA/Thread_Pool/server.cpp8
-rw-r--r--TAO/tests/RTCORBA/Thread_Pool/svc.conf2
-rw-r--r--TAO/tests/RTCORBA/check_supported_priorities.cpp19
46 files changed, 238 insertions, 77 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 88562d30af3..be0421869f2 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,67 @@
+Mon Feb 10 17:12:30 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
+
+ * tests/RTCORBA/check_supported_priorities.cpp: Changed the
+ function to take in a ORB pointer. The function now queries the
+ ORB to get the scheduling policy in place before checking the
+ priority levels. Using SCHED_OTHER as it was done before doesnt
+ work well on Linux and it was broken.
+
+ * tests/RTCORBA/Banded_Connections/client.cpp:
+ * tests/RTCORBA/Banded_Connections/server.cpp:
+ * tests/RTCORBA/Client_Propagated/client.cpp:
+ * tests/RTCORBA/Client_Propagated/server.cpp:
+ * tests/RTCORBA/Collocation/Collocation.cpp:
+ * tests/RTCORBA/Destroy_Thread_Pool/Destroy_Thread_Pool.cpp:
+ * tests/RTCORBA/Explicit_Binding/client.cpp:
+ * tests/RTCORBA/Explicit_Binding/server.cpp:
+ * tests/RTCORBA/Linear_Priority/client.cpp:
+ * tests/RTCORBA/Linear_Priority/server.cpp:
+ * tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp:
+ * tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp:
+ * tests/RTCORBA/ORB_init/ORB_init.cpp:
+ * tests/RTCORBA/Persistent_IOR/client.cpp:
+ * tests/RTCORBA/Persistent_IOR/server.cpp:
+ * tests/RTCORBA/Policy_Combinations/client.cpp:
+ * tests/RTCORBA/Policy_Combinations/server.cpp:
+ * tests/RTCORBA/Private_Connection/client.cpp:
+ * tests/RTCORBA/Private_Connection/server.cpp:
+ * tests/RTCORBA/Profile_And_Endpoint_Selection/client.cpp:
+ * tests/RTCORBA/Profile_And_Endpoint_Selection/server.cpp:
+ * tests/RTCORBA/RTMutex/server.cpp:
+ * tests/RTCORBA/Server_Declared/client.cpp:
+ * tests/RTCORBA/Server_Declared/server.cpp:
+ * tests/RTCORBA/Server_Protocol/client.cpp:
+ * tests/RTCORBA/Server_Protocol/server.cpp:
+ * tests/RTCORBA/Thread_Pool/client.cpp:
+ * tests/RTCORBA/Thread_Pool/server.cpp: We now do a check on
+ supported priorities after the ORB is initialized.
+
+ * tests/RTCORBA/Banded_Connections/svc.conf:
+ * tests/RTCORBA/Explicit_Binding/svc.conf:
+ * tests/RTCORBA/Linear_Priority/svc.conf:
+ * tests/RTCORBA/Policy_Combinations/svc.conf: Added scheduling
+ policy to all the configurations.
+
+ * tests/RTCORBA/Client_Propagated/svc.conf:
+ * tests/RTCORBA/Collocation/svc.conf:
+ * tests/RTCORBA/Destroy_Thread_Pool/svc.conf:
+ * tests/RTCORBA/MT_Client_Protocol_Priority/svc.conf:
+ * tests/RTCORBA/ORB_init/svc.conf:
+ * tests/RTCORBA/Persistent_IOR/svc.conf:
+ * tests/RTCORBA/Policies/svc.conf:
+ * tests/RTCORBA/Private_Connection/svc.conf:
+ * tests/RTCORBA/RTMutex/svc.conf:
+ * tests/RTCORBA/Server_Declared/svc.conf:
+ * tests/RTCORBA/Server_Protocol/svc.conf:
+ * tests/RTCORBA/Thread_Pool/svc.conf: New files added with
+ scheduling information. This is not perfect for all cases, but a
+ good starting point for the bug reports that showed up about
+ RTCORBA on Linux.
+
+ We need to relook into stressing these tests after 1.3.1 using
+ multiple scheduling policies. We have very less time to within
+ the short timeframe available.
+
Mon Feb 10 19:28:43 2003 Johnny Willemsen <jwillemsen@remedy.nl>
* tests/Makefile.bor:
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);
- }
+ }
}