Skip to content

Check for test interfaces before running system tests

This MR prevents runall.sh and make test from flooding the user with error messages if ifconfig.sh up has not been run beforehand.

This MR should be merged to master once !7 (merged) gets merged as it builds on top of the latter.

Before:

$ sh runall.sh 
making all in /tmp/bind9/bin/tests/system/dlzexternal
make[1]: Entering directory '/tmp/bind9/bin/tests/system/dlzexternal'
make[1]: Leaving directory '/tmp/bind9/bin/tests/system/dlzexternal'
making all in /tmp/bind9/bin/tests/system/dyndb
make[1]: Entering directory '/tmp/bind9/bin/tests/system/dyndb'
making all in /tmp/bind9/bin/tests/system/dyndb/driver
make[2]: Entering directory '/tmp/bind9/bin/tests/system/dyndb/driver'
make[2]: Leaving directory '/tmp/bind9/bin/tests/system/dyndb/driver'
make[1]: Leaving directory '/tmp/bind9/bin/tests/system/dyndb'
making all in /tmp/bind9/bin/tests/system/pipelined
make[1]: Entering directory '/tmp/bind9/bin/tests/system/pipelined'
make[1]: Leaving directory '/tmp/bind9/bin/tests/system/pipelined'
making all in /tmp/bind9/bin/tests/system/rndc
make[1]: Entering directory '/tmp/bind9/bin/tests/system/rndc'
make[1]: Leaving directory '/tmp/bind9/bin/tests/system/rndc'
making all in /tmp/bind9/bin/tests/system/rpz
make[1]: Entering directory '/tmp/bind9/bin/tests/system/rpz'
make[1]: Leaving directory '/tmp/bind9/bin/tests/system/rpz'
making all in /tmp/bind9/bin/tests/system/rsabigexponent
make[1]: Entering directory '/tmp/bind9/bin/tests/system/rsabigexponent'
make[1]: Leaving directory '/tmp/bind9/bin/tests/system/rsabigexponent'
making all in /tmp/bind9/bin/tests/system/tkey
make[1]: Entering directory '/tmp/bind9/bin/tests/system/tkey'
make[1]: Leaving directory '/tmp/bind9/bin/tests/system/tkey'
make[1]: Entering directory '/tmp/bind9/bin/tests/system'
S:allow_query:Mon Jan 29 21:35:10 CET 2018
T:allow_query:1:A
A:allow_query:System test allow_query
I:allow_query:PORTRANGE:5000 - 5099
testsock.pl: bind(10.53.0.1, 5000): Cannot assign requested address
I:allow_query:Network interface aliases not set up.  Skipping test.
R:allow_query:UNTESTED
E:allow_query:Mon Jan 29 21:35:10 CET 2018
S:catz:Mon Jan 29 21:35:10 CET 2018
T:catz:1:A
A:catz:System test catz
I:catz:PORTRANGE:5100 - 5199
testsock.pl: bind(10.53.0.1, 5100): Cannot assign requested address
I:catz:Network interface aliases not set up.  Skipping test.
R:catz:UNTESTED
E:catz:Mon Jan 29 21:35:10 CET 2018
S:rpzrecurse:Mon Jan 29 21:35:10 CET 2018
T:rpzrecurse:1:A
A:rpzrecurse:System test rpzrecurse
I:rpzrecurse:PORTRANGE:5200 - 5299
testsock.pl: bind(10.53.0.1, 5200): Cannot assign requested address
I:rpzrecurse:Network interface aliases not set up.  Skipping test.
R:rpzrecurse:UNTESTED
E:rpzrecurse:Mon Jan 29 21:35:10 CET 2018
S:serve-stale:Mon Jan 29 21:35:10 CET 2018
T:serve-stale:1:A
A:serve-stale:System test serve-stale
I:serve-stale:PORTRANGE:5300 - 5399
testsock.pl: bind(10.53.0.1, 5300): Cannot assign requested address
I:serve-stale:Network interface aliases not set up.  Skipping test.
R:serve-stale:UNTESTED
E:serve-stale:Mon Jan 29 21:35:10 CET 2018
make[1]: Leaving directory '/tmp/bind9/bin/tests/system'
S:acl:Mon Jan 29 21:35:10 CET 2018
T:acl:1:A
A:acl:System test acl
I:acl:PORTRANGE:5300 - 5399
testsock.pl: bind(10.53.0.1, 5300): Cannot assign requested address
I:acl:Network interface aliases not set up.  Skipping test.
R:acl:UNTESTED
E:acl:Mon Jan 29 21:35:10 CET 2018
S:additional:Mon Jan 29 21:35:10 CET 2018
T:additional:1:A
A:additional:System test additional
I:additional:PORTRANGE:5300 - 5399
testsock.pl: bind(10.53.0.1, 5300): Cannot assign requested address
I:additional:Network interface aliases not set up.  Skipping test.
R:additional:UNTESTED
E:additional:Mon Jan 29 21:35:10 CET 2018
S:addzone:Mon Jan 29 21:35:10 CET 2018
T:addzone:1:A
A:addzone:System test addzone
I:addzone:PORTRANGE:5300 - 5399
testsock.pl: bind(10.53.0.1, 5300): Cannot assign requested address
I:addzone:Network interface aliases not set up.  Skipping test.
R:addzone:UNTESTED
E:addzone:Mon Jan 29 21:35:10 CET 2018
S:autosign:Mon Jan 29 21:35:10 CET 2018
T:autosign:1:A
A:autosign:System test autosign
I:autosign:PORTRANGE:5300 - 5399
testsock.pl: bind(10.53.0.1, 5300): Cannot assign requested address
I:autosign:Network interface aliases not set up.  Skipping test.
R:autosign:UNTESTED
E:autosign:Mon Jan 29 21:35:10 CET 2018
(...)
testsock.pl: bind(10.53.0.1, 0): Cannot assign requested address
I:NOTE: System tests were skipped because they require that the
I:      IP addresses 10.53.0.1 through 10.53.0.8 be configured
I:      as alias addresses on the loopback interface.  Please run
I:      "bin/tests/system/ifconfig.sh up" as root to configure them.
I:System test result summary:
I:     91 UNTESTED

