False positive of WARNING found in tests
I have a test that is sometimes failing with:
Error: error waiting for shutdown
Caused by:
channel lagged by 1
=========================== short test summary info ============================
ERROR tests/test_sling.py::test_gossip - ValueError:
Node errors:
- lightningd-2: had warning messages
I don't know why that happens or what it means but it started somewhat recently and i believe it is falsely triggered by:
lightningd-2 2025-09-08T03:49:22.049Z INFO 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-connectd: Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout 106x4x0
Where it finds the WARNING: search term in the middle of the log instead of where the log level is.
I looked into this. The regex r' WARNING:' in fixtures.py:502 matches anywhere in the log line, including inside received WIRE_WARNING content:
Received WIRE_WARNING: WARNING: channel_announcement: no unspent txout
^^^^^^^^ matches here
Turns out the check is obsolete - it was added in f3159ec4acd1 to catch channeld WARNING: ... logs, but that format doesn't exist anymore. I grepped the C codebase and nothing outputs WARNING: now. It only catches false positives.
Two options:
- Delete the line - it's dead code
- Filter out
Received WIRE_WARNING/ERROR:lines
I've got option 2 with tests if you want it, but option 1 is simpler.
They will probably prefer 1. but you should ask them