BIND 10 master, updated. 8244c9cb7152aa47be60e0f86f02289fd67a6239 [master] Workaround for the FreeBSD bug resulting in IfaceMgr test failure
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu May 23 14:40:59 UTC 2013
The branch, master has been updated
via 8244c9cb7152aa47be60e0f86f02289fd67a6239 (commit)
from 12164374c127f1e9484c63f2f365ff7395768599 (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 8244c9cb7152aa47be60e0f86f02289fd67a6239
Author: Marcin Siodelski <marcin at isc.org>
Date: Thu May 23 16:29:59 2013 +0200
[master] Workaround for the FreeBSD bug resulting in IfaceMgr test failure
This disables the test to receive data over a closed socket on BSD systems.
The 8.1-RELEASE version of FreeBSD has a bug which causes select() not to
return EBADF error code when invalid socket descriptor is provided. The
bug number is kern/155606.
-----------------------------------------------------------------------
Summary of changes:
src/lib/dhcp/tests/iface_mgr_unittest.cc | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/dhcp/tests/iface_mgr_unittest.cc b/src/lib/dhcp/tests/iface_mgr_unittest.cc
index cecd945..800f5e1 100644
--- a/src/lib/dhcp/tests/iface_mgr_unittest.cc
+++ b/src/lib/dhcp/tests/iface_mgr_unittest.cc
@@ -862,10 +862,30 @@ TEST_F(IfaceMgrTest, sendReceive4) {
// assume the one or the other will always be chosen for sending data. We should
// skip checking source port of sent address.
- // try to receive data over the closed socket. Closed socket's descriptor is
- // still being hold by IfaceMgr which will try to use it to receive data.
+ // Close the socket. Further we will test if errors are reported
+ // properly on attempt to use closed soscket.
close(socket1);
+
+// Warning: kernel bug on FreeBSD. The following code checks that attempt to
+// read through invalid descriptor will result in exception. The reason why
+// this failure is expected is that select() function should result in EBADF
+// error when invalid descriptor is passed to it. In particular, closed socket
+// descriptor is invalid. On the following OS:
+//
+// 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010
+//
+// calling select() using invalid descriptor results in timeout and eventually
+// value of 0 is returned. This has been identified and reported as a bug in
+// FreeBSD: http://www.freebsd.org/cgi/query-pr.cgi?pr=155606
+//
+// @todo: This part of the test is currently disabled on all BSD systems as it was
+// the quick fix. We need a more elegant (config-based) solution to disable
+// this check on affected systems only. The ticket has been submited for this
+// work: http://bind10.isc.org/ticket/2971
+#ifndef OS_BSD
EXPECT_THROW(ifacemgr->receive4(10), SocketReadError);
+#endif
+
EXPECT_THROW(ifacemgr->send(sendPkt), SocketWriteError);
}
More information about the bind10-changes
mailing list