summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2020-12-29 10:17:39 +0100
committerJohnny Willemsen <jwillemsen@remedy.nl>2020-12-29 10:17:39 +0100
commitdaa794e611a517655f168d3bc5db6769a888c8ee (patch)
tree34fd56d9e7fba445ee220a07dd9de9b385a9e414
parent7894e0072e564bfd01d4ac805b9201548dbd670a (diff)
downloadATCD-repro-fragmentation-issue.tar.gz
Minor test changes and add new test to the test list as not fixedrepro-fragmentation-issue
* TAO/bin/tao_orb_tests.lst: * TAO/tests/GIOP_Fragments/Big_String_Sequence/Big_String_Sequence.mpc: * TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo.idl: * TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp: * TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.h: * TAO/tests/GIOP_Fragments/Big_String_Sequence/client.cpp: * TAO/tests/GIOP_Fragments/Big_String_Sequence/server.cpp:
-rw-r--r--TAO/bin/tao_orb_tests.lst1
-rw-r--r--TAO/tests/GIOP_Fragments/Big_String_Sequence/Big_String_Sequence.mpc2
-rw-r--r--TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo.idl7
-rw-r--r--TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp28
-rw-r--r--TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.h10
-rw-r--r--TAO/tests/GIOP_Fragments/Big_String_Sequence/client.cpp6
-rw-r--r--TAO/tests/GIOP_Fragments/Big_String_Sequence/server.cpp2
7 files changed, 21 insertions, 35 deletions
diff --git a/TAO/bin/tao_orb_tests.lst b/TAO/bin/tao_orb_tests.lst
index 4b1749372f8..7122c136118 100644
--- a/TAO/bin/tao_orb_tests.lst
+++ b/TAO/bin/tao_orb_tests.lst
@@ -433,6 +433,7 @@ TAO/tests/Native_Exceptions/run_test.pl:
TAO/tests/Servant_To_Reference_Test/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST
TAO/tests/Sequence_Unit_Tests/run_test.pl:
TAO/tests/Typedef_String_Array/run_test.pl:
+TAO/tests/GIOP_Fragments/Big_String_Sequence/run_test.pl: !FIXED_BUGS_ONLY
TAO/tests/GIOP_Fragments/PMB_With_Fragments/run_test.pl: !CORBA_E_MICRO
TAO/tests/CodeSets/simple/run_test.pl: !GIOP10 !STATIC
TAO/tests/Hang_Shutdown/run_test.pl: !ST !ACE_FOR_TAO
diff --git a/TAO/tests/GIOP_Fragments/Big_String_Sequence/Big_String_Sequence.mpc b/TAO/tests/GIOP_Fragments/Big_String_Sequence/Big_String_Sequence.mpc
index b46c33740a9..155304588b1 100644
--- a/TAO/tests/GIOP_Fragments/Big_String_Sequence/Big_String_Sequence.mpc
+++ b/TAO/tests/GIOP_Fragments/Big_String_Sequence/Big_String_Sequence.mpc
@@ -21,7 +21,7 @@ project(*Server): taoserver {
project(*Client): taoclient {
exename = client
- after += *IDL
+ after += *idl
Source_Files {
client.cpp
EchoC.cpp
diff --git a/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo.idl b/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo.idl
index 9dd09203d29..e871c7a5f4e 100644
--- a/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo.idl
+++ b/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo.idl
@@ -1,10 +1,5 @@
-/* -*- C++ -*- */
-#if !defined (_ECHO_IDL)
-#define _ECHO_IDL
-
interface Echo
{
- // = TITLE
// Defines an interface that encapsulates an operation that returns
// a string sequence, or a wstring sequence, respectively.
@@ -16,5 +11,3 @@ interface Echo
oneway void shutdown ();
};
-
-#endif /* _ECHO_IDL */
diff --git a/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp b/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp
index bd1e6203b21..04f187eb814 100644
--- a/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp
+++ b/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.cpp
@@ -1,6 +1,6 @@
#include "Echo_i.h"
-enum { BIG_LENGTH = 4 * 1024 };
+constexpr size_t BIG_LENGTH = 4 * 1024;
// Constructor.
@@ -9,24 +9,17 @@ Echo_i::Echo_i (CORBA::ORB_ptr o)
{
}
-// Destructor.
-
-Echo_i::~Echo_i ()
-{
-}
-
// Return a list of strings.
-
Echo::List *
Echo_i::return_list ()
{
Echo::List_var list;
{
- Echo::List *tmp = 0;
+ Echo::List *tmp {};
ACE_NEW_RETURN (tmp,
Echo::List (2),
- 0);
+ {});
list = tmp;
}
@@ -34,12 +27,11 @@ Echo_i::return_list ()
// Just do something to get a 'big' list of strings.
CORBA::Char big[BIG_LENGTH + 1];
- for (int i = 0; i < BIG_LENGTH; ++i)
+ for (size_t i = 0; i < BIG_LENGTH; ++i)
big[i] = 'A';
big[BIG_LENGTH] = 0;
- CORBA::Char small[] = "Hello World";
list[CORBA::ULong(0)] = CORBA::string_dup(big);
- list[CORBA::ULong(1)] = CORBA::string_dup(small);
+ list[CORBA::ULong(1)] = CORBA::string_dup("Hello World");
return list._retn ();
}
@@ -50,10 +42,10 @@ Echo_i::return_wlist ()
Echo::WList_var list;
{
- Echo::WList *tmp = 0;
+ Echo::WList *tmp {};
ACE_NEW_RETURN (tmp,
Echo::WList (2),
- 0);
+ {});
list = tmp;
}
@@ -61,11 +53,11 @@ Echo_i::return_wlist ()
// Just do something to get a 'big' list of wide strings.
CORBA::WChar big[BIG_LENGTH + 1];
- for (int i = 0; i < BIG_LENGTH; ++i)
+ for (size_t i = 0; i < BIG_LENGTH; ++i)
big[i] = 'A';
big[BIG_LENGTH] = 0;
CORBA::WChar small[17 + 1];
- for (int i = 0; i < 17; ++i)
+ for (size_t i = 0; i < 17; ++i)
small[i] = 'B';
small[17] = 0;
list[CORBA::ULong(0)] = CORBA::wstring_dup(big);
@@ -77,7 +69,7 @@ Echo_i::return_wlist ()
// Shutdown the server application.
void
-Echo_i::shutdown (void)
+Echo_i::shutdown ()
{
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("\nThe echo server is shutting down\n")));
diff --git a/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.h b/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.h
index a7abf91134e..3be035a6eee 100644
--- a/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.h
+++ b/TAO/tests/GIOP_Fragments/Big_String_Sequence/Echo_i.h
@@ -28,20 +28,20 @@ public:
Echo_i (CORBA::ORB_ptr o);
/// Destructor.
- virtual ~Echo_i (void);
+ ~Echo_i () override = default;
/// Return the result sequences to the cllient.
- virtual Echo::List *return_list ();
- virtual Echo::WList *return_wlist ();
+ Echo::List *return_list () override;
+ Echo::WList *return_wlist () override;
/// Shutdown the server.
- virtual void shutdown ();
+ void shutdown () override;
private:
/// ORB pointer.
CORBA::ORB_var orb_;
- void operator= (const Echo_i&);
+ void operator= (const Echo_i&) = delete;
};
#endif /* ECHO_I_H */
diff --git a/TAO/tests/GIOP_Fragments/Big_String_Sequence/client.cpp b/TAO/tests/GIOP_Fragments/Big_String_Sequence/client.cpp
index 6cbd0fe6b65..21ef8c8008b 100644
--- a/TAO/tests/GIOP_Fragments/Big_String_Sequence/client.cpp
+++ b/TAO/tests/GIOP_Fragments/Big_String_Sequence/client.cpp
@@ -61,7 +61,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
ACE_ERROR_RETURN ((LM_ERROR, "Expected length 2\n"), -1);
}
const char* value = (*list)[0].in();
- size_t length = strlen(value);
+ size_t length = std::strlen(value);
ACE_DEBUG ((LM_DEBUG,
"First element has length %u\n",
length));
@@ -75,9 +75,9 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
}
}
value = (*list)[1].in();
- length = strlen(value);
+ length = std::strlen(value);
ACE_DEBUG ((LM_DEBUG,
- "Second element has length %u, value: %s\n",
+ "Second element has length %u, value: <%C>\n",
length, value));
if (strcmp(value, "Hello World") != 0)
{
diff --git a/TAO/tests/GIOP_Fragments/Big_String_Sequence/server.cpp b/TAO/tests/GIOP_Fragments/Big_String_Sequence/server.cpp
index 4ff8e031dc0..51e4b5df7d7 100644
--- a/TAO/tests/GIOP_Fragments/Big_String_Sequence/server.cpp
+++ b/TAO/tests/GIOP_Fragments/Big_String_Sequence/server.cpp
@@ -85,7 +85,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
- root_poa->destroy (1, 1);
+ root_poa->destroy (true, true);
orb->destroy ();
}