[bind10-dev] unit test problems
Jeremy C. Reed
jreed at isc.org
Tue Aug 17 14:39:49 UTC 2010
The distcheck has failed for over a day. I sent a different email about
that. This email discusses four other issues. I only have a fix included
below for one of them.
1)
Making check in config
Making check in .
make check-TESTS
==================
All 0 tests passed
==================
This is misleading. And it led me to a potential bug: the Makefile would
exclude possible tests. Here is my proposed patch for /src/lib/config:
Index: Makefile.am
===================================================================
--- Makefile.am (revision 2744)
+++ Makefile.am (working copy)
@@ -1,3 +1,5 @@
+SUBDIRS = . tests
+
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_builddir)/src/lib/cc
AM_CXXFLAGS = $(B10_CXXFLAGS) -Wno-strict-aliasing
@@ -7,11 +9,6 @@
CLEANFILES = *.gcno *.gcda
-TESTS =
-if HAVE_GTEST
-SUBDIRS = . tests
-endif
-
EXTRA_DIST = testdata/b10-config-bad1.db
EXTRA_DIST += testdata/b10-config-bad2.db
EXTRA_DIST += testdata/b10-config-bad3.db
2)
Running test: ccsession_test.py
.........................
----------------------------------------------------------------------
Ran 25 tests in 0.038s
OK
[Spec2] Error requesting configuration: just an error
What does "just an error mean"?
3)
Running test: bindctl_test.py
.................
----------------------------------------------------------------------
Ran 17 tests in 0.041s
OK
Error reading saved username and password from ./csv_file.csv: list
index out of range
Error: Module 'foo' unknown or not running
Resulted with OK but had that "Error" output.
4)
Running test: xfrin_test.py
.[b10-xfrin] test error
[b10-xfrin] Error happened! is the command channel daemon running?
.[b10-xfrin] test exception
.[b10-xfrin] exit b10-xfrin
.[b10-xfrin] bad format for zone's master: {'master_port': 53,
'master_addr': '1111.1.1.1'}
[b10-xfrin] bad format for zone's master: {'master_port': 530000,
'master_addr': '2.2.2.2'}
....[b10-xfrin] error happened for command: retransfer, failed to
resolve master address/port=invalid/53535: [Errno 8] node name or
service name not known
................................................
----------------------------------------------------------------------
Ran 56 tests in 0.334s
OK
All types of error and error-like output above, but still resulting in
OK.
More information about the bind10-dev
mailing list