atilaneves / unit-threaded

Advanced unit test framework for D
BSD 3-Clause "New" or "Revised" License
122 stars 38 forks source link

Not informative output with unitthreaded #285

Closed 9il closed 1 year ago

9il commented 1 year ago

That is very hard to show all cases because GC in silly and UT makes results probabilistico on manual memory managment issues. One diffence between silly and UT is a the probabiliy one can see some informative output without digging into some core dumps.

Another one, is probability to pass tests that have memory corruption. Less GC, simplier library, less memory: more chanse to catch bug. Ofcourse, the is reliable way to use sanitazers. I am arguing about how the test engine is informative without using additional tools.

What one will see (Linux/Macos) with UT is

Running d/_/bin/ut 
1018Program exited with code -11

With silly I could more frequently see stack traces.

atilaneves commented 1 year ago

Memory corruption = all bets are off. Trying to handle it or print anything will likely make the problem worse, since there's no way to know what caused the corruption to begin with. Other than asan/valgrind/static analysis, the only way around it is a debugger.

I'm not going to limit the use of the GC in a unit testing library.