BIND 10 experiments/fix-dhcp-test, updated. 2acf5b5eaa615c6fb6d4015424ed89734b6b6808 [experiments/fix-dhcp-test] disable test completely

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Oct 25 20:17:59 UTC 2012


The branch, experiments/fix-dhcp-test has been updated
       via  2acf5b5eaa615c6fb6d4015424ed89734b6b6808 (commit)
      from  296e119946e9fb8d6eebdabf6eb166f47c47fbd0 (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 2acf5b5eaa615c6fb6d4015424ed89734b6b6808
Author: Jelte Jansen <jelte at isc.org>
Date:   Thu Oct 25 22:17:45 2012 +0200

    [experiments/fix-dhcp-test] disable test completely

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

Summary of changes:
 src/bin/dhcp6/tests/dhcp6_test.py |   37 ++++++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 17 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/dhcp6/tests/dhcp6_test.py b/src/bin/dhcp6/tests/dhcp6_test.py
index f3099b9..949d7b4 100644
--- a/src/bin/dhcp6/tests/dhcp6_test.py
+++ b/src/bin/dhcp6/tests/dhcp6_test.py
@@ -89,6 +89,16 @@ class TestDhcpv6Daemon(unittest.TestCase):
         fl = fcntl.fcntl(fd, fcntl.F_GETFL)
         fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)
 
+        try:
+            if (not pi.process.poll()):
+                # let's be nice at first...
+                pi.process.terminate()
+        except OSError:
+            print("Ignoring failed kill attempt. Process is dead already.")
+
+        # call this to get returncode, process should be dead by now
+        rc = pi.process.wait()
+
         # There's potential problem if b10-dhcp4 prints out more
         # than 16k of text
         try:
@@ -111,21 +121,14 @@ class TestDhcpv6Daemon(unittest.TestCase):
         if (error is None):
             error = ""
 
-        try:
-            if (not pi.process.poll()):
-                # let's be nice at first...
-                pi.process.terminate()
-        except OSError:
-            print("Ignoring failed kill attempt. Process is dead already.")
-
-        # call this to get returncode, process should be dead by now
-        rc = pi.process.wait()
 
         # Clean up our stdout/stderr munging.
         os.dup2(self.stdout_old, sys.stdout.fileno())
+        os.close(self.stdout_old)
         os.close(self.stdout_pipes[0])
 
         os.dup2(self.stderr_old, sys.stderr.fileno())
+        os.close(self.stderr_old)
         os.close(self.stderr_pipes[0])
 
         print ("Process finished, return code=%d, stdout=%d bytes, stderr=%d bytes"
@@ -133,9 +136,9 @@ class TestDhcpv6Daemon(unittest.TestCase):
 
         return (rc, output, error)
 
-    def test_alive(self):
+    def DISABLED_test_alive(self):
         """
-        Simple test. Checks that b10-dhcp6 can be started and prints out info 
+        Simple test. Checks that b10-dhcp6 can be started and prints out info
         about starting DHCPv6 operation.
         """
         print("Note: Purpose of some of the tests is to check if DHCPv6 server can be started,")
@@ -144,7 +147,7 @@ class TestDhcpv6Daemon(unittest.TestCase):
         output_text = str(output) + str(error)
         self.assertEqual(output_text.count("DHCP6_STARTING"), 1)
 
-    def test_portnumber_0(self):
+    def DISABLED_test_portnumber_0(self):
         print("Check that specifying port number 0 is not allowed.")
 
         (returncode, output, error) = self.runCommand(['../b10-dhcp6', '-p', '0'])
@@ -155,7 +158,7 @@ class TestDhcpv6Daemon(unittest.TestCase):
         # Check that there is an error message about invalid port number printed on stderr
         self.assertEqual( str(error).count("Failed to parse port number"), 1)
 
-    def test_portnumber_missing(self):
+    def DISABLED_test_portnumber_missing(self):
         print("Check that -p option requires a parameter.")
 
         (returncode, output, error) = self.runCommand(['../b10-dhcp6', '-p'])
@@ -166,7 +169,7 @@ class TestDhcpv6Daemon(unittest.TestCase):
         # Check that there is an error message about invalid port number printed on stderr
         self.assertEqual( str(error).count("option requires an argument"), 1)
 
-    def test_portnumber_invalid1(self):
+    def DISABLED_test_portnumber_invalid1(self):
         print("Check that -p option is check against bogus port number (999999).")
 
         (returncode, output, error) = self.runCommand(['../b10-dhcp6', '-p','999999'])
@@ -177,7 +180,7 @@ class TestDhcpv6Daemon(unittest.TestCase):
         # Check that there is an error message about invalid port number printed on stderr
         self.assertEqual( str(error).count("Failed to parse port number"), 1)
 
-    def test_portnumber_invalid2(self):
+    def DISABLED_test_portnumber_invalid2(self):
         print("Check that -p option is check against bogus port number (123garbage).")
 
         (returncode, output, error) = self.runCommand(['../b10-dhcp6', '-p','123garbage'])
@@ -188,7 +191,7 @@ class TestDhcpv6Daemon(unittest.TestCase):
         # Check that there is an error message about invalid port number printed on stderr
         self.assertEqual( str(error).count("Failed to parse port number"), 1)
 
-    def test_portnumber_nonroot(self):
+    def DISABLED_test_portnumber_nonroot(self):
         print("Check that specifying unprivileged port number will work.")
 
         # Check that there is a message about running with an unprivileged port
@@ -196,7 +199,7 @@ class TestDhcpv6Daemon(unittest.TestCase):
         output_text = str(output) + str(error)
         self.assertEqual(output_text.count("DHCP6_OPEN_SOCKET opening sockets on port 10547"), 1)
 
-    def test_skip_msgq(self):
+    def DISABLED_test_skip_msgq(self):
         print("Check that connection to BIND10 msgq can be disabled.")
 
         # Check that the system outputs a message on one of its streams about running



More information about the bind10-changes mailing list