changeset 56698:c9c3bb79861e

8232571: Add missing SIGINFO signal Reviewed-by: dholmes, rriggs Contributed-by: Benoit Daloze <benoit.daloze@oracle.com>
author dholmes
date Tue, 22 Oct 2019 22:00:21 -0400
parents 083bbca50d2d
children 70e6b0d8db13
files src/hotspot/os/posix/os_posix.cpp test/hotspot/jtreg/runtime/signal/TestSiginfo.java test/jdk/sun/misc/SunMiscSignalTest.java
diffstat 3 files changed, 41 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/os/posix/os_posix.cpp	Wed Oct 23 10:02:26 2019 +0900
+++ b/src/hotspot/os/posix/os_posix.cpp	Tue Oct 22 22:00:21 2019 -0400
@@ -685,6 +685,9 @@
 #endif
   {  SIGHUP,      "SIGHUP" },
   {  SIGILL,      "SIGILL" },
+#ifdef SIGINFO
+  {  SIGINFO,     "SIGINFO" },
+#endif
   {  SIGINT,      "SIGINT" },
 #ifdef SIGIO
   {  SIGIO,       "SIGIO" },
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/signal/TestSiginfo.java	Tue Oct 22 22:00:21 2019 -0400
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2019, 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.
+ */
+
+
+/*
+ * @test
+ * @requires os.family != "windows" & os.family != "aix"
+ *
+ * @summary tests the SIGINFO signal (available on BSD platforms)
+ * VM testbase keywords: [signal, runtime, linux, solaris, macosx]
+ *
+ * @library /test/lib
+ * @run main/native SigTestDriver SIGINFO
+ */
+
--- a/test/jdk/sun/misc/SunMiscSignalTest.java	Wed Oct 23 10:02:26 2019 +0900
+++ b/test/jdk/sun/misc/SunMiscSignalTest.java	Tue Oct 22 22:00:21 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2019, 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
@@ -133,10 +133,12 @@
 
         Object[][] posixNonOSXSignals = {
                 {"BUS",  IsSupported.YES, CanRegister.YES, CanRaise.YES, invokedXrs},
+                {"INFO", IsSupported.NO, CanRegister.NO, CanRaise.NO, Invoked.NO},
         };
 
         Object[][] posixOSXSignals = {
                 {"BUS",  IsSupported.YES, CanRegister.NO, CanRaise.NO, Invoked.NO},
+                {"INFO", IsSupported.YES, CanRegister.YES, CanRaise.YES, invokedXrs},
         };
 
         Object[][] windowsSignals = {