Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I accidentally discovered that several of the statemon tests were in fact broken. They expect pping code to use the process PID as a packet ID, and end up using this in their assertions.
However, this is only sort-of true: pping actually uses the process PID modulo 2^16, since the value needs to fit in a 16-bit packet header field. If the tests ran on a system where the test runner PID is higher than 65536, these tests would fail for no apparent reason.
This would rarely have been encountered, since the test suite most often runs inside newly created VMs or containers that are torn down immediately after the test run. This way, the test suite would almost always encounter very low PID values. Running the teste on my workstation with a high uptime was a different story, though.
This more or less rewrites the tests to pytest format, so they can easily re-use a fixture to get the proper "PID" value.