Running tests in background
Marc Lehmann
schmorp at schmorp.de
Tue Jun 8 08:37:41 CEST 2021
On Mon, Jun 07, 2021 at 12:50:01PM -0400, Felipe Gasper <felipe at felipegasper.com> wrote:
> Would you consider using SIGUSR1 instead of SIGINT in the AE test suite?
If there is a good reason to...
> We recently switched our test suite to run tests in a shell background. This caused AE’s test suite to fail on 02_signal.t, which we eventually realized was because the shell sets SIGINT to ignore, which Perl represents by saying that $SIG{INT} is 'IGNORE', which causes AnyEvent->signal() to be a no-op.
I will have to think about that. Of course, changing to SIGUSR1 does
nothing but work around the intricacies of your test environment, and
using USR1 will not realyl do anything, as that will then break with
another person's test script. Maybe AnyEvent should treat ignored signals
as it does default signals, but probably not.
Does the problem still perisst when you also instakl Async::Interrupt?
> Since the use of signals in those tests is specific to the application, it seems like SIGUSR1 would make more sense--and it would also allow the tests to run without modification when backgrounded.
Arguably, SIGINT is correct as there is nothing application specific to
SIGINT.
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / schmorp at schmorp.de
-=====/_/_//_/\_,_/ /_/\_\
More information about the anyevent
mailing list