lightning icon indicating copy to clipboard operation
lightning copied to clipboard

False positive of WARNING found in tests

Open daywalker90 opened this issue 3 months ago • 2 comments

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.

daywalker90 avatar Sep 08 '25 11:09 daywalker90

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:

  1. Delete the line - it's dead code
  2. Filter out Received WIRE_WARNING/ERROR: lines

I've got option 2 with tests if you want it, but option 1 is simpler.

wqxoxo avatar Nov 28 '25 15:11 wqxoxo

They will probably prefer 1. but you should ask them

daywalker90 avatar Dec 08 '25 22:12 daywalker90