This PR implements the improvement suggested in a TODO comment in test/util/test_runner.py. It adds validation that stderr is empty when no errors are expected in test cases.
The change adds a check that verifies stderr is empty when no error_txt is specified in the test object, with a special exception for bitcoin-tx running under Wine, which was mentioned in the original TODO comment.
This improvement helps catch unexpected error messages that might otherwise go unnoticed during testing, making the test framework more robust.
The implementation:
- Checks if stderr contains output when no error is expected
- Makes an exception for the known case of bitcoin-tx running under Wine
- Raises an exception with a detailed error message if unexpected stderr output is found
This change improves test coverage by ensuring that tests don’t silently pass when they produce unexpected error output.