summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Mitz <mitza-oci@users.noreply.github.com>2009-06-08 22:26:21 +0000
committerAdam Mitz <mitza-oci@users.noreply.github.com>2009-06-08 22:26:21 +0000
commit32d3b30108f9ee2993abf59fc0626f76ab16e2af (patch)
treeb59556c535baecfba0c0e574133fbf83db716f82
parentf21433c8b8ac84f42eae22fb4b7e46b03f80d620 (diff)
downloadATCD-32d3b30108f9ee2993abf59fc0626f76ab16e2af.tar.gz
ChangeLogTag: Mon Jun 8 22:25:23 UTC 2009 Adam Mitz <mitza@ociweb.com>
-rw-r--r--TAO/ChangeLog11
-rw-r--r--TAO/bin/tao_orb_tests.lst1
-rw-r--r--TAO/tests/Bug_3695_Regression/Bug_3695.cpp77
-rw-r--r--TAO/tests/Bug_3695_Regression/Bug_3695_Regression.mpc4
-rwxr-xr-xTAO/tests/Bug_3695_Regression/run_test.pl26
5 files changed, 119 insertions, 0 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 2136f022239..5523e6c1723 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,14 @@
+Mon Jun 8 22:25:23 UTC 2009 Adam Mitz <mitza@ociweb.com>
+
+ * bin/tao_orb_tests.lst:
+ * tests/Bug_3695_Regression:
+ * tests/Bug_3695_Regression/Bug_3695.cpp:
+ * tests/Bug_3695_Regression/Bug_3695_Regression.mpc:
+ * tests/Bug_3695_Regression/run_test.pl:
+
+ Added a new test, this will fail until the patch is committed
+ tomorrow (see bugzilla).
+
Mon Jun 8 19:42:36 UTC 2009 Adam Mitz <mitza@ociweb.com>
* bin/tao_orb_tests.lst:
diff --git a/TAO/bin/tao_orb_tests.lst b/TAO/bin/tao_orb_tests.lst
index 69f103ecd61..7ada201f2b0 100644
--- a/TAO/bin/tao_orb_tests.lst
+++ b/TAO/bin/tao_orb_tests.lst
@@ -162,6 +162,7 @@ TAO/tests/Bug_3672_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MI
TAO/tests/Bug_3674_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS
TAO/tests/Bug_3676_Regression/run_test.pl: !NO_MESSAGING
TAO/tests/Bug_3683_Regression/run_test.pl:
+TAO/tests/Bug_3695_Regression/run_test.pl: !FIXED_BUGS_ONLY
TAO/tests/DIOP/run_test.pl: !ST !NO_DIOP !ACE_FOR_TAO !CORBA_E_MICRO !LabVIEW_RT !WinCE !FUZZ
TAO/tests/DIOP/run_test_ipv6.pl: IPV6 !ST !NO_DIOP !ACE_FOR_TAO !CORBA_E_MICRO !LabVIEW_RT !WinCE !FUZZ
TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST
diff --git a/TAO/tests/Bug_3695_Regression/Bug_3695.cpp b/TAO/tests/Bug_3695_Regression/Bug_3695.cpp
new file mode 100644
index 00000000000..2d6e49eb0af
--- /dev/null
+++ b/TAO/tests/Bug_3695_Regression/Bug_3695.cpp
@@ -0,0 +1,77 @@
+// $Id$
+
+#if defined (TAO_HAS_IIOP) && (TAO_HAS_IIOP == 0)
+
+#include "ace/OS_main.h"
+
+int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
+{
+ return 0;
+}
+
+#else /* TAO_HAS_IIOP */
+
+#include "tao/IIOP_Profile.h"
+
+struct IIOP_Profile_var
+{
+ explicit IIOP_Profile_var (TAO_IIOP_Profile *pro)
+ : pro_ (pro)
+ {}
+
+ ~IIOP_Profile_var ()
+ {
+ this->pro_->_decr_refcnt ();
+ }
+
+ TAO_IIOP_Profile *operator->()
+ {
+ return this->pro_;
+ }
+
+ TAO_IIOP_Profile *get()
+ {
+ return this->pro_;
+ }
+
+ TAO_IIOP_Profile *pro_;
+};
+
+
+int ACE_TMAIN (int argc, ACE_TCHAR *argv[])
+{
+ CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
+ TAO_ORB_Core *orb_core = orb->orb_core ();
+
+ // 1. Construct a profile with at least 2 *alternate* endpoints
+
+ ACE_INET_Addr addr (9238, "localhost"), addr2 (9239, "localhost"),
+ addr3 (9240, "localhost");
+ TAO::ObjectKey okey;
+ TAO_GIOP_Message_Version version;
+ IIOP_Profile_var test_profile (
+ new TAO_IIOP_Profile ("localhost", 9238, okey,
+ addr, version, orb_core));
+ test_profile->add_endpoint (new TAO_IIOP_Endpoint (addr2, 0));
+ test_profile->add_endpoint (new TAO_IIOP_Endpoint (addr3, 0));
+ test_profile->encode_alternate_endpoints ();
+
+
+ // 2. Marshal and demarshal it
+
+ TAO_OutputCDR stream;
+ test_profile->encode (stream);
+ TAO_InputCDR in_stream (stream);
+ in_stream.skip_ulong (); // tag
+ in_stream.skip_ulong (); // length
+ in_stream.skip_octet (); // byte order
+ IIOP_Profile_var test_profile2 (new TAO_IIOP_Profile (orb_core));
+ test_profile2->decode (in_stream);
+
+
+ // 3. The result of demarshalling should be equivalent to the original
+
+ return (test_profile->is_equivalent (test_profile2.get ()) ? 0 : 1);
+}
+
+#endif /* TAO_HAS_IIOP */
diff --git a/TAO/tests/Bug_3695_Regression/Bug_3695_Regression.mpc b/TAO/tests/Bug_3695_Regression/Bug_3695_Regression.mpc
new file mode 100644
index 00000000000..f4f5bc2a5e2
--- /dev/null
+++ b/TAO/tests/Bug_3695_Regression/Bug_3695_Regression.mpc
@@ -0,0 +1,4 @@
+// $Id$
+project: taoclient {
+ exename = *
+}
diff --git a/TAO/tests/Bug_3695_Regression/run_test.pl b/TAO/tests/Bug_3695_Regression/run_test.pl
new file mode 100755
index 00000000000..ba6926f25f1
--- /dev/null
+++ b/TAO/tests/Bug_3695_Regression/run_test.pl
@@ -0,0 +1,26 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+use lib "$ENV{ACE_ROOT}/bin";
+use PerlACE::TestTarget;
+
+my $target = PerlACE::TestTarget::create_target(1) || die "Create target 1 failed\n";
+
+$status = 0;
+
+$SV = $target->CreateProcess ("Bug_3695_Regression");
+
+$server = $SV->SpawnWaitKill ($target->ProcessStartWaitInterval());
+
+if ($server != 0) {
+ print STDERR "ERROR: Bug_3695_Regression returned $server\n";
+ $status = 1;
+}
+
+$target->GetStderrLog();
+
+exit $status;