test/hotspot/jtreg/runtime/signal/README
changeset 49662 3614cbddd005
equal deleted inserted replaced
49661:a3fed4b041ac 49662:3614cbddd005
       
     1 Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
       
     2 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       
     3 
       
     4 This code is free software; you can redistribute it and/or modify it
       
     5 under the terms of the GNU General Public License version 2 only, as
       
     6 published by the Free Software Foundation.
       
     7 
       
     8 This code is distributed in the hope that it will be useful, but WITHOUT
       
     9 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    10 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    11 version 2 for more details (a copy is included in the LICENSE file that
       
    12 accompanied this code).
       
    13 
       
    14 You should have received a copy of the GNU General Public License version
       
    15 2 along with this work; if not, write to the Free Software Foundation,
       
    16 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    17 
       
    18 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
       
    19 or visit www.oracle.com if you need additional information or have any
       
    20 questions.
       
    21 
       
    22 
       
    23 Briefly, the tests cover the following scenarios:
       
    24 1. prepre
       
    25    set signal handlers -> create JVM -> send signals -> destroy JVM -> check signal handlers were called
       
    26 
       
    27 2. prepost
       
    28    set signal handlers -> create JVM -> destroy JVM -> send signals  -> check signal handlers were called
       
    29 
       
    30 3. postpre
       
    31    create JVM ->set signal handlers -> send signals -> destroy JVM -> check signal handlers were called
       
    32 
       
    33 4. postpost
       
    34    create JVM -> set signal handlers -> destroy JVM -> send signals  -> check signal handlers were called
       
    35 
       
    36 There is one more scenario called 'nojvm'.
       
    37 In this case no jvm is created, so pure signal testing is done.
       
    38 
       
    39 Signal handlers don't do anything, so the only fact that signal handler was called is checked.
       
    40 Also 2 different ways of setting signal handlers are tested: sigaction, sigset.
       
    41 
       
    42 For 'postpre' and 'postpro' libjsig.so is used to chain signal handlers behind VM installed ones.
       
    43 
       
    44 => Current tests cover the following cases (don't count 'nojvm' scenario):
       
    45 1. Support for pre-installed signal handlers when the HotSpot VM is created.
       
    46 2. Support for signal handler installation after the HotSpot VM is created inside JNI code
       
    47 
       
    48 
       
    49 Notes:
       
    50 
       
    51 SIGQUIT, SIGTERM, SIGINT, and SIGHUP signals cannot be chained.
       
    52 If the application needs to handle these signals, the -Xrs option needs
       
    53 to be specified. So, test these signals only with -Xrs flag.
       
    54 
       
    55 On Linux and Mac OS X, SIGUSR2 is used to implement suspend and resume. So,
       
    56 don't test SIGUSR2 on Linux and Mac OS X.
       
    57 
       
    58 SIGJVM1 and SIGJVM2 exist only on Solaris and are reserved for exclusive use
       
    59 by the JVM. So don't test SIGJVM1 and SIGJVM2.