Merge
authorlana
Thu, 14 Apr 2016 09:32:16 -0700
changeset 37033 028bb52d9c95
parent 37013 9409d7cb2383 (current diff)
parent 37032 09347dc49ec8 (diff)
child 37034 b63fd4af003e
child 37406 ffe907153695
Merge
test/failure_handler/src/windows/native/jdk/test/failurehandler/jtreg/GatherProcessInfoTimeoutHandler.c
--- a/common/autoconf/boot-jdk.m4	Thu Apr 14 09:09:21 2016 -0700
+++ b/common/autoconf/boot-jdk.m4	Thu Apr 14 09:32:16 2016 -0700
@@ -305,7 +305,7 @@
   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
   AC_SUBST(BOOT_JDK_SOURCETARGET)
 
-  ADD_JVM_ARG_IF_OK([-Xpatch:], dummy, [$JAVA])
+  ADD_JVM_ARG_IF_OK([-Xpatch:foo=bar], dummy, [$JAVA])
   AC_MSG_CHECKING([if Boot JDK supports modules])
   if test "x$JVM_ARG_OK" = "xtrue"; then
     AC_MSG_RESULT([yes])
@@ -444,9 +444,9 @@
         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
 
         # Extra M4 quote needed to protect [] in grep expression.
-        [FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | grep  '\"1\.[9]\.'`]
+        [FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`]
         if test "x$FOUND_CORRECT_VERSION" = x; then
-          AC_MSG_NOTICE([Potential Boot JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring])
+          AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring])
           AC_MSG_NOTICE([(Your Build JDK must be version 9)])
           BUILD_JDK_FOUND=no
         else
--- a/common/autoconf/generated-configure.sh	Thu Apr 14 09:09:21 2016 -0700
+++ b/common/autoconf/generated-configure.sh	Thu Apr 14 09:32:16 2016 -0700
@@ -4950,7 +4950,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1458755892
+DATE_WHEN_GENERATED=1460464859
 
 ###############################################################################
 #
@@ -29770,13 +29770,13 @@
 
 
 
-  $ECHO "Check if jvm arg is ok: -Xpatch:" >&5
-  $ECHO "Command: $JAVA -Xpatch: -version" >&5
-  OUTPUT=`$JAVA -Xpatch: -version 2>&1`
+  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
+  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
+  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    dummy="$dummy -Xpatch:"
+    dummy="$dummy -Xpatch:foo=bar"
     JVM_ARG_OK=true
   else
     $ECHO "Arg failed:" >&5
@@ -29856,10 +29856,10 @@
         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
 
         # Extra M4 quote needed to protect [] in grep expression.
