]> git.ipfire.org Git - thirdparty/systemd.git/commit
tests: Avoid variable shadowing in ASSERT_SIGNAL
authorChris Down <chris@chrisdown.name>
Wed, 19 Nov 2025 08:49:22 +0000 (16:49 +0800)
committerChris Down <chris@chrisdown.name>
Wed, 19 Nov 2025 12:31:57 +0000 (20:31 +0800)
commit408e8d361fc179dd43f3ba91b9691abc52903134
tree133b40f4f03f532ba2b5884b81be27bcec158b4e
parent3f0fc9321932f8e0e35922586c7369eec557793d
tests: Avoid variable shadowing in ASSERT_SIGNAL

The ASSERT_SIGNAL macro uses a fixed variable name, `_r`. This prevents
nesting the macro (like ASSERT_SIGNAL(ASSERT_SIGNAL(...))), as the inner
instance would shadow the outer instance's variable.

Switch to using the UNIQ_T helper to generate unique variable names at
each expansion level. This allows the macro to be used recursively,
which is required for upcoming regression tests regarding signal
handling logic.
src/shared/tests.h