Hi Tim, On Sun, Jun 14, 2020 at 06:24:19PM +0200, Tim Düsterhus wrote: > Hi List, > Willy, > Ilya, > > I noticed that the reg-tests were unable find the issue reported by > William here: > https://www.mail-archive.com/[email protected]/msg37637.html > > This is because VTest never performs a "soft" shutdown of HAProxy, > instead it uses SIGINT -> SIGTERM -> SIGKILL. Thus the deinit() will > never trigger. > > Fixing this will require a change to VTest: > https://github.com/vtest/VTest/blob/b9e9e03fdeebd494783ae1dd8e6008f5c1e3a4bc/src/vtc_haproxy.c#L786 > needs to be SIGUSR1 (and the switch below adjusted). > > Making the change in my local repository and running the tests that > don't need any additional USE_XXX falgs causes 3 tests to fail with 2 of > them triggering an assertion within VTest. > > It would have caught the bug reported by William, though. > > Concluding: It probably makes sense to adjust VTest to use SIGUSR1 > instead of SIGINT, the latter is handled like SIGTERM in HAProxy anyway, > so there is no need for this distinction. I did not yet look into the > details of the failing tests, though.
It *could* be a solution, I don't know if it may have other impacts. Actually we must always remember that while convenient, VTest's primary goal is to test a proxy by synchronizing the two sides (which is what basically no other testing tool can reliably do). If we want to run deeper tests on other process-oriented behaviors, it can make sense to rely on other tools. For example vtest is not the best suited to testing command line or process stability. It has no process management, can leak background processes and needs to wait for a timeout to detect a crash. My point above is that as long as *proxy* tests are compatible with stopping using SIGUSR1 I think I'd be fine with the change. But if doing this actually results in more pain to test the proxy features, I'd rather stay away from this and switch to a distinct test series for this. That's where I'd draw the line. Cheers, Willy

