summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-12-20 17:11:33 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-12-20 17:11:33 +0000
commitfa80538e698b0f387cbc1abbace3beace7add8cf (patch)
tree3041349959958c5395884f644a9df3fe7c90304a
parentccdd30530f35b22c5f6c5f787c8e516d45eebe0b (diff)
downloadATCD-fa80538e698b0f387cbc1abbace3beace7add8cf.tar.gz
*** empty log message ***
-rw-r--r--ChangeLog-98a8
-rw-r--r--tests/IOStream_Test.cpp23
-rw-r--r--tests/Process_Mutex_Test.cpp2
-rw-r--r--tests/test_config.h2
4 files changed, 24 insertions, 11 deletions
diff --git a/ChangeLog-98a b/ChangeLog-98a
index 514b1049547..aada630d724 100644
--- a/ChangeLog-98a
+++ b/ChangeLog-98a
@@ -1,3 +1,11 @@
+Sat Dec 20 11:05:45 1997 Douglas C. Schmidt <schmidt@flamenco.cs.wustl.edu>
+
+ * tests/test_config.h (ACE_INIT_LOG): Added (%P|%t) to an
+ ACE_DEBUG statement to make it consistent.
+
+ * tests/IOStream_Test.cpp (spawn): Revised the test so that it
+ prints data correctly to the child processes.
+
Sat Dec 20 09:42:06 1997 David L. Levine <levine@cs.wustl.edu>
* ace/OS.h: changed ACE_SEH_FINALLY to be if (1) on Unix, not
diff --git a/tests/IOStream_Test.cpp b/tests/IOStream_Test.cpp
index a51dc7e5a3b..a0c182409ef 100644
--- a/tests/IOStream_Test.cpp
+++ b/tests/IOStream_Test.cpp
@@ -126,6 +126,7 @@ ACE_SOCK_IOStream &
operator<< (ACE_SOCK_IOStream &stream, qchar *buf)
{
stream.put ('"');
+
while (*buf)
{
if (*buf == '"')
@@ -133,6 +134,7 @@ operator<< (ACE_SOCK_IOStream &stream, qchar *buf)
stream.put ((char) *buf++);
}
+
stream.put ('"');
return stream;
@@ -261,10 +263,10 @@ static void *
server (void *arg = 0)
{
// We don't _need_ to dynamically allocate the ACE_SOCK_IOStream.
- // But if we don't, it doesn't get destroyed on some platforms, e.g.,
- // g++ 2.7.2.1 and Sun C++ 4.2 on Solaris 2.5.1. (It does work on
- // Linux, so the code seems fine.) If we manage the
- // storage ourselves, we _will_ destroy it at the end of this function.
+ // But if we don't, it doesn't get destroyed on some platforms,
+ // e.g., g++ 2.7.2.1 and Sun C++ 4.2 on Solaris 2.5.1. (It does
+ // work on Linux, so the code seems fine.) If we manage the storage
+ // ourselves, we _will_ destroy it at the end of this function.
ACE_SOCK_IOStream client_handler;
ACE_INET_Addr server_addr;
@@ -292,6 +294,7 @@ server (void *arg = 0)
qchar qbuf[BUFSIZ];
ACE_OS::memset (qbuf, 0, sizeof qbuf);
client_handler >> qbuf;
+
ACE_DEBUG ((LM_DEBUG,
"(%P|%t) Server Received: (\"%s\")\n",
qbuf));
@@ -311,10 +314,9 @@ server (void *arg = 0)
(buf.length() == 0 || buf[buf.length() - 1] != '"'))
{
client_handler >> buf;
- if (buf.length() > 0)
- {
- ACE_DEBUG ((LM_DEBUG, "%s ", buf.c_str()));
- }
+
+ if (buf.length() > 0)
+ ACE_DEBUG ((LM_DEBUG, "%s ", buf.c_str()));
}
ACE_DEBUG ((LM_DEBUG, ")\n"));
@@ -403,12 +405,14 @@ spawn (void)
ACE_OS::_exit (-1);
case 0: // In child
{
+ ACE_APPEND_LOG ("Process_Mutex_Test-children");
ACE_INET_Addr server_addr;
if (acceptor.get_local_addr (server_addr) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "get_local_addr"), -1);
+ ACE_ERROR ((LM_ERROR, "%p\n", "get_local_addr"));
else
client ((void *) &server_addr);
+ ACE_END_LOG;
break;
}
default: // In parent
@@ -436,6 +440,7 @@ main (int, char *[])
ACE_START_TEST ("IOStream_Test");
#if !defined (ACE_LACKS_ACE_IOSTREAM)
+ ACE_INIT_LOG ("IOStream_Test-children");
spawn ();
#else
ACE_ERROR ((LM_ERROR, "ACE_IOSTREAM not supported on this platform\n"));
diff --git a/tests/Process_Mutex_Test.cpp b/tests/Process_Mutex_Test.cpp
index f53522b730f..d14d55cce07 100644
--- a/tests/Process_Mutex_Test.cpp
+++ b/tests/Process_Mutex_Test.cpp
@@ -90,7 +90,7 @@ main (int argc, char *argv[])
{
ACE_APPEND_LOG ("Process_Mutex_Test-children");
acquire_release ();
- ACE_END_LOG;
+ ACE_END_LOG;
}
else
{
diff --git a/tests/test_config.h b/tests/test_config.h
index 9895feeb9b9..e71870abfd2 100644
--- a/tests/test_config.h
+++ b/tests/test_config.h
@@ -121,7 +121,7 @@ typedef size_t KEY;
ACE_LOG_DIRECTORY_A, \
ACE::basename (NAME, ACE_DIRECTORY_SEPARATOR_CHAR_A), \
".log"); \
- ACE_DEBUG ((LM_DEBUG, "Deleting old log file %s (if any)\n\n", temp)); \
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) Deleting old log file %s (if any)\n\n", temp)); \
ACE_OS::unlink (temp);
const int ACE_NS_MAX_ENTRIES = 1000;