Thanks for pointing out that the test-harness is broken and not the test. And hence the test fails because of bad environment.
* added helpers to install handlers, which can be reset with the TEST_RESET_MAIN_LOOP()
* realized that i need to pass the desired pid to the exit handler, instead of simply quiting on the first one
* modified affected tests to use main loop and properly clean-up environment before and after it self
Thanks for pointing out that the test-harness is broken and not the test. And hence the test fails because of bad environment.
* added helpers to install handlers, which can be reset with the TEST_RESET_ MAIN_LOOP( )
* realized that i need to pass the desired pid to the exit handler, instead of simply quiting on the first one
* modified affected tests to use main loop and properly clean-up environment before and after it self
All tests pass now \o/