Thank you for your quick assistance yesterday Andrei.
Maybe I misunderstood your last point, but as I see it, it is the name "test_pin" in my example, which needs to remain the same across dts files for other boards to keep the same generated macro name in the dts configurations.
It is also the name "test_pin" that is added as a header comment in the auto generated file generated_dts_board.h as /* test_pin */
I think the name "_test" is just a name for the dts node itself and not used anywhere.
Bonus info:
Using a "_" in the begining of the dts node name "_test" actually puts the generated macro names in the top of the auto generated file generated_dts_board.h, which might be a help to distinguish between your own definitions and the definitions made in zephyr already. Probably because the dts nodes are generated in alphabetic order.
Best regards,
Bo