After:

$ sh runall.sh 
making all in /tmp/bind9/bin/tests/system/dlzexternal
make[1]: Entering directory '/tmp/bind9/bin/tests/system/dlzexternal'
make[1]: Leaving directory '/tmp/bind9/bin/tests/system/dlzexternal'
making all in /tmp/bind9/bin/tests/system/dyndb
make[1]: Entering directory '/tmp/bind9/bin/tests/system/dyndb'
making all in /tmp/bind9/bin/tests/system/dyndb/driver
make[2]: Entering directory '/tmp/bind9/bin/tests/system/dyndb/driver'
make[2]: Leaving directory '/tmp/bind9/bin/tests/system/dyndb/driver'
make[1]: Leaving directory '/tmp/bind9/bin/tests/system/dyndb'
making all in /tmp/bind9/bin/tests/system/pipelined
make[1]: Entering directory '/tmp/bind9/bin/tests/system/pipelined'
make[1]: Leaving directory '/tmp/bind9/bin/tests/system/pipelined'
making all in /tmp/bind9/bin/tests/system/rndc
make[1]: Entering directory '/tmp/bind9/bin/tests/system/rndc'
make[1]: Leaving directory '/tmp/bind9/bin/tests/system/rndc'
making all in /tmp/bind9/bin/tests/system/rpz
make[1]: Entering directory '/tmp/bind9/bin/tests/system/rpz'
make[1]: Leaving directory '/tmp/bind9/bin/tests/system/rpz'
making all in /tmp/bind9/bin/tests/system/rsabigexponent
make[1]: Entering directory '/tmp/bind9/bin/tests/system/rsabigexponent'
make[1]: Leaving directory '/tmp/bind9/bin/tests/system/rsabigexponent'
making all in /tmp/bind9/bin/tests/system/tkey
make[1]: Entering directory '/tmp/bind9/bin/tests/system/tkey'
make[1]: Leaving directory '/tmp/bind9/bin/tests/system/tkey'
I:NOTE: System tests were skipped because they require that the
I:      IP addresses 10.53.0.1 through 10.53.0.8 be configured
I:      as alias addresses on the loopback interface.  Please run
I:      "bin/tests/system/ifconfig.sh up" as root to configure them.
make: *** [Makefile:467: test] Error 1
Edited by Ondřej Surý

Merge request reports