checkds test fails if Python < 3.7
Summary
If Python version is less than 3.7 and the dnspython module is installed, the checkds test fails with a Python error.
BIND version used
9.16.22
Steps to reproduce
Python version is 3.6 dnspython module is installed
./configure --prefix=/usr --sysconfdir=/etc --enable-static --localstatedir=/var --with-python=/usr/bin/python3.6
make -j $(nproc)
sudo bin/tests/system/ifconfig.sh up
make check
What is the current bug behavior?
The test fails with a Python error. See attached log.
What is the expected correct behavior?
The test succeeds, or at least doesn't have a Python error.
Relevant configuration files
Relevant logs and/or screenshots
See attached log of checkds test output. checkds.log
Possible fixes
The cause of the error is this line: bin/tests/system/checkds/tests-checkds.py#L78
The capture_output
argument of the subprocess.run
function was added in Python 3.7. Older versions of Python will fail with the error TypeError: __init__() got an unexpected keyword argument 'capture_output'
as seen in the attached log.
A possible fix is to add an additional prerequisite check for the Python version being 3.7 or greater.