From d39d521d86a10e2b8fcc20b92bff38d8a9543899 Mon Sep 17 00:00:00 2001 From: Daniela Brozzoni Date: Mon, 10 Feb 2025 17:46:55 +0100 Subject: [PATCH] test: `-nodebug` clears previously set debug options --- test/functional/feature_logging.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/functional/feature_logging.py b/test/functional/feature_logging.py index ab817fd12d..96b990c1d7 100755 --- a/test/functional/feature_logging.py +++ b/test/functional/feature_logging.py @@ -99,6 +99,19 @@ class LoggingTest(BitcoinTestFramework): match=ErrorMatch.PARTIAL_REGEX, ) + self.log.info("Test that -nodebug clears previously specified debug options") + disable_debug_options = [ + '-nodebug' + ] + + for disable_debug_opt in disable_debug_options: + # Every category before disable_debug_opt will be ignored, including the invalid 'abc' + self.restart_node(0, ['-debug=http', '-debug=abc', disable_debug_opt, '-debug=rpc', '-debug=net']) + logging = self.nodes[0].logging() + assert not logging['http'] + assert 'abc' not in logging + assert logging['rpc'] + assert logging['net'] if __name__ == '__main__': LoggingTest(__file__).main()