jdk-24/test/hotspot/jtreg/runtime/signal
Mikhailo Seledtsov fc89e7ac24 8200126: [TESTBUG] Open source VM runtime signal tests
Open sourced the signal tests, updated make files and test groups accordingly

Reviewed-by: dholmes, ctornqvi, ihse
2018-04-03 08:56:46 -07:00
..
exesigtest.c 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
README 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
SigTestDriver.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigalrm.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigbus.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigcld.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigcont.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigemt.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigfpe.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigfreeze.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSighup.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigill.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigint.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigiot.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSiglost.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSiglwp.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigpipe.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigpoll.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigprof.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigpwr.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigquit.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigsegv.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigstop.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigsys.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigterm.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigthaw.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigtrap.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigtstp.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigttin.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigttou.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigurg.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigusr1.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigusr2.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigvtalrm.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigwinch.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigxcpu.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigxfsz.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00
TestSigxres.java 8200126: [TESTBUG] Open source VM runtime signal tests 2018-04-03 08:56:46 -07:00

Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation.

This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
version 2 for more details (a copy is included in the LICENSE file that
accompanied this code).

You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
or visit www.oracle.com if you need additional information or have any
questions.


Briefly, the tests cover the following scenarios:
1. prepre
   set signal handlers -> create JVM -> send signals -> destroy JVM -> check signal handlers were called

2. prepost
   set signal handlers -> create JVM -> destroy JVM -> send signals  -> check signal handlers were called

3. postpre
   create JVM ->set signal handlers -> send signals -> destroy JVM -> check signal handlers were called

4. postpost
   create JVM -> set signal handlers -> destroy JVM -> send signals  -> check signal handlers were called

There is one more scenario called 'nojvm'.
In this case no jvm is created, so pure signal testing is done.

Signal handlers don't do anything, so the only fact that signal handler was called is checked.
Also 2 different ways of setting signal handlers are tested: sigaction, sigset.

For 'postpre' and 'postpro' libjsig.so is used to chain signal handlers behind VM installed ones.

=> Current tests cover the following cases (don't count 'nojvm' scenario):
1. Support for pre-installed signal handlers when the HotSpot VM is created.
2. Support for signal handler installation after the HotSpot VM is created inside JNI code


Notes:

SIGQUIT, SIGTERM, SIGINT, and SIGHUP signals cannot be chained.
If the application needs to handle these signals, the -Xrs option needs
to be specified. So, test these signals only with -Xrs flag.

On Linux and Mac OS X, SIGUSR2 is used to implement suspend and resume. So,
don't test SIGUSR2 on Linux and Mac OS X.

SIGJVM1 and SIGJVM2 exist only on Solaris and are reserved for exclusive use
by the JVM. So don't test SIGJVM1 and SIGJVM2.