The global was already set to 1 by kill above second wait loop.
If test VM/program was "slow" enough, the signal handler got cleaned
before "oldact.sa_handler == SIG_DFL" check (debug build, nested VM,
slow enough report printout). The test tended to fail when VM run on
physical host.

Fixes #861
---
 tests/tst-kill.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/tst-kill.cc b/tests/tst-kill.cc
index 249ff53..83da5c0 100644
--- a/tests/tst-kill.cc
+++ b/tests/tst-kill.cc
@@ -130,6 +130,7 @@ int main(int ac, char** av)
     r = sigaction(SIGUSR1, nullptr, &oldact);
     report(r == 0 && oldact.sa_handler == handler1, "without SA_RESETHAND, 
signal handler is not reset");
     act.sa_flags = SA_RESETHAND;
+    global = 0;
     r = sigaction(SIGUSR1, &act, nullptr);
     report(r == 0, "set SIGUSR1 handler with SA_RESETHAND");
     r = kill(0, SIGUSR1);
-- 
2.9.3

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to