2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

15 Commits

Author SHA1 Message Date
Mark Andrews
3651c58a6a Capture the resolver's startup and shutdown logging
Also set the debugging to 99.
2024-02-07 11:29:47 +11:00
Michał Kępień
00003e497c Simplify use of RNDC in Python-based tests
The "addzone" and "shutdown" system tests currently invoke rndc using
test-specific helper code.  Rework the relevant bits of those tests so
that they use the helper classes from bin/tests/system/isctest.py.
2023-12-21 18:10:15 +00:00
Tom Krizek
168dba163c
Rename system test directory with common files to _common
The old name "common" clashes with the convention of system test
directory naming. It appears as a system test directory, but it only
contains helper files.

To reduce confusion and to allow automatic detection of issues with
possibly missing test files, rename the helper directory to "_common".
The leading underscore indicates the directory is different and the its
name can no longer be confused with regular system test directories.
2023-09-19 13:29:27 +02:00
Michał Kępień
2b0bade81c
Fix typo in tests_shutdown.py 2023-07-06 15:38:48 +02:00
Tom Krizek
5f85f63bf1
Mark the test_named_shutdown[rndc] test as xfail
It is currently affected by #4060, making the unstable as it
occassionally fails.
2023-07-04 12:58:16 +02:00
Tom Krizek
ceed694659
Use timeout for rndc status in shutdown test
Pass 5 second timeout to the rndc status command(s) to avoid hitting the
hard 10 second timeout from subprocess.call, which would result in an
unwanted exception that would only mask the real issue: if the rndc
status times out in this test, it is likely due to the server not
stopping as it should.
2023-07-04 12:58:16 +02:00
Tom Krizek
603c58ee28
Split shutdown test into separate test cases
The shutdown test attempts to shut down the server using two different
methods - rndc and sigterm. Use pytest.mark.parametrize to run these as
separate test cases for easier identification of failures.
2023-07-04 12:58:14 +02:00
Tom Krizek
dee49b7a1f
Replace dnspython resolver.query with resolver.resolve
The resolver.query() has been deprecated in favor of resolver.resolve();
used that.

This is an omission from 3b1756d45012a66f08693c17145a8484ec68bd47
2023-05-10 10:56:36 +02:00
Tom Krizek
836e6ed284
Ensure named always terminates in the shutdown test
Previously, if an exception would happen inside the `with` block, the
error handler would wait indefinitely for the process to end. That would
never happen, since the termination signal was never sent to named and
the test would get stuck.

Using the try-finally block ensures that the named process is always
killed and any exception or errors will be handled gracefully.
2023-05-10 10:56:22 +02:00
Tom Krizek
9d64f1c1ed
Refactor shutdown test into more helper functions
Improve code readability by splitting the test into more functions. Some
could be re-used later on for more general-purpose subprocess handling
or named checks.
2023-05-10 10:56:19 +02:00
Ondřej Surý
54a3f09c8f
Bump the requirement in the shutdown test to dnspython 2.0.0
The dnspython.Resolve.resolve() requires at least dnspython >= 2.0.0,
this wasn't enforced in the shutdown system test leading to infinite
loop waiting for the server start due to failing resolve() call.
2023-04-04 21:31:58 +02:00
Ondřej Surý
3b1756d450
Replace dnspython resolver.query() with resolver.resolve()
The resolver.query() has been deprecated in favor of resolver.resolve();
used that.
2023-04-04 16:22:26 +02:00
Ondřej Surý
4ec9c4a1db Cleanup the last Windows / MSC ifdefs and comments
Cleanup the remnants of MS Compiler bits from <isc/refcount.h>, printing
the information in named/main.c, and cleanup some comments about Windows
that no longer apply.

The bits in picohttpparser.{h,c} were left out, because it's not our
code.
2023-04-03 09:06:20 +00:00
Michal Nowak
3cd2cc6254
Adapt to Python scripts to black 23.1.0 2023-02-17 15:31:52 +01:00
Tom Krizek
f6409ee6ac
Use common name convention for pytest files
It is better to use consistent file names to avoid issue with sorting
etc.

Using underscore in filenames as opposed to dash was chosen because it
seems more common in pytest/python to use underscore for filenames.

Also rename the bin/tests/system/timeouts/tests-tcp.py file to
bin/tests/system/timeouts/tests_tcp_timeouts.py to avoid pytest name
collision (there can't be two files named tests_tcp.py).
2022-12-21 13:40:09 +01:00