myserver-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9_2-2-g5


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9_2-2-g55f8bc1
Date: Tue, 16 Feb 2010 12:11:45 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  55f8bc1720d6423c53a6d2434441372ca0768d0c (commit)
       via  f73d12eff0e4dcababb077e8a72b468944b2d155 (commit)
      from  ec4ba561117523370b425485cddead9a48799c0c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 55f8bc1720d6423c53a6d2434441372ca0768d0c
Author: Giuseppe Scrivano <address@hidden>
Date:   Tue Feb 16 12:22:02 2010 +0100

    TestHomeDir::testGetAdmin passes if the user is not found.
    
    Reported by: Ludovic Courtès <address@hidden>

diff --git a/myserver/tests/test_homedir.cpp b/myserver/tests/test_homedir.cpp
index fa3f36b..612752e 100644
--- a/myserver/tests/test_homedir.cpp
+++ b/myserver/tests/test_homedir.cpp
@@ -17,11 +17,14 @@
 
 #include "myserver.h"
 #include <include/base/home_dir/home_dir.h>
+#include <include/base/file/files_utility.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
 #include <cppunit/extensions/HelperMacros.h>
 
+#include <errno.h>
+
 class TestHomeDir : public CppUnit::TestFixture
 {
   CPPUNIT_TEST_SUITE ( TestHomeDir );
@@ -60,7 +63,24 @@ public:
 #endif
     string dir;
 
-    CPPUNIT_ASSERT_EQUAL (homeDir->getHomeDir (username, dir), 0);
+#if !WIN32
+    errno = 0;
+#endif
+
+    int ret = homeDir->getHomeDir (username, dir);
+
+    /* FIXME: handle this case in homeDir::getHomeDir.  */
+#if GETPWNAM
+    /* If the user could not be found, silently return.  */
+    if (ret && (errno == ENOENT || errno == ESRCH || errno == EBADF
+                || errno == EPERM))
+      return;
+#elif !WIN32
+    if (! FilesUtility::fileExists ("/etc/passwd"))
+      return;
+#endif
+
+    CPPUNIT_ASSERT_EQUAL (ret, 0);
 
     CPPUNIT_ASSERT (dir.length ());
 



commit f73d12eff0e4dcababb077e8a72b468944b2d155
Author: Ludovic Courtès <address@hidden>
Date:   Tue Feb 16 12:02:28 2010 +0100

    Avoid a DNS lookup.  Now TestSocket::testRecv works in a chroot.

diff --git a/myserver/THANKS b/myserver/THANKS
index 0f74f08..3d11452 100644
--- a/myserver/THANKS
+++ b/myserver/THANKS
@@ -5,4 +5,5 @@ or if you'd prefer a different address be used, please send a 
note to
 the bug mailing list.
 
 Renato Nunes Bastos                 <address@hidden>
+Ludovic Courtès                     <address@hidden>
 Debarshi Ray                        <address@hidden>
diff --git a/myserver/tests/test_socket.cpp b/myserver/tests/test_socket.cpp
index 34b15c7..326917c 100644
--- a/myserver/tests/test_socket.cpp
+++ b/myserver/tests/test_socket.cpp
@@ -178,7 +178,7 @@ static DEFINE_THREAD (testRecvClient, pParam)
     {
       int ret;
       Socket *obj2 = new Socket;
-      char host[] = "localhost";
+      char host[] = "127.0.0.1";
 
       ret = obj2->socket (AF_INET, SOCK_STREAM, 0);
       CPPUNIT_ASSERT (ret != -1);

-----------------------------------------------------------------------

Summary of changes:
 myserver/THANKS                 |    1 +
 myserver/tests/test_homedir.cpp |   22 +++++++++++++++++++++-
 myserver/tests/test_socket.cpp  |    2 +-
 3 files changed, 23 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU MyServer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]