Skip to content

Strip the unit-test side of #ifndef __UNIT_TEST__ in strip.py - #134

Open
Stuartwastaken wants to merge 1 commit into
PlatformLab:mainfrom
Stuartwastaken:fix/strip-ifndef-unit-test
Open

Stuartwastaken wants to merge 1 commit into
PlatformLab:mainfrom
Stuartwastaken:fix/strip-ifndef-unit-test

Conversation

@Stuartwastaken

@Stuartwastaken Stuartwastaken commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

strip.py kept both sides of #ifndef __UNIT_TEST__ ... #else ... #endif: the #ifndef starts in the keep state and the #else set keep again instead of switching to strip. So the stripped homa_tx_pool.c defines homa_tx_pool_mem_nid twice (the real one and the unit-test stub) and doesn't compile.

The #else now flips the state. Only homa_tx_pool.c's stripped output changes (the stub is gone); every other file that make net-next copies strips the same as before. python3 util/strip.py homa_tx_pool.c | grep -c '^int homa_tx_pool_mem_nid' gives 2 before and 1 after.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant