summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Basic_Types_Test.cpp2
-rw-r--r--tests/CDR_Test.cpp11
-rw-r--r--tests/Cached_Allocator_Test.cpp19
-rw-r--r--tests/Config_Test.cpp2
-rw-r--r--tests/Dirent_Test.cpp94
-rw-r--r--tests/Dynamic_Priority_Test.cpp1
-rw-r--r--tests/Enum_Interfaces_Test.cpp22
-rw-r--r--tests/Env_Value_Test.cpp7
-rw-r--r--tests/FIFO_Test.cpp11
-rw-r--r--tests/INET_Addr_Test.cpp12
-rw-r--r--tests/INET_Addr_Test_IPV6.cpp2
-rw-r--r--tests/IOStream_Test.cpp2
-rw-r--r--tests/Log_Msg_Test.cpp4
-rw-r--r--tests/MEM_Stream_Test.cpp24
-rw-r--r--tests/Malloc_Test.cpp4
-rw-r--r--tests/Message_Queue_Notifications_Test.cpp3
-rw-r--r--tests/Message_Queue_Test.cpp8
-rw-r--r--tests/OS_Test.cpp43
-rw-r--r--tests/Proactor_Test.cpp18
-rw-r--r--tests/Proactor_Test_IPV6.cpp18
-rw-r--r--tests/Process_Manager_Test.cpp9
-rw-r--r--tests/Process_Mutex_Test.cpp15
-rw-r--r--tests/Process_Strategy_Test.cpp2
-rw-r--r--tests/SOCK_Connector_Test.cpp8
-rw-r--r--tests/SOCK_Dgram_Bcast_Test.cpp10
-rw-r--r--tests/SOCK_Dgram_Test.cpp4
-rw-r--r--tests/SOCK_Send_Recv_Test.cpp2
-rw-r--r--tests/SOCK_Test.cpp2
-rw-r--r--tests/SV_Shared_Memory_Test.cpp2
-rw-r--r--tests/Service_Config_Test.cpp30
-rw-r--r--tests/Signal_Test.cpp6
-rw-r--r--tests/TSS_Test.cpp6
-rw-r--r--tests/Test_Output.cpp27
-rwxr-xr-xtests/run_test.pl6
-rw-r--r--tests/test_config.h7
35 files changed, 139 insertions, 304 deletions
diff --git a/tests/Basic_Types_Test.cpp b/tests/Basic_Types_Test.cpp
index 7df2604225e..cd7c58f6174 100644
--- a/tests/Basic_Types_Test.cpp
+++ b/tests/Basic_Types_Test.cpp
@@ -75,6 +75,8 @@ run_main (int, ACE_TCHAR *[])
errors += check (ACE_TEXT ("ACE_SIZEOF_CHAR: %u%s"),
sizeof (char), ACE_SIZEOF_CHAR);
#if defined (ACE_HAS_WCHAR)
+ // This is pointless - since ACE_SIZEOF_WCHAR is defined to sizeof (wchar_t)
+ // but oh well...
errors += check (ACE_TEXT ("ACE_SIZEOF_WCHAR: %u%s"),
sizeof (wchar_t), ACE_SIZEOF_WCHAR);
#endif /* ACE_HAS_WCHAR */
diff --git a/tests/CDR_Test.cpp b/tests/CDR_Test.cpp
index 49582de3872..ed4fff4a373 100644
--- a/tests/CDR_Test.cpp
+++ b/tests/CDR_Test.cpp
@@ -449,17 +449,6 @@ run_main (int argc, ACE_TCHAR *argv[])
}
}
- // Sanity checks.
- ACE_ASSERT (sizeof (ACE_CDR::Boolean) == 1);
- ACE_ASSERT (sizeof (ACE_CDR::Octet) == 1);
- ACE_ASSERT (sizeof (ACE_CDR::WChar) >= 2);
- ACE_ASSERT (sizeof (ACE_CDR::Short) == 2);
- ACE_ASSERT (sizeof (ACE_CDR::Long) == 4);
- ACE_ASSERT (sizeof (ACE_CDR::LongLong) == 8);
- ACE_ASSERT (sizeof (ACE_CDR::Float) == 4);
- ACE_ASSERT (sizeof (ACE_CDR::Double) == 8);
- ACE_ASSERT (sizeof (ACE_CDR::LongDouble) == 16);
-
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("Testing ACE CDR functions - short stream\n\n")));
diff --git a/tests/Cached_Allocator_Test.cpp b/tests/Cached_Allocator_Test.cpp
index 78cab3e70e4..0e5bcf5f28f 100644
--- a/tests/Cached_Allocator_Test.cpp
+++ b/tests/Cached_Allocator_Test.cpp
@@ -149,7 +149,6 @@ run_main (int argc, ACE_TCHAR *argv[])
size_t chunk_size = 0;
size_t n_chunks = 0;
size_t requested_size = 0;
- size_t depth = 0;
char *ptr1 = 0;
char *ptr2 = 0;
char *ptr3 = 0;
@@ -175,12 +174,6 @@ run_main (int argc, ACE_TCHAR *argv[])
DYNAMIC_ALLOCATOR allocator (n_chunks, chunk_size);
- if ((depth = allocator.pool_depth ()) != n_chunks)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("Expected pool depth ") ACE_SIZE_T_FORMAT_SPECIFIER
- ACE_TEXT (" but reported ") ACE_SIZE_T_FORMAT_SPECIFIER
- ACE_TEXT ("\n"),
- n_chunks, depth));
requested_size = chunk_size;
ACE_DEBUG ((LM_INFO,
ACE_TEXT (" (%t) Allocating chunk 1: %d bytes, should succeed...\n"),
@@ -191,12 +184,6 @@ run_main (int argc, ACE_TCHAR *argv[])
ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT (" (%t) Failed, exiting.\n")), -1);
ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) OK, succeeded.\n")));
- if ((depth = allocator.pool_depth ()) != (n_chunks - 1))
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("Expected pool depth ") ACE_SIZE_T_FORMAT_SPECIFIER
- ACE_TEXT (" but reported ") ACE_SIZE_T_FORMAT_SPECIFIER
- ACE_TEXT ("\n"),
- n_chunks - 1, depth));
requested_size = chunk_size + 1;
ACE_DEBUG ((LM_INFO,
@@ -221,12 +208,6 @@ run_main (int argc, ACE_TCHAR *argv[])
ACE_DEBUG ((LM_INFO, ACE_TEXT (" (%t) OK, succeeded.\n")));
// One chunk too far...
- if ((depth = allocator.pool_depth ()) != 0)
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("Expected pool depth 0")
- ACE_TEXT (" but reported ") ACE_SIZE_T_FORMAT_SPECIFIER
- ACE_TEXT ("\n"),
- depth));
requested_size = chunk_size;
ACE_DEBUG ((LM_INFO,
ACE_TEXT (" (%t) Allocating chunk 4: %d bytes, no free chunks,")
diff --git a/tests/Config_Test.cpp b/tests/Config_Test.cpp
index 81d8e606fb7..6fe3e5b0dfd 100644
--- a/tests/Config_Test.cpp
+++ b/tests/Config_Test.cpp
@@ -1428,7 +1428,7 @@ Config_Test::get_section_boolean (ACE_Configuration& config,
pSrc++)
// Convert to uppercase
if (ACE_OS::ace_islower (*pSrc))
- *pSrc = ACE_OS::ace_tolower (*pSrc);
+ *pSrc = ACE_OS::to_lower (*pSrc);
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("%s = %s\n"),
diff --git a/tests/Dirent_Test.cpp b/tests/Dirent_Test.cpp
index ba2f45cbe29..dcd2879b979 100644
--- a/tests/Dirent_Test.cpp
+++ b/tests/Dirent_Test.cpp
@@ -41,16 +41,8 @@ ACE_RCSID (tests,
#define TEST_DIR "log"
#define TEST_ENTRY ".."
#else
-# define TEST_DIR "../tests"
-# if defined (ACE_LACKS_STRUCT_DIR) || !defined (ACE_HAS_SCANDIR)
-# define DIR_DOT ACE_TEXT (".")
-# define DIR_DOT_DOT ACE_TEXT ("..")
-# define TEST_ENTRY ACE_TEXT ("run_test.lst")
-# else
-# define DIR_DOT "."
-# define DIR_DOT_DOT ".."
-# define TEST_ENTRY "run_test.lst"
-# endif /* ACE_LACKS_STRUCT_DIR */
+#define TEST_DIR "../tests"
+#define TEST_ENTRY "run_test.lst"
#endif /* VXWORKS || CHORUS */
static const int RECURSION_INDENT = 3;
@@ -61,13 +53,13 @@ static int entrycount = 0;
static int
selector (const dirent *d)
{
- return ACE_OS::strcmp (d->d_name, TEST_ENTRY) == 0;
+ return ACE_OS_String::strcmp (d->d_name, ACE_TEXT (TEST_ENTRY)) == 0;
}
static int
comparator (const dirent **d1, const dirent **d2)
{
- return ACE_OS::strcmp ((*d1)->d_name, (*d2)->d_name);
+ return ACE_OS_String::strcmp ((*d1)->d_name, (*d2)->d_name);
}
static int
@@ -87,7 +79,7 @@ dirent_selector_test (void)
for (n = 0; n < sds.length (); ++n)
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Sorted: %d: %C\n"),
+ "Sorted: %d: %s\n",
n,
sds[n]->d_name));
@@ -104,7 +96,7 @@ dirent_selector_test (void)
for (n = 0; n < ds.length (); ++n)
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Entry %d: %C\n"),
+ "Entry %d: %s\n",
n,
ds[n]->d_name));
@@ -123,24 +115,24 @@ dirent_test (void)
(directory = dir.read ()) != 0;
entrycount++)
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Entry %d: %C\n"),
+ "Entry %d: %s\n",
entrycount,
directory->d_name));
switch (entrycount)
{
case 0:
- ACE_ERROR_RETURN
- ((LM_ERROR, ACE_TEXT ("readdir failed to read anything\n")), -1);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "readdir failed to read anything\n"),
+ -1);
/* NOTREACHED */
case 1:
- ACE_ERROR_RETURN
- ((LM_ERROR,
- ACE_TEXT ("readdir failed, only matched directory name\n")),
- -1);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "readdir failed, only matched directory name\n"),
+ -1);
/* NOTREACHED */
default:
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("readdir succeeded, read %d entries\n"),
+ "readdir succeeded, read %d entries\n",
entrycount));
}
return 0;
@@ -154,42 +146,29 @@ dirent_count (const ACE_TCHAR *dir_path,
{
if (ACE_OS::chdir (dir_path) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("chdir: %p\n"),
+ "chdir: %p\n",
dir_path),
-1);
ACE_Dirent dir (ACE_TEXT ("."));
- // Since the dir struct d_name type changes depending on the setting
- // of ACE_LACKS_STRUCT_DIR, copy each name into a neutral format
- // array to work on it.
- const size_t maxnamlen = MAXNAMLEN;
- ACE_TCHAR tname[maxnamlen + 1];
-
int entry_count = 0;
for (dirent *directory; (directory = dir.read ()) != 0;)
{
// Skip the ".." and "." files.
- if (ACE_OS::strcmp (directory->d_name, DIR_DOT) == 0
- || ACE_OS::strcmp (directory->d_name, DIR_DOT_DOT) == 0)
+ if (ACE_OS_String::strcmp (directory->d_name, ACE_TEXT (".")) == 0
+ || ACE_OS_String::strcmp (directory->d_name, ACE_TEXT ("..")) == 0)
continue;
entry_count++;
-#if !defined (ACE_LACKS_STRUCT_DIR)
- ACE_OS::strncpy (tname,
- ACE_TEXT_CHAR_TO_TCHAR (directory->d_name),
- maxnamlen);
-#else
- ACE_OS::strncpy (tname, directory->d_name, maxnamlen);
-#endif /* ACE_LACKS_STRUCT_DIR */
-
int local_file_count = 0;
int local_dir_count = 0;
ACE_stat stat_buf;
+
if (ACE_OS::lstat (directory->d_name, &stat_buf) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- tname),
+ "%p\n",
+ directory->d_name),
-1);
switch (stat_buf.st_mode & S_IFMT)
@@ -201,8 +180,8 @@ dirent_count (const ACE_TCHAR *dir_path,
case S_IFLNK: // Either a file or directory link, so let's find out.
if (ACE_OS::stat (directory->d_name, &stat_buf) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- tname),
+ "%p\n",
+ directory->d_name),
-1);
if ((stat_buf.st_mode & S_IFMT) == S_IFDIR)
@@ -215,27 +194,26 @@ dirent_count (const ACE_TCHAR *dir_path,
default: // Must be a directory.
ACE_DEBUG ((LM_DEBUG, "%*sentering subdirectory %s\n",
recursion_level * RECURSION_INDENT,
- ACE_TEXT (""),
- tname));
- if (dirent_count (tname,
+ "",
+ directory->d_name));
+ if (dirent_count (directory->d_name,
local_dir_count,
local_file_count,
recursion_level + 1) != -1)
{
- ACE_DEBUG
- ((LM_DEBUG,
- ACE_TEXT ("%*ssubdirectory %s has %d files and %d subdirectories.\n"),
- recursion_level * RECURSION_INDENT,
- ACE_TEXT (""),
- tname,
- local_file_count,
- local_dir_count));
+ ACE_DEBUG ((LM_DEBUG,
+ "%*ssubdirectory %s has %d files and %d subdirectories.\n",
+ recursion_level * RECURSION_INDENT,
+ "",
+ directory->d_name,
+ local_file_count,
+ local_dir_count));
dir_count++;
// Move back up a level.
if (ACE_OS::chdir (ACE_TEXT ("..")) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("chdir: %p\n"),
+ "chdir: %p\n",
dir_path),
-1);
}
@@ -253,7 +231,7 @@ dirent_recurse_test (void)
int total_files = 0;
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Starting directory recursion test for %s\n"),
+ "Starting directory recursion test for %s\n",
ACE_TEXT (TEST_DIR)));
if (dirent_count (ACE_TEXT (TEST_DIR),
@@ -261,11 +239,11 @@ dirent_recurse_test (void)
total_files,
1) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Directory recursion test failed for %s\n"),
+ "Directory recursion test failed for %s\n",
ACE_TEXT (TEST_DIR)),
-1);
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Directory recursion test succeeded for %s, read %d files %d dirs\n"),
+ "Directory recursion test succeeded for %s, read %d files %d dirs\n",
ACE_TEXT (TEST_DIR),
total_files,
total_dirs));
diff --git a/tests/Dynamic_Priority_Test.cpp b/tests/Dynamic_Priority_Test.cpp
index 665670bb309..802175592be 100644
--- a/tests/Dynamic_Priority_Test.cpp
+++ b/tests/Dynamic_Priority_Test.cpp
@@ -411,7 +411,6 @@ performance_producer (void *args)
// Set a character in the current message block at its
// read pointer position, and adjust the write pointer.
- mb->reset();
*mb->wr_ptr () = 'a';
mb->wr_ptr (1);
diff --git a/tests/Enum_Interfaces_Test.cpp b/tests/Enum_Interfaces_Test.cpp
index b9bd438c6c0..71f409dfae9 100644
--- a/tests/Enum_Interfaces_Test.cpp
+++ b/tests/Enum_Interfaces_Test.cpp
@@ -10,10 +10,11 @@
// Enum_interfaces.cpp
//
// = DESCRIPTION
-// This is a simple test of <ACE::get_ip_interfaces>. This call
-// retrieves the IP addresses assigned to the host by
-// interrogating the kernel. Network applications typically
-// assume gethostbyname(uname()) will work, but this is just a
+// This is a simple test of
+// <ACE_Sock_Connection::get_ip_interfaces>. This call retrieves
+// the IP addresses assigned to the host by interrogating the
+// kernel. Network applications typically assume
+// gethostbyname(uname()) will work, but this is just a
// convention. It is also problematic if the resolver code
// (DNS/NIS+...) is misconfigured. This happens more than
// programmers realize. It is better to find out by asking the
@@ -48,26 +49,27 @@ run_main (int, ACE_TCHAR *[])
ACE_INET_Addr *the_addr_array;
size_t how_many = 0;
- int rc = ACE::get_ip_interfaces (how_many, the_addr_array);
+ int rc = ACE_Sock_Connect::get_ip_interfaces (how_many, the_addr_array);
if (rc != 0)
ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("%p\n"),
- ACE_TEXT ("ACE::get_ip_interfaces failed")));
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Sock_Connect::get_ip_interfaces failed")));
else if (how_many == 0)
ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("No interfaces presently configured in the kernel\n")));
+ ACE_TEXT ("No interfaces presently configured in the kernel\n")));
else
{
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("there are %d interfaces\n"), how_many));
for (size_t i = 0; i < how_many; i++)
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\t%s\n"),
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\t%s\n"),
ACE_TEXT_CHAR_TO_TCHAR (the_addr_array[i].get_host_addr ())));
delete [] the_addr_array;
}
ACE_END_TEST;
- return rc != 0; // return 1 if get_ip_interfaces() failed
+ return rc != 0; // return 1 if get_ip_interfaces() failed
}
+
diff --git a/tests/Env_Value_Test.cpp b/tests/Env_Value_Test.cpp
index ca9674127a0..131197fdd45 100644
--- a/tests/Env_Value_Test.cpp
+++ b/tests/Env_Value_Test.cpp
@@ -44,15 +44,8 @@ run_main (int argc, ACE_TCHAR* [])
{
ACE_UNUSED_ARG (argc);
- // Only Win32 can set wide-char environment strings. So, for all
- // others, use char string literals regardless of ACE_USES_WCHAR.
-# if defined (ACE_WIN32)
ACE_OS::putenv (ACE_TEXT ("TEST_VALUE_POSITIVE=10.2"));
ACE_OS::putenv (ACE_TEXT ("TEST_VALUE_NEGATIVE=-10.2"));
-# else
- ACE_OS::putenv ("TEST_VALUE_POSITIVE=10.2");
- ACE_OS::putenv ("TEST_VALUE_NEGATIVE=-10.2");
-# endif /* ACE_WIN32 */
#else /* ! ACE_HAS_NONSTATIC_OBJECT_MANAGER && ! ACE_LACKS_FORK */
run_main (int argc, ACE_TCHAR * [], ACE_TCHAR *envp[])
{
diff --git a/tests/FIFO_Test.cpp b/tests/FIFO_Test.cpp
index 378a1d188db..f8f69e356d5 100644
--- a/tests/FIFO_Test.cpp
+++ b/tests/FIFO_Test.cpp
@@ -36,7 +36,8 @@ ACE_RCSID(tests, SOCK_Test, "$Id$")
#if !defined (ACE_WIN32)
-static const char ACE_ALPHABET[] = "abcdefghijklmnopqrstuvwxyz";
+static const ACE_TCHAR ACE_ALPHABET[] =
+ ACE_TEXT ("abcdefghijklmnopqrstuvwxyz");
// This length is used for the "big buffer" send/receive.
static const size_t big_size = (BUFSIZ * 4);
@@ -115,9 +116,9 @@ server (void *arg)
// On AIX, select() always seems to select a fifo handle as a normal file,
// always readable. Just wait a second...
-# if defined (AIX) || defined (HPUX)
+# if defined (AIX)
ACE_OS::sleep (1);
-# endif /* AIX || HPUX */
+# endif /* AIX */
// Read the things the client is sending; alphabet, huge overflow, then
// alphabet.
@@ -193,7 +194,7 @@ test_fifo_msg (void)
// Reader side opens first - it may fail if fifo not supported on this
// platform.
ACE_TCHAR fifo_path[MAXPATHLEN];
- if (ACE::get_temp_dir (fifo_path, MAXPATHLEN) == -1)
+ if (ACE_Lib_Find::get_temp_dir (fifo_path, MAXPATHLEN) == -1)
ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"),
ACE_TEXT ("get_temp_dir")), 1);
ACE_OS::strcat (fifo_path, ACE_TEXT ("FIFO_Test"));
@@ -224,7 +225,7 @@ test_fifo_msg (void)
int status = 0; // Test status; innocent until proven guilty.
#if !defined (ACE_LACKS_FORK)
- switch (ACE_OS::fork (ACE_TEXT ("child")))
+ switch (ACE_OS::fork ("child"))
{
case -1:
ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("fork failed")));
diff --git a/tests/INET_Addr_Test.cpp b/tests/INET_Addr_Test.cpp
index 5a25bd54fba..4f026f19114 100644
--- a/tests/INET_Addr_Test.cpp
+++ b/tests/INET_Addr_Test.cpp
@@ -46,10 +46,10 @@ int check_type_consistency (const ACE_INET_Addr &addr)
if (addr.get_type () != family)
{
ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("Inconsistency between ACE_SOCK::addr_type_ (%d) ")
- ACE_TEXT ("and the sockaddr family (%d)\n"),
- addr.get_type (),
- family));
+ ACE_TEXT ("Inconsistency between ACE_SOCK::addr_type_ (%d) ")
+ ACE_TEXT ("and the sockaddr family (%d)\n"),
+ addr.get_type (),
+ family));
return 1;
}
return 0;
@@ -189,7 +189,7 @@ int run_main (int argc, ACE_TCHAR *argv[])
}
#if defined (ACE_HAS_IPV6)
- if (ACE::ipv6_enabled ())
+ if (ACE_Sock_Connect::ipv6_enabled ())
{
const char *ipv6_addresses[] = {
"1080::8:800:200c:417a", // unicast address
@@ -202,7 +202,7 @@ int run_main (int argc, ACE_TCHAR *argv[])
for (int i=0; ipv6_addresses[i] != 0; i++)
{
ACE_INET_Addr addr (80, ipv6_addresses[i]);
- status |= check_type_consistency (addr);
+ status |= check_type_consistency (addr);
if (0 != ACE_OS::strcmp (addr.get_host_addr (), ipv6_addresses[i]))
{
diff --git a/tests/INET_Addr_Test_IPV6.cpp b/tests/INET_Addr_Test_IPV6.cpp
index 96c4ed12cc8..12a9bb51459 100644
--- a/tests/INET_Addr_Test_IPV6.cpp
+++ b/tests/INET_Addr_Test_IPV6.cpp
@@ -64,7 +64,7 @@ int run_main (int argc, ACE_TCHAR *argv[])
int status = 0; // Innocent until proven guilty
#if defined (ACE_HAS_IPV6)
- if (ACE::ipv6_enabled ())
+ if (ACE_Sock_Connect::ipv6_enabled ())
{
ACE_INET_Addr addr ("::");
diff --git a/tests/IOStream_Test.cpp b/tests/IOStream_Test.cpp
index 4a57d519156..4beddee0aa0 100644
--- a/tests/IOStream_Test.cpp
+++ b/tests/IOStream_Test.cpp
@@ -28,8 +28,6 @@
ACE_RCSID (tests, IOStream_Test, "$Id$")
#if !defined (ACE_LACKS_ACE_IOSTREAM)
-# include "ace/OS_NS_unistd.h"
-# include "ace/os_include/os_ctype.h" // Needed for isspace() function
typedef ACE_IOStream<ACE_SOCK_Stream> ACE_SOCK_IOStream;
diff --git a/tests/Log_Msg_Test.cpp b/tests/Log_Msg_Test.cpp
index daff113d3b4..1afdfb6c737 100644
--- a/tests/Log_Msg_Test.cpp
+++ b/tests/Log_Msg_Test.cpp
@@ -225,7 +225,7 @@ test_log_msg_features (const ACE_TCHAR *program)
if (ACE_OS::open (badname,
O_RDONLY) == ACE_INVALID_HANDLE)
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%n: (%x), can't open %C%r\n"),
+ ACE_TEXT ("%n: (%x), can't open %s%r\n"),
10000,
badname,
cleanup));
@@ -415,7 +415,7 @@ test_ostream (void)
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("%C"),
+ ACE_TEXT ("%s"),
buffer));
#endif /* ACE_LACKS_IOSTREAM_TOTALLY */
diff --git a/tests/MEM_Stream_Test.cpp b/tests/MEM_Stream_Test.cpp
index 7032700efc1..100327c72d4 100644
--- a/tests/MEM_Stream_Test.cpp
+++ b/tests/MEM_Stream_Test.cpp
@@ -34,10 +34,10 @@
ACE_RCSID(tests, MEM_Stream_Test, "$Id$")
-#if (defined (ACE_HAS_THREADS) || defined (ACE_HAS_PROCESS_SPAWN)) && \
+#if (defined (ACE_HAS_THREADS) || !defined (ACE_LACKS_FORK)) && \
(ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
-#if !defined (ACE_HAS_PROCESS_SPAWN) && defined (ACE_HAS_THREADS)
+#if defined (ACE_LACKS_FORK) && defined (ACE_HAS_THREADS) // Win32, et al
# define _TEST_USES_THREADS
#else
# define _TEST_USES_PROCESSES
@@ -219,7 +219,6 @@ run_client (u_short port,
return status;
}
-#if defined (_TEST_USES_THREADS)
static ACE_THR_FUNC_RETURN
connect_client (void *arg)
{
@@ -227,7 +226,6 @@ connect_client (void *arg)
run_client (*sport, client_strategy);
return 0;
}
-#endif
static void
create_reactor (void)
@@ -287,13 +285,9 @@ test_reactive (const ACE_TCHAR *prog,
&sport) == -1)
ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn_n ()")));
#else
+ ACE_UNUSED_ARG (connect_client);
ACE_Process_Options opts;
-# if defined (ACE_WIN32) || !defined (ACE_USES_WCHAR)
- const ACE_TCHAR *cmdline_fmt = ACE_TEXT ("%s -p%d -r");
-# else
- const ACE_TCHAR *cmdline_fmt = ACE_TEXT ("%ls -p%d -r");
-# endif /* ACE_WIN32 || !ACE_USES_WCHAR */
- opts.command_line (cmdline_fmt, prog, sport);
+ opts.command_line (ACE_TEXT ("%s -p%d -r"), prog, sport);
if (ACE_Process_Manager::instance ()->spawn_n (NUMBER_OF_REACTIVE_CONNECTIONS,
opts) == -1)
ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn_n ()")));
@@ -378,13 +372,9 @@ test_concurrent (const ACE_TCHAR *prog,
&sport) == -1)
ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn_n()")));
#else
+ ACE_UNUSED_ARG (connect_client);
ACE_Process_Options opts;
-# if defined (ACE_WIN32) || !defined (ACE_USES_WCHAR)
- const ACE_TCHAR *cmdline_fmt = ACE_TEXT ("%s -p%d -m");
-# else
- const ACE_TCHAR *cmdline_fmt = ACE_TEXT ("%ls -p%d -m");
-# endif /* ACE_WIN32 || !ACE_USES_WCHAR */
- opts.command_line (cmdline_fmt, prog, sport);
+ opts.command_line (ACE_TEXT ("%s -p%d -m"), prog, sport);
if (ACE_Process_Manager::instance ()->spawn_n (NUMBER_OF_MT_CONNECTIONS,
opts) == -1)
ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("spawn_n()")));
@@ -554,4 +544,4 @@ run_main (int, ACE_TCHAR *[])
ACE_END_TEST;
return 0;
}
-#endif /* (ACE_HAS_THREADS || ACE_HAS_PROCESS_SPAWN) && ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
+#endif /* (ACE_HAS_THREADS || ACE_HAS_FORK) && ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1 */
diff --git a/tests/Malloc_Test.cpp b/tests/Malloc_Test.cpp
index 755bf7964e5..0234d1a558f 100644
--- a/tests/Malloc_Test.cpp
+++ b/tests/Malloc_Test.cpp
@@ -30,7 +30,7 @@
ACE_RCSID(tests, Malloc_Test, "Malloc_Test.cpp,v 4.22 1999/12/13 22:24:42 nanbor Exp")
-#if !defined (__Lynx__) && defined (ACE_HAS_PROCESS_SPAWN)
+#if !defined (__Lynx__) && (!defined (ACE_LACKS_FORK) || defined (ACE_WIN32))
#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1)
typedef ACE_Malloc_T<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex, ACE_PI_Control_Block> MALLOC;
@@ -461,4 +461,4 @@ run_main (int, ACE_TCHAR *[])
ACE_END_TEST;
return 0;
}
-#endif /* ! __Lynx__ && ACE_HAS_PROCESS_SPAWN */
+#endif /* ! __Lynx__ && (! ACE_LACKS_FORK || ACE_WIN32) */
diff --git a/tests/Message_Queue_Notifications_Test.cpp b/tests/Message_Queue_Notifications_Test.cpp
index ed78cfcc93e..66f7ef98d32 100644
--- a/tests/Message_Queue_Notifications_Test.cpp
+++ b/tests/Message_Queue_Notifications_Test.cpp
@@ -218,9 +218,6 @@ Watermark_Test::producer (void)
this->put_message ();
this->print_producer_debug_message ();
i--;
- if (this->msg_queue ()->is_full ())
- break;
-
}
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%P|%t) Producer: High water mark hit ---- \n")));
diff --git a/tests/Message_Queue_Test.cpp b/tests/Message_Queue_Test.cpp
index af5f2faf0e6..26b50b3f501 100644
--- a/tests/Message_Queue_Test.cpp
+++ b/tests/Message_Queue_Test.cpp
@@ -87,11 +87,11 @@ iterator_test (void)
{
const int ITERATIONS = 5;
ACE_TCHAR buffer[ITERATIONS][BUFSIZ];
- // Use queue size from of 32 Kb (more if using wide-char), instead of the
- // default of 16 Kb (defined by ACE_Message_Queue_Base::DEFAULT_HWM),
- // so that the test runs on machines with 8Kb pagesizes.
+ // Use queue size from of 32 Kb, instead of the default of 16 Kb
+ // (defined by ACE_Message_Queue_Base::DEFAULT_HWM), so that the
+ // test runs on machines with 8Kb pagesizes.
#if !defined(_UNICOS)
- QUEUE queue (32 * 1024 * sizeof (ACE_TCHAR));
+ QUEUE queue (32 * 1024);
#else
// this works on the Cray, where BUFSIZ is defined as 32Kb
QUEUE queue (ITERATIONS * BUFSIZ - 1);
diff --git a/tests/OS_Test.cpp b/tests/OS_Test.cpp
index 9b26a1b34a2..b67ed272077 100644
--- a/tests/OS_Test.cpp
+++ b/tests/OS_Test.cpp
@@ -781,44 +781,6 @@ string_convert_test (void)
#endif /* ACE_HAS_WCHAR */
}
-// Test the methods for getting cpu info
-int
-cpu_info_test (void)
-{
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("Testing cpu info methods\n")));
-
- long number_processors = ACE_OS::num_processors();
- long number_processors_online = ACE_OS::num_processors_online();
-
- if (number_processors == -1)
- {
- ACE_ERROR ((LM_INFO,
- ACE_TEXT ("number of processors not supported on ")
- ACE_TEXT ("this platform\n")));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("This system has %d processors\n"),
- number_processors));
- }
-
- if (number_processors_online == -1)
- {
- ACE_ERROR ((LM_INFO,
- ACE_TEXT ("number of processors online not supported on ")
- ACE_TEXT ("this platform\n")));
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("This system has %d processors online\n"),
- number_processors_online));
- }
-
- return 0;
-}
int
run_main (int, ACE_TCHAR *[])
@@ -840,10 +802,7 @@ run_main (int, ACE_TCHAR *[])
if ((result = ctime_r_test ()) != 0)
status = result;
- if ((result = string_strsncpy_test ()) != 0)
- status = result;
-
- if ((result = cpu_info_test ()) != 0)
+ if ((result = string_strsncpy_test ()) != 0)
status = result;
ACE_END_TEST;
diff --git a/tests/Proactor_Test.cpp b/tests/Proactor_Test.cpp
index 9e1012cd594..a3ce1b084d5 100644
--- a/tests/Proactor_Test.cpp
+++ b/tests/Proactor_Test.cpp
@@ -96,14 +96,14 @@ static int loglevel; // 0 full , 1 only errors
static size_t xfer_limit; // Number of bytes for Sender to send.
-static char complete_message[] =
- "GET / HTTP/1.1\r\n"
- "Accept: */*\r\n"
- "Accept-Language: C++\r\n"
- "Accept-Encoding: gzip, deflate\r\n"
- "User-Agent: Proactor_Test/1.0 (non-compatible)\r\n"
- "Connection: Keep-Alive\r\n"
- "\r\n";
+static ACE_TCHAR complete_message[] =
+ ACE_TEXT ("GET / HTTP/1.1\r\n")
+ ACE_TEXT ("Accept: */*\r\n")
+ ACE_TEXT ("Accept-Language: C++\r\n")
+ ACE_TEXT ("Accept-Encoding: gzip, deflate\r\n")
+ ACE_TEXT ("User-Agent: Proactor_Test/1.0 (non-compatible)\r\n")
+ ACE_TEXT ("Connection: Keep-Alive\r\n")
+ ACE_TEXT ("\r\n");
class LogLocker
{
@@ -1704,7 +1704,7 @@ set_proactor_type (const ACE_TCHAR *ptype)
if (!ptype)
return 0;
- switch (ACE_OS::ace_toupper (*ptype))
+ switch (ACE_OS::to_upper (*ptype))
{
case 'D':
proactor_type = DEFAULT;
diff --git a/tests/Proactor_Test_IPV6.cpp b/tests/Proactor_Test_IPV6.cpp
index 45d32db07c5..35688cc3f78 100644
--- a/tests/Proactor_Test_IPV6.cpp
+++ b/tests/Proactor_Test_IPV6.cpp
@@ -90,14 +90,14 @@ static int loglevel; // 0 full , 1 only errors
static size_t xfer_limit; // Number of bytes for Sender to send.
-static char complete_message[] =
- "GET / HTTP/1.1\r\n"
- "Accept: */*\r\n"
- "Accept-Language: C++\r\n"
- "Accept-Encoding: gzip, deflate\r\n"
- "User-Agent: Proactor_Test_IPv6/1.0 (non-compatible)\r\n"
- "Connection: Keep-Alive\r\n"
- "\r\n";
+static ACE_TCHAR complete_message[] =
+ ACE_TEXT ("GET / HTTP/1.1\r\n")
+ ACE_TEXT ("Accept: */*\r\n")
+ ACE_TEXT ("Accept-Language: C++\r\n")
+ ACE_TEXT ("Accept-Encoding: gzip, deflate\r\n")
+ ACE_TEXT ("User-Agent: Proactor_Test_IPv6/1.0 (non-compatible)\r\n")
+ ACE_TEXT ("Connection: Keep-Alive\r\n")
+ ACE_TEXT ("\r\n");
class LogLocker
{
@@ -1737,7 +1737,7 @@ set_proactor_type (const ACE_TCHAR *ptype)
if (!ptype)
return 0;
- switch (ACE_OS::ace_toupper (*ptype))
+ switch (ACE_OS::to_upper (*ptype))
{
case 'D':
proactor_type = DEFAULT;
diff --git a/tests/Process_Manager_Test.cpp b/tests/Process_Manager_Test.cpp
index 27150e6f848..34c3010640e 100644
--- a/tests/Process_Manager_Test.cpp
+++ b/tests/Process_Manager_Test.cpp
@@ -76,16 +76,9 @@ spawn_child (const ACE_TCHAR *argv0,
ACE_Process_Manager &mgr,
int sleep_time = 0)
{
-#if defined (ACE_WIN32)
-const ACE_TCHAR *cmdline_format = ACE_TEXT("\"%s\" %s %d");
-#elif !defined (ACE_USES_WCHAR)
-const ACE_TCHAR *cmdline_format = ACE_TEXT (".") ACE_DIRECTORY_SEPARATOR_STR ACE_TEXT("%s %s %d");
-#else
-const ACE_TCHAR *cmdline_format = ACE_TEXT (".") ACE_DIRECTORY_SEPARATOR_STR ACE_TEXT("%ls %ls %d");
-#endif
ACE_Process_Options opts;
- opts.command_line (cmdline_format,
+ opts.command_line (ACE_TEXT("%s %s %d"),
argv0,
debug_test ? ACE_TEXT ("-d") : ACE_TEXT (""),
sleep_time);
diff --git a/tests/Process_Mutex_Test.cpp b/tests/Process_Mutex_Test.cpp
index 279e1a40b6f..98ae4330f82 100644
--- a/tests/Process_Mutex_Test.cpp
+++ b/tests/Process_Mutex_Test.cpp
@@ -132,11 +132,7 @@ run_main (int argc, ACE_TCHAR *argv[])
// Child process code.
if (child_process)
{
- ACE_TCHAR lognm[MAXPATHLEN];
- int mypid (ACE_OS::getpid ());
- ACE_OS::sprintf(lognm, ACE_TEXT ("Process_Mutex_Test-child-%d"), mypid);
-
- ACE_START_TEST (lognm);
+ ACE_APPEND_LOG (ACE_TEXT("Process_Mutex_Test-children"));
acquire_release ();
ACE_END_LOG;
}
@@ -151,27 +147,20 @@ run_main (int argc, ACE_TCHAR *argv[])
// Process_Mutex shall control the destruction of mutex better.
ACE_Process_Mutex mutex( mutex_name );
# endif
+ ACE_INIT_LOG (ACE_TEXT("Process_Mutex_Test-children"));
ACE_Process_Options options;
if (release_mutex == 0)
options.command_line (ACE_TEXT (".") ACE_DIRECTORY_SEPARATOR_STR
ACE_TEXT ("Process_Mutex_Test")
ACE_PLATFORM_EXE_SUFFIX
-#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- ACE_TEXT (" -c -n %ls -d"),
-#else
ACE_TEXT (" -c -n %s -d"),
-#endif /* !ACE_WIN32 && ACE_USES_WCHAR */
mutex_name);
else
options.command_line (ACE_TEXT (".") ACE_DIRECTORY_SEPARATOR_STR
ACE_TEXT ("Process_Mutex_Test")
ACE_PLATFORM_EXE_SUFFIX
-#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
- ACE_TEXT (" -c -n %ls"),
-#else
ACE_TEXT (" -c -n %s"),
-#endif /* !ACE_WIN32 && ACE_USES_WCHAR */
mutex_name);
// Spawn <n_processes> child processes that will contend for the
diff --git a/tests/Process_Strategy_Test.cpp b/tests/Process_Strategy_Test.cpp
index 46104a724f0..4bba7e29cfa 100644
--- a/tests/Process_Strategy_Test.cpp
+++ b/tests/Process_Strategy_Test.cpp
@@ -680,7 +680,7 @@ run_main (int argc, ACE_TCHAR *argv[])
#if !defined (ACE_LACKS_FORK)
// We're running the client and serve as separate processes.
- pid_t pid = ACE::fork (ACE_TEXT ("child"),
+ pid_t pid = ACE::fork ("child",
1); // Avoid zombies.
switch (pid)
diff --git a/tests/SOCK_Connector_Test.cpp b/tests/SOCK_Connector_Test.cpp
index c59ff63e537..997621ec257 100644
--- a/tests/SOCK_Connector_Test.cpp
+++ b/tests/SOCK_Connector_Test.cpp
@@ -113,20 +113,18 @@ find_another_host (ACE_TCHAR other_host[])
// an infinite loop on Linux --mas 03-08-2001
while ((h = gethostent ()) != NULL)
{
- if (ACE_OS::strcmp (h->h_name,
- ACE_TEXT_ALWAYS_CHAR (ACE_DEFAULT_SERVER_HOST)) == 0)
+ if (ACE_OS::strcmp (h->h_name, ACE_DEFAULT_SERVER_HOST) == 0)
continue;
// AIX just _has_ to be different
if (ACE_OS::strcmp (h->h_name, "loopback") == 0)
continue;
// If not me.
- if (ACE_OS::strcmp
- (h->h_name, ACE_TEXT_ALWAYS_CHAR (other_host)) != 0
+ if (ACE_OS::strcmp (h->h_name, other_host) != 0
&& ACE_OS::strcmp (h->h_name, un.nodename) != 0)
{
ACE_OS::strcpy (candidate[candidate_count].host_name,
- ACE_TEXT_CHAR_TO_TCHAR (h->h_name));
+ h->h_name);
if (++candidate_count >= MAX_CANDIDATES)
break;
}
diff --git a/tests/SOCK_Dgram_Bcast_Test.cpp b/tests/SOCK_Dgram_Bcast_Test.cpp
index 080a4b2cdee..dae49da7afe 100644
--- a/tests/SOCK_Dgram_Bcast_Test.cpp
+++ b/tests/SOCK_Dgram_Bcast_Test.cpp
@@ -119,7 +119,7 @@ int run_receiver ()
ACE_TEXT ("Cannot open broadcast socket")), -1);
}
-#if !defined (ACE_HAS_PROCESS_SPAWN) && defined (ACE_HAS_THREADS)
+#if defined (ACE_LACKS_FORK) && defined (ACE_HAS_THREADS)
/* \brief Thread main function to run run_receiver function
\note run_receiver return valu is stored in receiver_exit_code global variable
*/
@@ -128,7 +128,7 @@ static ACE_THR_FUNC_RETURN run_thread_receiver (void *)
receiver_exit_code = run_receiver ();
return 0;
}
-#endif /* !defined (ACE_HAS_PROCESS_SPAWN) && defined (ACE_HAS_THREADS) */
+#endif /* defined (ACE_LACKS_FORK) && defined (ACE_HAS_THREADS) */
/* \brief Just runs automatic tests
@@ -139,7 +139,7 @@ tries to receive at least one datagram.
*/
int run_auto_test (const ACE_TCHAR *prog_name)
{
-#if defined (ACE_HAS_PROCESS_SPAWN)
+#if !defined (ACE_LACKS_FORK)
ACE_DEBUG ((LM_INFO, ACE_TEXT ("Running auto_tests in process mode\n")));
ACE_Process_Options opts;
@@ -160,7 +160,7 @@ int run_auto_test (const ACE_TCHAR *prog_name)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("Cannot run in auto_test mode without fork or threads.\n")),
-1);
-#endif /* defined (ACE_HAS_PROCESS_SPAWN) */
+#endif /* !defined (ACE_LACKS_FORK) */
ACE_DEBUG ((LM_INFO,
ACE_TEXT ("Sending datagrams on port %d in auto_test mode\n"),
@@ -175,7 +175,7 @@ int run_auto_test (const ACE_TCHAR *prog_name)
{
send_datagram (socket, dgrams_no--);
ACE_Time_Value child_timeout (1);
-#if defined (ACE_HAS_PROCESS_SPAWN)
+#if !defined (ACE_LACKS_FORK)
if (ACE_Process_Manager::instance ()->wait (child_pid,
child_timeout,
diff --git a/tests/SOCK_Dgram_Test.cpp b/tests/SOCK_Dgram_Test.cpp
index 54bbd705204..3f600b18ef2 100644
--- a/tests/SOCK_Dgram_Test.cpp
+++ b/tests/SOCK_Dgram_Test.cpp
@@ -1,4 +1,4 @@
-// $Id$
+// // $Id$
// ===========================================================================
//
// = LIBRARY
@@ -152,7 +152,7 @@ spawn (int proto)
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) started server at port %d\n"),
server_addr.get_port_number ()));
#if !defined (ACE_LACKS_FORK)
- switch (ACE_OS::fork (ACE_TEXT ("child")))
+ switch (ACE_OS::fork ("child"))
{
case -1:
ACE_ERROR ((LM_ERROR,
diff --git a/tests/SOCK_Send_Recv_Test.cpp b/tests/SOCK_Send_Recv_Test.cpp
index 5ceb4ca60c7..8b393e86534 100644
--- a/tests/SOCK_Send_Recv_Test.cpp
+++ b/tests/SOCK_Send_Recv_Test.cpp
@@ -338,7 +338,7 @@ spawn (void)
server_addr.get_port_number ()));
#if !defined (ACE_LACKS_FORK)
- switch (ACE_OS::fork (ACE_TEXT ("child")))
+ switch (ACE_OS::fork ("child"))
{
case -1:
ACE_ERROR ((LM_ERROR,
diff --git a/tests/SOCK_Test.cpp b/tests/SOCK_Test.cpp
index 6472711a857..bbd39ee6748 100644
--- a/tests/SOCK_Test.cpp
+++ b/tests/SOCK_Test.cpp
@@ -226,7 +226,7 @@ spawn (void)
server_addr.get_port_number ()));
#if !defined (ACE_LACKS_FORK)
- switch (ACE_OS::fork (ACE_TEXT ("child")))
+ switch (ACE_OS::fork ("child"))
{
case -1:
ACE_ERROR ((LM_ERROR,
diff --git a/tests/SV_Shared_Memory_Test.cpp b/tests/SV_Shared_Memory_Test.cpp
index 7f22a2da468..9e11ef2d443 100644
--- a/tests/SV_Shared_Memory_Test.cpp
+++ b/tests/SV_Shared_Memory_Test.cpp
@@ -174,7 +174,7 @@ run_main (int, ACE_TCHAR *[])
ACE_ASSERT (parent_synch->open (SEM_KEY_2,
ACE_SV_Semaphore_Complex::ACE_CREATE,
0) != -1);
- switch (ACE_OS::fork (ACE_TEXT ("SV_Shared_Memory_Test.cpp")))
+ switch (ACE_OS::fork ("SV_Shared_Memory_Test.cpp"))
{
case -1:
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/tests/Service_Config_Test.cpp b/tests/Service_Config_Test.cpp
index 6006d661a6f..1a9e4fe7817 100644
--- a/tests/Service_Config_Test.cpp
+++ b/tests/Service_Config_Test.cpp
@@ -122,29 +122,23 @@ run_test (int argc, ACE_TCHAR *argv[])
{
ACE_ARGV new_argv;
-#if defined (ACE_USES_WCHAR)
- // When using full Unicode support, use the version of the Service
- // Configurator file appropriate to the platform.
- // For example, Windows Unicode uses UTF-16.
- //
- // iconv(1) found on Linux and Solaris, for example, can
- // be used to convert between encodings.
- //
- // Byte ordering is also an issue, so we should be
- // generating this file on-the-fly from the UTF-8 encoded
- // file by using functions like iconv(1) or iconv(3).
-# if defined (ACE_WIN32)
const ACE_TCHAR svc_conf[] =
+#if defined (ACE_USES_WCHAR)
+ // When using full Unicode support, use the version of the Service
+ // Configurator file that is UTF-16 encoded.
+ //
+ // @@ Note: Some platforms may want other encoding (e.g. UTF-32).
+ //
+ // iconv(1) found on Linux and Solaris, for example, can
+ // be used to convert between encodings.
+ //
+ // Byte ordering is also an issue, so we should be
+ // generating this file on-the-fly from the UTF-8 encoded
+ // file by using functions like iconv(1) or iconv(3).
ACE_TEXT ("Service_Config_Test.UTF-16")
ACE_TEXT (ACE_DEFAULT_SVC_CONF_EXT);
-# else
- const ACE_TCHAR svc_conf[] =
- ACE_TEXT ("Service_Config_Test.WCHAR_T")
- ACE_TEXT (ACE_DEFAULT_SVC_CONF_EXT);
-# endif /* ACE_WIN32 */
#else
// ASCII (UTF-8) encoded Service Configurator file.
- const ACE_TCHAR svc_conf[] =
ACE_TEXT ("Service_Config_Test")
ACE_TEXT (ACE_DEFAULT_SVC_CONF_EXT);
#endif /* ACE_USES_WCHAR */
diff --git a/tests/Signal_Test.cpp b/tests/Signal_Test.cpp
index c13467e6773..5d8ddda4b1f 100644
--- a/tests/Signal_Test.cpp
+++ b/tests/Signal_Test.cpp
@@ -244,7 +244,7 @@ worker_parent (void *arg)
// Store the parent's process id so we can pass it to the child
// portably. Also, pass the test number, as well.
ACE_OS::sprintf (pid_str,
- ACE_TEXT ("-p %ld -t %d"),
+ "-p %ld -t %d",
ACE_static_cast (long, parent_pid),
test_number);
@@ -370,9 +370,9 @@ run_test (ACE_THR_FUNC worker,
// Parse the command-line arguments and set options.
static void
-parse_args (int argc, ACE_TCHAR *argv[])
+parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("i:chp:t:"));
+ ACE_Get_Opt get_opt (argc, argv, "i:chp:t:");
int c;
diff --git a/tests/TSS_Test.cpp b/tests/TSS_Test.cpp
index a148559c49a..91be070c1fd 100644
--- a/tests/TSS_Test.cpp
+++ b/tests/TSS_Test.cpp
@@ -49,11 +49,7 @@ static u_int errors = 0;
// to be available.
static const int ITERATIONS = 1;
#else
- // POSIX requires at least _POSIX_THREAD_KEYS_MAX (128) keys. 25
- // iterations with 4 worker threads should be sufficient to check
- // the TSS wrappers without exceeding the minimum requirements.
-
- static const int ITERATIONS = 25;
+ static const int ITERATIONS = 100;
#endif /* ACE_DEFAULT_THREAD_KEYS */
// Static variables.
diff --git a/tests/Test_Output.cpp b/tests/Test_Output.cpp
index ca52863c3b7..4d4171f13be 100644
--- a/tests/Test_Output.cpp
+++ b/tests/Test_Output.cpp
@@ -18,7 +18,6 @@
#include "tests/test_config.h"
#include "ace/OS_NS_stdio.h"
-#include "ace/OS_NS_string.h"
#include "ace/OS_NS_sys_stat.h"
#include "ace/Guard_T.h"
#include "ace/Object_Manager.h"
@@ -75,32 +74,18 @@ ACE_Test_Output::set_output (const ACE_TCHAR *filename, int append)
const ACE_TCHAR *test_dir;
#if !defined (ACE_HAS_WINCE)
-# if defined (ACE_WIN32) || !defined (ACE_USES_WCHAR)
test_dir = ACE_OS::getenv (ACE_TEXT ("ACE_TEST_DIR"));
-# else
- ACE_TCHAR tempenv[MAXPATHLEN];
- char *test_dir_n = ACE_OS::getenv ("ACE_TEST_DIR");
- if (test_dir_n == 0)
- test_dir = 0;
- else
- {
- ACE_OS::strcpy (tempenv, ACE_TEXT_CHAR_TO_TCHAR (test_dir_n));
- test_dir = tempenv;
- }
-# endif /* ACE_WIN32 || !ACE_USES_WCHAR */
if (test_dir == 0)
#endif /* ACE_HAS_WINCE */
test_dir = ACE_TEXT ("");
- // This could be done with ACE_OS::sprintf() but it requires different
- // format strings for wide-char POSIX vs. narrow-char POSIX and Windows.
- // Easier to keep straight like this.
- ACE_OS_String::strcpy (temp, test_dir);
- ACE_OS_String::strcat (temp, ACE_LOG_DIRECTORY);
- ACE_OS_String::strcat
- (temp, ACE::basename (filename, ACE_DIRECTORY_SEPARATOR_CHAR));
- ACE_OS_String::strcat (temp, ACE_LOG_FILE_EXT_NAME);
+ ACE_OS::sprintf (temp,
+ ACE_TEXT ("%s%s%s%s"),
+ test_dir,
+ ACE_LOG_DIRECTORY,
+ ACE::basename (filename, ACE_DIRECTORY_SEPARATOR_CHAR),
+ ACE_LOG_FILE_EXT_NAME);
#if defined (VXWORKS)
// This is the only way I could figure out to avoid a console
diff --git a/tests/run_test.pl b/tests/run_test.pl
index 4393a012876..2602d6a4dca 100755
--- a/tests/run_test.pl
+++ b/tests/run_test.pl
@@ -120,10 +120,8 @@ sub run_program ($)
}
}
- print "auto_run_tests: tests/$program\n";
- my $start_time = time();
+ print STDERR "Running $program\n";
$status = $P->SpawnWaitKill (400);
- my $time = time() - $start_time;
### Check for problems
@@ -136,8 +134,6 @@ sub run_program ($)
print STDERR "Error: $program FAILED with exit status $status\n";
}
- print "\nauto_run_tests_finished: test/$program Time:$time"."s Result:$status\n";
-
check_log ($program);
if ($config_list->check_config ('Codeguard')) {
diff --git a/tests/test_config.h b/tests/test_config.h
index 74e6934f5da..f8e0c38ed85 100644
--- a/tests/test_config.h
+++ b/tests/test_config.h
@@ -120,14 +120,9 @@ const size_t ACE_MAX_THREADS = 4;
# define ACE_MAIN ace_main
#endif /* ghs */
#else /* ! VXWORKS */
-# if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
-# define ACE_INIT_LOG_FMT ACE_TEXT ("%ls%ls%ls")
-# else
-# define ACE_INIT_LOG_FMT ACE_TEXT ("%s%s%s")
-# endif /* !ACE_WIN32 && ACE_USES_WCHAR */
#define ACE_INIT_LOG(NAME) \
ACE_TCHAR temp[MAXPATHLEN]; \
- ACE_OS::sprintf (temp, ACE_INIT_LOG_FMT, \
+ ACE_OS::sprintf (temp, ACE_TEXT ("%s%s%s"), \
ACE_LOG_DIRECTORY, \
ACE::basename (NAME, ACE_DIRECTORY_SEPARATOR_CHAR), \
ACE_LOG_FILE_EXT_NAME); \