summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvzykov <vzykov@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-02-24 16:37:42 +0000
committervzykov <vzykov@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-02-24 16:37:42 +0000
commitdd349cbd69cf26fe6516eeb5761423f5947ba0ef (patch)
tree2dd8da761c40d32548c472997322599797b39e68
parentea5e5523b1bcd9c1548108aa999bb7da8688b5e6 (diff)
downloadATCD-dd349cbd69cf26fe6516eeb5761423f5947ba0ef.tar.gz
Wed Feb 24 16:29:51 UTC 2010 Vladimir Zykov <vladimir.zykov@prismtech.com>
* tests/Bug_3826_Regression/svc.conf: * tests/Bug_3826_Regression/run_test.pl: * tao/TAO_Internal.cpp: Extended the fix for bug#3826 and adjusted the test. Initial fix was not complete. If there is a svc.conf which is processed by ACE unconditionally then it's processed in a global gestalt even if -ORBGestalt LOCAL is provided. Current change must fix this behaviour.
-rw-r--r--TAO/ChangeLog15
-rw-r--r--TAO/tao/TAO_Internal.cpp25
-rwxr-xr-xTAO/tests/Bug_3826_Regression/run_test.pl13
-rw-r--r--TAO/tests/Bug_3826_Regression/svc.conf3
4 files changed, 49 insertions, 7 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 4570d408014..fe66a253ab1 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,12 +1,23 @@
+Wed Feb 24 16:29:51 UTC 2010 Vladimir Zykov <vladimir.zykov@prismtech.com>
+
+ * tests/Bug_3826_Regression/svc.conf:
+ * tests/Bug_3826_Regression/run_test.pl:
+ * tao/TAO_Internal.cpp:
+ Extended the fix for bug#3826 and adjusted the test. Initial fix
+ was not complete. If there is a svc.conf which is processed by
+ ACE unconditionally then it's processed in a global gestalt even
+ if -ORBGestalt LOCAL is provided. Current change must fix this
+ behaviour.
+
Tue Feb 23 18:55:21 UTC 2010 Yan Dai <dai_y@ociweb.com>
* bin/tao_orb_tests.lst:
Added Bug_3812_Regression as not fixed test.
-
+
* tests/Bug_3812_Regression/Bug_3812_Regression.cpp:
* tests/Bug_3812_Regression/mock_transport.h:
-
+
Fixed fuzz errors.
Tue Feb 23 10:35:39 UTC 2010 Vladimir Zykov <vladimir.zykov@prismtech.com>
diff --git a/TAO/tao/TAO_Internal.cpp b/TAO/tao/TAO_Internal.cpp
index a2e97b1fc33..af47b9385ea 100644
--- a/TAO/tao/TAO_Internal.cpp
+++ b/TAO/tao/TAO_Internal.cpp
@@ -30,6 +30,7 @@
#include "ace/ACE.h"
#include "ace/OS_NS_stdio.h"
#include "ace/Static_Object_Lock.h"
+#include "ace/OS_NS_sys_stat.h"
ACE_RCSID (tao,
TAO_Internal,
@@ -98,7 +99,8 @@ namespace
*/
bool
using_global_gestalt_i (int &argc,
- ACE_TCHAR **argv);
+ ACE_TCHAR **argv,
+ bool &skip_service_config_open);
/**
* Initialize the ACE Service Configurator with the process-global
@@ -287,8 +289,11 @@ TAO::ORB::open_global_services (int argc, ACE_TCHAR **argv)
true) == -1)
return -1;
+ bool skip_service_config_open = false; // by default we shouldn't
+
if (using_global_gestalt_i (tmpargc,
- tmpargv))
+ tmpargv,
+ skip_service_config_open))
{
if (parse_svcconf_args_i (tmpargc,
tmpargv,
@@ -296,8 +301,6 @@ TAO::ORB::open_global_services (int argc, ACE_TCHAR **argv)
return -1;
}
- bool skip_service_config_open = false; // by default we shouldn't
-
if (parse_private_args_i (tmpargc,
tmpargv,
global_svc_config_argv,
@@ -956,7 +959,8 @@ namespace
bool
using_global_gestalt_i (int &argc,
- ACE_TCHAR **argv)
+ ACE_TCHAR **argv,
+ bool &skip_service_config_open)
{
bool with_global_gestalt = true;
@@ -976,6 +980,17 @@ namespace
ACE_OS::strcasecmp (current_arg, ACE_TEXT("GLOBAL")) != 0)
{
with_global_gestalt = false;
+
+ ACE_stat exists;
+ if (ACE_OS::stat (ACE_DEFAULT_SVC_CONF, &exists) == 0)
+ {
+ // In case svc.conf exists and we are asked for a local
+ // gestalt then no matter whether -ORBSvcConf or
+ // -ORBSvcConfDirective are provided or not we ignore them
+ // while setting up a global gestalt. They will be
+ // processed later in a local gestalt.
+ skip_service_config_open = true;
+ }
}
// Skip anything that goes after -ORBGestalt.
diff --git a/TAO/tests/Bug_3826_Regression/run_test.pl b/TAO/tests/Bug_3826_Regression/run_test.pl
index f203124b39e..85ad6831f4d 100755
--- a/TAO/tests/Bug_3826_Regression/run_test.pl
+++ b/TAO/tests/Bug_3826_Regression/run_test.pl
@@ -35,6 +35,19 @@ if ($server_status != 0) {
exit 1;
}
+print STDOUT "Testing with default svc.conf\n";
+
+$SV = $server->CreateProcess ("server",
+ "-a \"AAA -ORBdebuglevel $debug_level -ORBGestalt LOCAL\" " .
+ "-b \"BBB\"");
+
+$server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval());
+
+if ($server_status != 0) {
+ print STDERR "ERROR: server returned $server_status\n";
+ exit 1;
+}
+
print STDOUT "Testing with -ORBSvcConfDirective\n";
$SV = $server->CreateProcess ("server",
diff --git a/TAO/tests/Bug_3826_Regression/svc.conf b/TAO/tests/Bug_3826_Regression/svc.conf
new file mode 100644
index 00000000000..7288e7d425b
--- /dev/null
+++ b/TAO/tests/Bug_3826_Regression/svc.conf
@@ -0,0 +1,3 @@
+# $Id$
+
+static Resource_Factory "-ORBConnectionCacheMax 1"