-        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | grep  '\"1\.[9]\.'`
+        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
         if test "x$FOUND_CORRECT_VERSION" = x; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
-$as_echo "$as_me: Potential Boot JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
+$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
           { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
 $as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
           BUILD_JDK_FOUND=no
--- a/common/bin/compare.sh	Thu Apr 14 09:09:21 2016 -0700
+++ b/common/bin/compare.sh	Thu Apr 14 09:32:16 2016 -0700
@@ -41,7 +41,7 @@
     STAT_PRINT_SIZE="-f %z"
 elif [ "$OPENJDK_TARGET_OS" = "windows" ]; then
     FULLDUMP_CMD="$DUMPBIN -all"
-    LDD_CMD="$DUMPBIN -dependants | $GREP .dll"
+    LDD_CMD="$DUMPBIN -dependents"
     DIS_CMD="$DUMPBIN -disasm:nobytes"
     STAT_PRINT_SIZE="-c %s"
 elif [ "$OPENJDK_TARGET_OS" = "aix" ]; then
@@ -824,12 +824,25 @@
 
     # Check dependencies
     if [ -n "$LDD_CMD" ]; then
-        (cd $FILE_WORK_DIR && $CP $OTHER_FILE . && $LDD_CMD $NAME 2>/dev/null | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.other | $UNIQ > $WORK_FILE_BASE.deps.other.uniq)
-        (cd $FILE_WORK_DIR && $CP $THIS_FILE . && $LDD_CMD $NAME 2</dev/null | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.this | $UNIQ > $WORK_FILE_BASE.deps.this.uniq)
+        if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
+            LDD_FILTER="$GREP \.dll"
+        else
+            LDD_FILTER="$CAT"
+        fi
+        (cd $FILE_WORK_DIR && $CP $OTHER_FILE . && $LDD_CMD $NAME 2>/dev/null \
+                    | $LDD_FILTER | $AWK '{ print $1;}' | $SORT \
+                    | $TEE $WORK_FILE_BASE.deps.other \
+                    | $UNIQ > $WORK_FILE_BASE.deps.other.uniq)
+        (cd $FILE_WORK_DIR && $CP $THIS_FILE . && $LDD_CMD $NAME 2</dev/null \
+                    | $LDD_FILTER | $AWK '{ print $1;}' | $SORT \
+                    | $TEE $WORK_FILE_BASE.deps.this \
+                    | $UNIQ > $WORK_FILE_BASE.deps.this.uniq)
         (cd $FILE_WORK_DIR && $RM -f $NAME)
 
-        LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other $WORK_FILE_BASE.deps.this > $WORK_FILE_BASE.deps.diff
-        LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other.uniq $WORK_FILE_BASE.deps.this.uniq > $WORK_FILE_BASE.deps.diff.uniq
+        LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other $WORK_FILE_BASE.deps.this \
+              > $WORK_FILE_BASE.deps.diff
+        LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other.uniq $WORK_FILE_BASE.deps.this.uniq \
+              > $WORK_FILE_BASE.deps.diff.uniq
 
         if [ -s $WORK_FILE_BASE.deps.diff ]; then
             if [ -s $WORK_FILE_BASE.deps.diff.uniq ]; then
--- a/make/CompileJavaModules.gmk	Thu Apr 14 09:09:21 2016 -0700
+++ b/make/CompileJavaModules.gmk	Thu Apr 14 09:32:16 2016 -0700
@@ -469,32 +469,7 @@
 ################################################################################
 # Setup the compilation for the module
 #
-# Order src dirs in order of override with the most important first. Generated
-# source before static source and platform specific source before shared.
-#
-GENERATED_SRC_DIRS += \
-    $(SUPPORT_OUTPUTDIR)/gensrc \
-    #
-
-TOP_SRC_DIRS += \
-    $(HOTSPOT_TOPDIR)/src \
-    $(CORBA_TOPDIR)/src \
-    $(JDK_TOPDIR)/src \
-    $(LANGTOOLS_TOPDIR)/src \
-    $(JAXP_TOPDIR)/src \
-    $(JAXWS_TOPDIR)/src \
-    $(NASHORN_TOPDIR)/src \
-    #
-
-SRC_SUBDIRS += $(OPENJDK_TARGET_OS)/classes
-ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_TYPE))
-  SRC_SUBDIRS += $(OPENJDK_TARGET_OS_TYPE)/classes
-endif
-SRC_SUBDIRS += share/classes
-
-MODULE_SRC_DIRS := $(strip \
-    $(addsuffix /$(MODULE), $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \
-    $(foreach sub, $(SRC_SUBDIRS), $(addsuffix /$(MODULE)/$(sub), $(TOP_SRC_DIRS))))
+MODULE_SRC_DIRS := $(call FindModuleSrcDirs, $(MODULE))
 
 # The JDK_USER_DEFINED_FILTER is a poor man's incremental build: by specifying
 # JDK_FILTER at the make command line, only a subset of the JDK java files will
@@ -502,27 +477,20 @@
 # space separated list.
 JDK_USER_DEFINED_FILTER := $(strip $(subst $(COMMA),$(SPACE), $(JDK_FILTER)))
 
-# Rewrite the MODULE_SRC_DIRS with a wildcard for the module so that all module
-# source dirs are available on the path.
-MODULESOURCEPATH := $(subst $(SPACE),$(PATH_SEP),$(subst $(MODULE),*,$(MODULE_SRC_DIRS)))
+# Get the complete module source path.
+MODULESOURCEPATH := $(call GetModuleSrcPath)
 
-# Add imported modules to the moduleclasspath
-MODULECLASSPATH := $(subst $(SPACE),$(PATH_SEP), $(IMPORT_MODULES_CLASSES))
+# Add imported modules to the modulepath
+MODULEPATH := $(call PathList, $(IMPORT_MODULES_CLASSES))
 
 ifeq ($(MODULE), jdk.vm.ci)
   ## WORKAROUND jdk.vm.ci source structure issue
   JVMCI_MODULESOURCEPATH := $(MODULESOURCEPATH) \
       $(subst /$(MODULE)/,/*/, $(filter-out %processor/src, \
           $(wildcard $(HOTSPOT_TOPDIR)/src/jdk.vm.ci/share/classes/*/src)))
-  MODULESOURCEPATH := $(subst $(SPACE),$(PATH_SEP), $(JVMCI_MODULESOURCEPATH))
+  MODULESOURCEPATH := $(call PathList, $(JVMCI_MODULESOURCEPATH))
 endif
 
-# Make sure the generated source base dirs exist. Not all modules have generated
-# source in all of these directories and because of timing, all of them might not
-# exist at the time this makefile gets called. Javac will complain if there are
-# missing directories in the moduleclasspath.
-$(call MakeDir, $(GENERATED_SRC_DIRS))
-
 $(eval $(call SetupJavaCompilation, $(MODULE), \
     SETUP := $(if $($(MODULE)_SETUP), $($(MODULE)_SETUP), GENERATE_JDKBYTECODE), \
     MODULE := $(MODULE), \
@@ -532,8 +500,8 @@
     HEADERS := $(SUPPORT_OUTPUTDIR)/headers, \
     ADD_JAVAC_FLAGS := \
         $($(MODULE)_ADD_JAVAC_FLAGS) \
-        -modulesourcepath "$(MODULESOURCEPATH)" \
-        $(if $(MODULECLASSPATH), -modulepath "$(MODULECLASSPATH)") \
+        -modulesourcepath $(MODULESOURCEPATH) \
+        -modulepath $(MODULEPATH) \
         -system none, \
 ))
 
--- a/make/GensrcModuleInfo.gmk	Thu Apr 14 09:09:21 2016 -0700
+++ b/make/GensrcModuleInfo.gmk	Thu Apr 14 09:32:16 2016 -0700
@@ -49,7 +49,6 @@
 include $(SPEC)
 include MakeBase.gmk
 include Modules.gmk
-#include TextFileProcessing.gmk
 
 ################################################################################
 # Define this here since jdk/make/Tools.gmk cannot be included from the top
@@ -64,25 +63,8 @@
 # Name of data file. Keep module-info.java.ext until javafx has changed.
 MOD_FILENAME := module-info.java.extra module-info.java.ext
 
-# List all the possible sub directories inside a module source directory where
-# data might be stored.
-CLASSES_SUBDIRS += $(OPENJDK_TARGET_OS)/classes
-ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_TYPE))
-  CLASSES_SUBDIRS += $(OPENJDK_TARGET_OS_TYPE)/classes
-endif
-CLASSES_SUBDIRS += share/classes
-
-# TODO: When the deploy build is better integrated, this will get added globally
-# but for now need to add it here.
-ifeq ($(BUILD_DEPLOY), true)
-  ALL_TOP_SRC_DIRS += $(DEPLOY_TOPDIR)/src
-endif
-
 # Construct all possible src directories for the module.
-MODULE_CLASSES_DIRS := $(strip \
-    $(foreach sub, $(CLASSES_SUBDIRS), \
-        $(addsuffix /$(MODULE)/$(sub), $(ALL_TOP_SRC_DIRS))) \
-    $(addsuffix /$(MODULE), $(IMPORT_MODULES_SRC)))
+MODULE_CLASSES_DIRS := $(call FindModuleSrcDirs, $(MODULE))
 
 # Find all the .extra files in the src dirs.
 MOD_FILES := $(wildcard $(foreach f, $(MOD_FILENAME), $(addsuffix /$(f), \
@@ -125,20 +107,6 @@
     TARGETS += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/module-info.java
   endif
 
-# This doesn't work because javac only accepts one single exports line per
-# exported package.
-  # Restore the modifications to separate lines with spaces
-#  MODIFICATIONS := $(subst /,$(SPACE),$(MODIFICATIONS))
-
-#  ifneq ($(MODIFICATIONS), )
-#    $(eval $(call SetupTextFileProcessing, PROCESS_MODULE_INFO, \
-#        SOURCE_FILES := $(firstword $(call FindAllModuleInfos, $(MODULE))), \
-#        OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/module-info.java, \
-#        REPLACEMENTS := } => $(MODIFICATIONS) }, \
-#    ))
-
-#    TARGETS += $(PROCESS_MODULE_INFO)
-#  endif
 endif
 
 # If no modifications are found for this module, remove any module-info.java
--- a/make/Main.gmk	Thu Apr 14 09:09:21 2016 -0700
+++ b/make/Main.gmk	Thu Apr 14 09:32:16 2016 -0700
@@ -385,9 +385,25 @@
 build-test-lib:
 	+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f BuildTestLib.gmk)
 
+# Builds the failure handler jtreg extension
+build-test-failure-handler:
+	+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \
+	    -f BuildFailureHandler.gmk build)
+
+# Runs the tests for the failure handler jtreg extension
+test-failure-handler:
+	+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \
+	    -f BuildFailureHandler.gmk test)
+
+# Copies the failure handler jtreg extension into the test image
+test-image-failure-handler:
+	+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \
+	     -f BuildFailureHandler.gmk images)
+
 ALL_TARGETS += prepare-test-image build-test-hotspot-jtreg-native \
     test-image-hotspot-jtreg-native build-test-jdk-jtreg-native \
-    test-image-jdk-jtreg-native build-test-lib
+    test-image-jdk-jtreg-native build-test-lib build-test-failure-handler \
+    test-failure-handler test-image-failure-handler
 
 ################################################################################
 # Run tests
@@ -582,6 +598,12 @@
 
   build-test-lib: java
 
+  build-test-failure-handler: interim-langtools
+
+  test-failure-handler: build-test-failure-handler
+
+  test-image-failure-handler: build-test-failure-handler
+
   build-test-hotspot-jtreg-native: buildtools-jdk
 
   build-test-jdk-jtreg-native: buildtools-jdk
@@ -671,7 +693,7 @@
 
 # This target builds the test image
 test-image: prepare-test-image test-image-hotspot-jtreg-native \
-    test-image-jdk-jtreg-native
+    test-image-jdk-jtreg-native test-image-failure-handler
 
 # all-images is the top-most target, it builds all our deliverables ("images").
 all-images: product-images test-image docs-image
--- a/make/common/MakeBase.gmk	Thu Apr 14 09:09:21 2016 -0700
+++ b/make/common/MakeBase.gmk	Thu Apr 14 09:32:16 2016 -0700
@@ -723,12 +723,13 @@
 endif
 
 ################################################################################
-# Return a string suitable for use after a -classpath option. It will correct and safe to use
-# on all platforms. Arguments are given as space separate classpath entries.
+# Return a string suitable for use after a -classpath or -modulepath option. It
+# will be correct and safe to use on all platforms. Arguments are given as space
+# separate classpath entries. Safe for multiple nested calls.
 # param 1 : A space separated list of classpath entries
 # The surrounding strip is needed to keep additional whitespace out
 PathList = \
-  "$(subst $(SPACE),$(PATH_SEP),$(strip $1))"
+  "$(subst $(SPACE),$(PATH_SEP),$(strip $(subst $(DQUOTE),,$1)))"
 
 ################################################################################
 
--- a/make/common/Modules.gmk	Thu Apr 14 09:09:21 2016 -0700
+++ b/make/common/Modules.gmk	Thu Apr 14 09:32:16 2016 -0700
@@ -138,26 +138,35 @@
 ################################################################################
 # Module list macros
 
-# Use append so that the custom extension may add to this variable
+# Use append so that the custom extension may add to these variables
 
-ALL_TOP_SRC_DIRS += \
+GENERATED_SRC_DIRS += \
+    $(SUPPORT_OUTPUTDIR)/gensrc \
+    #
+
+TOP_SRC_DIRS += \
+    $(CORBA_TOPDIR)/src \
     $(HOTSPOT_TOPDIR)/src \
     $(JDK_TOPDIR)/src \
     $(LANGTOOLS_TOPDIR)/src \
-    $(CORBA_TOPDIR)/src \
     $(JAXP_TOPDIR)/src \
     $(JAXWS_TOPDIR)/src \
     $(NASHORN_TOPDIR)/src \
     #
 
+SRC_SUBDIRS += $(OPENJDK_TARGET_OS)/classes
+ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_TYPE))
+  SRC_SUBDIRS += $(OPENJDK_TARGET_OS_TYPE)/classes
+endif
+SRC_SUBDIRS += share/classes
+
 # Find all module-info.java files for the current build target platform and
 # configuration.
 # Param 1 - Module to find for, set to * for finding all
 FindAllModuleInfos = \
     $(wildcard \
-        $(patsubst %,%/$(strip $1)/$(OPENJDK_TARGET_OS)/classes/module-info.java, $(ALL_TOP_SRC_DIRS)) \
-        $(patsubst %,%/$(strip $1)/$(OPENJDK_TARGET_OS_TYPE)/classes/module-info.java, $(ALL_TOP_SRC_DIRS)) \
-        $(patsubst %,%/$(strip $1)/share/classes/module-info.java, $(ALL_TOP_SRC_DIRS)) \
+        $(foreach sub, $(SRC_SUBDIRS), \
+          $(patsubst %,%/$(strip $1)/$(sub)/module-info.java, $(TOP_SRC_DIRS))) \
         $(patsubst %,%/$(strip $1)/module-info.java, $(IMPORT_MODULES_SRC)))
 
 # Extract the module names from the paths of module-info.java files. The
@@ -178,6 +187,19 @@
 FindImportedModules = \
     $(if $(IMPORT_MODULES_CLASSES), $(notdir $(wildcard $(IMPORT_MODULES_CLASSES)/*)))
 
+# Find all source dirs for a particular module
+# $1 - Module to find source dirs for
+FindModuleSrcDirs = \
+    $(strip $(wildcard \
+        $(addsuffix /$(strip $1), $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \
+        $(foreach sub, $(SRC_SUBDIRS), $(addsuffix /$(strip $1)/$(sub), $(TOP_SRC_DIRS)))))
+
+# Construct the complete module source path
+GetModuleSrcPath = \
+    $(call PathList, \
+        $(addsuffix /*, $(GENERATED_SRC_DIRS) $(IMPORT_MODULES_SRC)) \
+        $(foreach sub, $(SRC_SUBDIRS), $(addsuffix /*/$(sub), $(TOP_SRC_DIRS))))
+
 ################################################################################
 # Extract module dependencies from module-info.java files.
 
--- a/make/jprt.properties	Thu Apr 14 09:09:21 2016 -0700
+++ b/make/jprt.properties	Thu Apr 14 09:32:16 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2016, 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
@@ -311,13 +311,13 @@
 
 # Platforms built for hotspot push jobs
 my.build.targets.hotspot=						\
-    solaris_sparcv9_5.11-{product|fastdebug},			\
+    solaris_sparcv9_5.11-{product|fastdebug},				\
     solaris_x64_5.11-{product|fastdebug},				\
     linux_i586_3.8-{product|fastdebug},					\
-    linux_x64_3.8-{product|fastdebug},			\
+    linux_x64_3.8-{product|fastdebug},					\
     macosx_x64_10.9-{product|fastdebug},				\
     windows_i586_6.3-{product|fastdebug},				\
-    windows_x64_6.3-{product|fastdebug},			\
+    windows_x64_6.3-{product|fastdebug},				\
     solaris_x64_5.11-{fastdebugOpen},					\
     linux_x64_3.8-{productOpen},					\
     ${my.additional.build.targets.hotspot}
@@ -346,18 +346,15 @@
     solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_G1
 
 my.test.targets.hotspot.linux.i586=					\
-    linux_i586_3.8-{product|fastdebug}-{c1|c2}-jvm98,			\
+    linux_i586_3.8-{product|fastdebug}-c2-jvm98,			\
     linux_i586_3.8-{product|fastdebug}-c2-jvm98_nontiered,		\
-    linux_i586_3.8-{product|fastdebug}-{c1|c2}-scimark,			\
-    linux_i586_3.8-product-c1-runThese8_Xcomp_lang,			\
-    linux_i586_3.8-product-c1-runThese8_Xcomp_vm,			\
-    linux_i586_3.8-fastdebug-c1-runThese8_Xshare,			\
+    linux_i586_3.8-{product|fastdebug}-c2-scimark,			\
     linux_i586_3.8-fastdebug-c2-runThese8_Xcomp_lang,			\
     linux_i586_3.8-fastdebug-c2-runThese8_Xcomp_vm,			\
-    linux_i586_3.8-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC,	\
-    linux_i586_3.8-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC,	\
-    linux_i586_3.8-{product|fastdebug}-{c1|c2}-GCBasher_CMS,		\
-    linux_i586_3.8-{product|fastdebug}-{c1|c2}-GCBasher_G1
+    linux_i586_3.8-{product|fastdebug}-c2-GCBasher_SerialGC,		\
+    linux_i586_3.8-{product|fastdebug}-c2-GCBasher_ParallelGC,		\
+    linux_i586_3.8-{product|fastdebug}-c2-GCBasher_CMS,			\
+    linux_i586_3.8-{product|fastdebug}-c2-GCBasher_G1
 
 my.test.targets.hotspot.linux.x64=					\
     linux_x64_3.8-{product|fastdebug}-c2-jvm98,				\
@@ -378,17 +375,16 @@
     macosx_x64_10.9-{product|fastdebug}-c2-GCBasher_G1
 
 my.test.targets.hotspot.windows.i586=					\
-    windows_i586_6.3-{product|fastdebug}-{c1|c2}-jvm98,			\
+    windows_i586_6.3-{product|fastdebug}-c2-jvm98,			\
     windows_i586_6.3-{product|fastdebug}-c2-jvm98_nontiered,		\
-    windows_i586_6.3-{product|fastdebug}-{c1|c2}-scimark,		\
-    windows_i586_6.3-product-{c1|c2}-runThese8,				\
-    windows_i586_6.3-product-{c1|c2}-runThese8_Xcomp_lang,		\
-    windows_i586_6.3-product-{c1|c2}-runThese8_Xcomp_vm,		\
-    windows_i586_6.3-fastdebug-c1-runThese8_Xshare,			\
-    windows_i586_6.3-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC,	\
-    windows_i586_6.3-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC,	\
-    windows_i586_6.3-{product|fastdebug}-{c1|c2}-GCBasher_CMS,		\
-    windows_i586_6.3-{product|fastdebug}-{c1|c2}-GCBasher_G1
+    windows_i586_6.3-{product|fastdebug}-c2-scimark,			\
+    windows_i586_6.3-product-c2-runThese8,				\
+    windows_i586_6.3-product-c2-runThese8_Xcomp_lang,			\
+    windows_i586_6.3-product-c2-runThese8_Xcomp_vm,			\
+    windows_i586_6.3-{product|fastdebug}-c2-GCBasher_SerialGC,		\
+    windows_i586_6.3-{product|fastdebug}-c2-GCBasher_ParallelGC,	\
+    windows_i586_6.3-{product|fastdebug}-c2-GCBasher_CMS,		\
+    windows_i586_6.3-{product|fastdebug}-c2-GCBasher_G1
 
 my.test.targets.hotspot.windows.x64=					\
     windows_x64_6.3-{product|fastdebug}-c2-jvm98,			\
@@ -443,22 +439,21 @@
   linux_x64_3.8-fastdebug-c2-GROUP,					\
   macosx_x64_10.9-fastdebug-c2-GROUP,					\
   windows_i586_6.3-fastdebug-c2-GROUP,					\
-  windows_x64_6.3-fastdebug-c2-GROUP,					\
-  linux_i586_3.8-fastdebug-c1-GROUP,					\
-  windows_i586_6.3-fastdebug-c1-GROUP
+  windows_x64_6.3-fastdebug-c2-GROUP
 
 # Hotspot jtreg tests
-my.make.rule.test.targets.hotspot.reg=						\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_compiler_1},	\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_compiler_2},	\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_compiler_3},	\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_compiler_closed},	\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_gc},		\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_gc_closed},       \
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_gc_gcold},        \
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_runtime},		\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_serviceability},	\
-  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=jdk_svc_sanity},		\
+my.make.rule.test.targets.hotspot.reg=							\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_compiler_1},		\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_compiler_2},		\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_compiler_3},		\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_compiler_closed},	\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_gc_1},		\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_gc_2},		\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_gc_closed},		\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_gc_gcold},		\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_runtime},		\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_fast_serviceability},	\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=jdk_svc_sanity},			\
   ${my.additional.make.rule.test.targets.hotspot.reg}
 
 # Other Makefile based Hotspot tests
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/test/BuildFailureHandler.gmk	Thu Apr 14 09:32:16 2016 -0700
@@ -0,0 +1,128 @@
+#
+# Copyright (c) 2016, 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.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# 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.
+#
+
+default: build
+
+include $(SPEC)
+include MakeBase.gmk
+include JavaCompilation.gmk
+include SetupJavaCompilers.gmk
+include NativeCompilation.gmk
+
+TARGETS :=
+
+################################################################################
+
+FH_BASEDIR := $(SRC_ROOT)/test/failure_handler
+FH_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/failure_handler
+FH_JAR := $(FH_SUPPORT)/jtregFailureHandler.jar
+
+JTREG_JAR := $(JT_HOME)/lib/jtreg.jar
+ifeq ($(wildcard $(JTREG_JAR)), )
+  $(error Cannot build failure handler without jtreg)
+endif
+# tools.jar is only needed if it exists in the boot jdk
+TOOLS_JAR := $(wildcard $(BOOT_JDK)/lib/tools.jar)
+
+FH_CLASSPATH := $(call PathList, $(JTREG_JAR) $(TOOLS_JAR))
+
+$(eval $(call SetupJavaCompilation, BUILD_FAILURE_HANDLER, \
+    SETUP := GENERATE_OLDBYTECODE, \
+    SRC := $(FH_BASEDIR)/src/share/classes $(FH_BASEDIR)/src/share/conf, \
+    BIN := $(FH_SUPPORT)/classes, \
+    COPY := .properties, \
+    CLASSPATH := $(JTREG_JAR) $(TOOLS_JAR), \
+    JAR := $(FH_JAR), \
+))
+
+TARGETS += $(BUILD_FAILURE_HANDLER)
+
+################################################################################
+
+ifeq ($(OPENJDK_TARGET_OS), windows)
+
+  $(eval $(call SetupNativeCompilation, BUILD_LIBTIMEOUT_HANDLER, \
+        LIBRARY := timeoutHandler, \
+        SRC := $(FH_BASEDIR)/src/windows/native/libtimeoutHandler, \
+        OBJECT_DIR := $(FH_SUPPORT)/libtimeoutHandler, \
+        OUTPUT_DIR := $(FH_SUPPORT), \
+        CFLAGS := $(CFLAGS_JDKLIB), \
+        LDFLAGS := $(LDFLAGS_JDKLIB), \
+        OPTIMIZATION := LOW, \
+  ))
+
+  TARGETS += $(BUILD_LIBTIMEOUT_HANDLER)
+
+endif
+
+################################################################################
+# Targets for building test-image.
+################################################################################
+
+# Copy to hotspot jtreg test image
+$(eval $(call SetupCopyFiles, COPY_FH, \
+    SRC := $(FH_SUPPORT), \
+    DEST := $(TEST_IMAGE_DIR)/failure_handler, \
+    FILES := $(FH_JAR) $(BUILD_LIBTIMEOUT_HANDLER), \
+))
+
+IMAGES_TARGETS += $(COPY_FH)
+
+################################################################################
+# Test the failure handler itself
+################################################################################
+#
+# Use JTREG_TEST_OPTS for test VM options
+# Use JTREG_TESTS for jtreg tests parameter
+#
+RUN_DIR := $(FH_SUPPORT)/test
+# Add the dir of the dll to the path on windows
+ifeq ($(OPENJDK_TARGET_OS), windows)
+  export PATH := $(PATH);$(FH_SUPPORT)
+endif
+
+test:
+	$(RM) -r $(RUN_DIR)
+	$(MKDIR) -p $(RUN_DIR)
+	$(CD) $(FH_BASEDIR)/test && JT_JAVA=$(BOOT_JDK) $(JTREGEXE) \
+	    -jdk:$(BOOT_JDK) \
+	    $(JTREG_TEST_OPTS) \
+	    -timeout:0.1 -va -retain:all \
+	    -noreport \
+	    -agentvm \
+	    -thd:$(FH_JAR) \
+	    -th:jdk.test.failurehandler.jtreg.GatherProcessInfoTimeoutHandler \
+	    -od:$(FH_JAR) \
+	    -o:jdk.test.failurehandler.jtreg.GatherDiagnosticInfoObserver \
+	    -w:$(RUN_DIR)/JTwork -r:$(RUN_DIR)/JTreport \
+	    $(if $(JTREG_TESTS), $(JTREG_TESTS), .) \
+	    || true
+
+################################################################################
+
+build: $(TARGETS)
+images: $(IMAGES_TARGETS)
+
+.PHONY: all images test
--- a/test/failure_handler/Makefile	Thu Apr 14 09:09:21 2016 -0700
+++ b/test/failure_handler/Makefile	Thu Apr 14 09:32:16 2016 -0700
@@ -29,7 +29,7 @@
 CLASSES_DIR := ${BUILD_DIR}/classes
 IMAGE_DIR := ${BUILD_DIR}/image
 RUN_DIR := $(shell pwd)/run
-
+CLASSPATH := ${JTREG_HOME}/lib/jtreg.jar:${JAVA_HOME}/lib/tools.jar
 SRC_DIR := src/share/classes/
 SOURCES := ${SRC_DIR}/jdk/test/failurehandler/*.java                   \
            ${SRC_DIR}/jdk/test/failurehandler/action/*.java            \
@@ -47,9 +47,12 @@
 ifeq ("${OS_NAME}", "Cygwin")
 BUILD_DIR := $(shell cygpath -m "${BUILD_DIR}")
 CLASSES_DIR := $(shell cygpath -m "${CLASSES_DIR}")
-IMAGE_DIR := $(shell cygpath -m "${IMAGE_DIR}") RUN_DIR := $(shell cygpath -m "${RUN_DIR}")
+IMAGE_DIR := $(shell cygpath -m "${IMAGE_DIR}")
+RUN_DIR := $(shell cygpath -m "${RUN_DIR}")
 SRC_DIR := $(shell cygpath -m "${SRC_DIR}")
+JAVA_HOME := $(shell cygpath -m "${JAVA_HOME}")
 JTREG_HOME := $(shell cygpath -m "${JTREG_HOME}")
+CLASSPATH := $(shell cygpath -pm "${CLASSPATH}")
 CC := "cl.exe"
 endif
 
@@ -57,33 +60,33 @@
 
 native: require_env
 ifeq ("${OS_NAME}", "Cygwin")
-    "${CC}" src/windows/native/jdk/test/failurehandler/jtreg/*.c            \
-        -I"$(shell cygpath -w ${JAVA_HOME}/include)"                        \
-        -I"$(shell cygpath -w ${JAVA_HOME}/include/win32)"                  \
-        /link /MACHINE:X64 /DLL /OUT:timeoutHandler.dll
+	"${CC}" src/windows/native/jdk/test/failurehandler/jtreg/*.c        \
+	-I"$(shell cygpath -w "${JAVA_HOME}/include")"                        \
+	-I"$(shell cygpath -w "${JAVA_HOME}/include/win32")"                  \
+	/link /DLL /OUT:timeoutHandler.dll
 endif
 
 check_defined = $(foreach 1,$1,$(__check_defined))
 __check_defined = $(if $(value $1),, $(error $1 is not set))
 
 classes: require_env
-    mkdir -p ${IMAGE_DIR}/bin ${IMAGE_DIR}/lib ${CLASSES_DIR}
-    "${JAVA_HOME}"/bin/javac -target ${JAVA_RELEASE} -source ${JAVA_RELEASE}  \
-        -sourcepath $(shell pwd)                                              \
-        -classpath ${JTREG_HOME}/lib/jtreg.jar:${JAVA_HOME}/lib/tools.jar     \
-        -d ${CLASSES_DIR}                                                     \
+	mkdir -p ${IMAGE_DIR}/bin ${IMAGE_DIR}/lib ${CLASSES_DIR}
+	"${JAVA_HOME}"/bin/javac -target ${JAVA_RELEASE} -source ${JAVA_RELEASE} \
+		-sourcepath "$(shell pwd)"                                           \
+		-cp "${CLASSPATH}" 													 \
+		-d ${CLASSES_DIR}                                  					 \
         ${SOURCES}
-    "${JAVA_HOME}"/bin/jar cf ${TARGET_JAR} -C ${CLASSES_DIR} .
-    "${JAVA_HOME}"/bin/jar uf ${TARGET_JAR} -C ${CONF_DIR} .
+	"${JAVA_HOME}"/bin/jar cf "${TARGET_JAR}" -C "${CLASSES_DIR}" .
+	"${JAVA_HOME}"/bin/jar uf "${TARGET_JAR}" -C "${CONF_DIR}" .
 
 #
 # Use JTREG_TEST_OPTS for test VM options
 # Use JTREG_TESTS for jtreg tests parameter
 #
 test: require_env build
-    rm -rf ${RUN_DIR}
-    mkdir -p ${RUN_DIR}
-    "${JTREG_HOME}"/bin/jtreg                                               \
+	rm -rf "${RUN_DIR}"
+	mkdir -p "${RUN_DIR}"
+	"${JTREG_HOME}"/bin/jtreg                                               \
         -jdk:"${JAVA_HOME}"                                                 \
         ${JTREG_TEST_OPTS}                                                  \
         -timeout:0.1 -va -retain:all                                        \
@@ -93,7 +96,8 @@
         -th:jdk.test.failurehandler.jtreg.GatherProcessInfoTimeoutHandler   \
         -od:"${TARGET_JAR}"                                                 \
         -o:jdk.test.failurehandler.jtreg.GatherDiagnosticInfoObserver       \
-        -w:${RUN_DIR}/JTwork -r:${RUN_DIR}/JTreport                         \
+        -w:"${RUN_DIR}/JTwork"                                              \
+        -r:"${RUN_DIR}/JTreport"                                            \
         $(if ${JTREG_TESTS}, ${JTREG_TESTS}, test)                          \
         && false || true
 
@@ -101,11 +105,11 @@
 debug: test
 
 require_env:
-    $(call check_defined, JAVA_HOME)
-    $(call check_defined, JTREG_HOME)
+	$(call check_defined, JAVA_HOME)
+	$(call check_defined, JTREG_HOME)
 
 clean:
-    rm -rf "${BUILD_DIR}" "${RUN_DIR}"
+	rm -rf "${BUILD_DIR}" "${RUN_DIR}"
 
 build: classes native
 
--- a/test/failure_handler/README	Thu Apr 14 09:09:21 2016 -0700
+++ b/test/failure_handler/README	Thu Apr 14 09:32:16 2016 -0700
@@ -36,11 +36,9 @@
 
 BUILDING
 
-To build a library, one should simply run make with 'JTREG_HOME' and
-'JAVA_HOME' environment variables set. 'JAVA_HOME' should contain path to JDK,
-'JTREG_HOME' -- path to jtreg.
-
-'image/lib/jtregFailureHandler.jar' is created on successful build.
+The library is built using the top level build-test-failure-handler target and
+is automatically included in the test image and picked up by hotspot and jdk
+test makefiles.
 
 CONFIGURATION
 
--- a/test/failure_handler/src/share/classes/jdk/test/failurehandler/jtreg/GatherProcessInfoTimeoutHandler.java	Thu Apr 14 09:09:21 2016 -0700
+++ b/test/failure_handler/src/share/classes/jdk/test/failurehandler/jtreg/GatherProcessInfoTimeoutHandler.java	Thu Apr 14 09:32:16 2016 -0700
@@ -39,12 +39,16 @@
  * process and its children.
  */
 public class GatherProcessInfoTimeoutHandler extends TimeoutHandler {
+    private static final boolean HAS_NATIVE_LIBRARY;
     static {
+        boolean value = true;
         try {
             System.loadLibrary("timeoutHandler");
         } catch (UnsatisfiedLinkError ignore) {
             // not all os need timeoutHandler native-library
+            value = false;
         }
+        HAS_NATIVE_LIBRARY = value;
     }
     private static final String LOG_FILENAME = "processes.log";
     private static final String OUTPUT_FILENAME = "processes.html";
@@ -105,7 +109,7 @@
         if (result == 0L) {
             /* jtreg didn't find pid, most probably we are on JDK < 9
                there is no Process::getPid */
-            if ("windows".equals(OS.current().family)) {
+            if (HAS_NATIVE_LIBRARY && "windows".equals(OS.current().family)) {
                 try {
                     Field field = process.getClass().getDeclaredField("handle");
                     boolean old = field.isAccessible();
--- a/test/failure_handler/src/windows/native/jdk/test/failurehandler/jtreg/GatherProcessInfoTimeoutHandler.c	Thu Apr 14 09:09:21 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2015, 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.
- */
-
-#include <jni.h>
-#include <windows.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-JNIEXPORT jlong JNICALL Java_jdk_test_failurehandler_jtreg_GatherProcessInfoTimeoutHandler_getWin32Pid
-        (JNIEnv* env, jobject o, jlong handle) {
-    return GetProcessId(handle);
-}
-#ifdef __cplusplus
-}
-#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/failure_handler/src/windows/native/libtimeoutHandler/GatherProcessInfoTimeoutHandler.c	Thu Apr 14 09:32:16 2016 -0700
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2015, 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.
+ */
+
+#include <jni.h>
+#include <windows.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+JNIEXPORT jlong JNICALL Java_jdk_test_failurehandler_jtreg_GatherProcessInfoTimeoutHandler_getWin32Pid
+        (JNIEnv* env, jobject o, jlong handle) {
+    return GetProcessId((HANDLE) handle);
+}
+#ifdef __cplusplus
+}
+#endif
--- a/test/failure_handler/test/sanity/Suicide.java	Thu Apr 14 09:09:21 2016 -0700
+++ b/test/failure_handler/test/sanity/Suicide.java	Thu Apr 14 09:32:16 2016 -0700
@@ -28,7 +28,7 @@
 /*
  * @test
  * @summary Suicide test
- * @run main/othervm Crash
+ * @run main/othervm Suicide
  */
 public class Suicide {
     public static void main(String[] args) {
--- a/test/lib/sun/hotspot/WhiteBox.java	Thu Apr 14 09:09:21 2016 -0700
+++ b/test/lib/sun/hotspot/WhiteBox.java	Thu Apr 14 09:32:16 2016 -0700
@@ -344,7 +344,13 @@
   }
   public native Object[] getCodeBlob(long addr);
 
-  public native void clearInlineCaches();
+  private native void clearInlineCaches0(boolean preserve_static_stubs);
+  public void clearInlineCaches() {
+    clearInlineCaches0(false);
+  }
+  public void clearInlineCaches(boolean preserve_static_stubs) {
+    clearInlineCaches0(preserve_static_stubs);
+  }
 
   // Intered strings
   public native boolean isInStringTable(String str);
--- a/test/make/TestMakeBase.gmk	Thu Apr 14 09:09:21 2016 -0700
+++ b/test/make/TestMakeBase.gmk	Thu Apr 14 09:32:16 2016 -0700
@@ -254,4 +254,14 @@
       but was $(call sequence, 5, 15))
 endif
 
+################################################################################
+# Test that PathList is safe when called multiple nested times.
+
+PATHLIST_INPUT := foo bar baz
+
+$(eval $(call assert-equals, \
+    $(call PathList, $(call PathList, $(PATHLIST_INPUT))), \
+    $(call PathList, $(PATHLIST_INPUT)), \
+    PathList call not safe for calling twice))
+
 all: $(TEST_TARGETS)