From b45cae7699a9310e2bde3da85cc6b278937a9183 Mon Sep 17 00:00:00 2001 From: Stuart Ray <88628337+Stuartwastaken@users.noreply.github.com> Date: Wed, 28 Oct 2026 08:43:19 -1000 Subject: [PATCH] Strip the unit-test side of #ifndef __UNIT_TEST__ in strip.py strip.py kept both sides of "#ifndef __UNIT_TEST__ ... #else", so the stripped homa_tx_pool.c defined homa_tx_pool_mem_nid twice and didn't compile. --- util/strip.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util/strip.py b/util/strip.py index ecd74032..be80dbc7 100755 --- a/util/strip.py +++ b/util/strip.py @@ -329,7 +329,9 @@ def scan(file: str) -> list[str]: in_unit = None continue if line.startswith('#else /* __UNIT_TEST__ */'): - in_unit = 'else' + # Keep the side that isn't for unit tests (after + # '#ifndef __UNIT_TEST__' that is the first side). + in_unit = 'if' if in_unit == 'else' else 'else' continue if in_unit == 'if': continue