Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita384377

Browse files
committed
8268626: Remove native pre-jdk9 support for jtreg failure handler
Backport-of: 2e70bc35dffce47e85f5ca4eaa4c9bdba5afb95b
1 parent9a2c123 commita384377

File tree

4 files changed

+4
-100
lines changed

4 files changed

+4
-100
lines changed

‎make/test/BuildFailureHandler.gmk‎

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2016,2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016,2021, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -60,24 +60,6 @@ $(eval $(call SetupJavaCompilation, BUILD_FAILURE_HANDLER, \
6060

6161
TARGETS += $(BUILD_FAILURE_HANDLER)
6262

63-
################################################################################
64-
65-
ifeq ($(call isTargetOs, windows), true)
66-
67-
$(eval $(call SetupNativeCompilation, BUILD_LIBTIMEOUT_HANDLER, \
68-
NAME := timeoutHandler, \
69-
SRC := $(FH_BASEDIR)/src/windows/native/libtimeoutHandler, \
70-
OBJECT_DIR := $(FH_SUPPORT)/libtimeoutHandler, \
71-
OUTPUT_DIR := $(FH_SUPPORT), \
72-
CFLAGS := $(CFLAGS_JDKLIB), \
73-
LDFLAGS := $(LDFLAGS_JDKLIB), \
74-
OPTIMIZATION := LOW, \
75-
))
76-
77-
TARGETS += $(BUILD_LIBTIMEOUT_HANDLER)
78-
79-
endif
80-
8163
################################################################################
8264
# Targets for building test-image.
8365
################################################################################
@@ -99,10 +81,6 @@ IMAGES_TARGETS += $(COPY_FH)
9981
# Use JTREG_TESTS for jtreg tests parameter
10082
#
10183
RUN_DIR := $(FH_SUPPORT)/test
102-
# Add the dir of the dll to the path on windows
103-
ifeq ($(call isTargetOs, windows), true)
104-
export PATH := $(PATH);$(FH_SUPPORT)
105-
endif
10684

10785
test:
10886
$(RM) -r $(RUN_DIR)

‎test/failure_handler/Makefile‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,10 @@ SRC_DIR := $(shell cygpath -m "${SRC_DIR}")
5353
JAVA_HOME :=$(shell cygpath -m "${JAVA_HOME}")
5454
JTREG_HOME :=$(shell cygpath -m "${JTREG_HOME}")
5555
CLASSPATH :=$(shell cygpath -pm "${CLASSPATH}")
56-
CC := "cl.exe"
5756
endif
5857

5958
all: clean test
6059

61-
native: require_env
62-
ifeq ("${OS_NAME}", "Cygwin")
63-
"${CC}" src/windows/native/jdk/test/failurehandler/jtreg/*.c \
64-
-I"$(shell cygpath -w "${JAVA_HOME}/include")" \
65-
-I"$(shell cygpath -w "${JAVA_HOME}/include/win32")" \
66-
/link /DLL /OUT:timeoutHandler.dll
67-
endif
68-
6960
check_defined =$(foreach 1,$1,$(__check_defined))
7061
__check_defined =$(if$(value $1),,$(error $1 is not set))
7162

@@ -112,8 +103,8 @@ require_env:
112103
clean:
113104
rm -rf"${BUILD_DIR}""${RUN_DIR}"
114105

115-
build: classes native
106+
build: classes
116107

117-
.PHONY: all build classesnativetest require_env clean
108+
.PHONY: all build classes test require_env clean
118109
.DEFAULT: all
119110

‎test/failure_handler/src/share/classes/jdk/test/failurehandler/jtreg/GatherProcessInfoTimeoutHandler.java‎

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015,2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015,2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,6 @@
3030
importjava.io.FileWriter;
3131
importjava.io.IOException;
3232
importjava.io.PrintWriter;
33-
importjava.lang.reflect.Field;
3433
importjava.nio.file.Path;
3534

3635
/**
@@ -102,33 +101,6 @@ protected void runActions(Process process, long pid)
102101
}
103102
}
104103

105-
@Override
106-
protectedlonggetProcessId(Processprocess) {
107-
longresult =super.getProcessId(process);
108-
if (result ==0L) {
109-
/* jtreg didn't find pid, most probably we are on JDK < 9
110-
there is no Process::getPid */
111-
if (HAS_NATIVE_LIBRARY &&"windows".equals(OS.current().family)) {
112-
try {
113-
Fieldfield =process.getClass().getDeclaredField("handle");
114-
booleanold =field.canAccess(process);
115-
try {
116-
field.setAccessible(true);
117-
longhandle =field.getLong(process);
118-
result =getWin32Pid(handle);
119-
}finally {
120-
field.setAccessible(old);
121-
}
122-
}catch (ReflectiveOperationExceptione) {
123-
e.printStackTrace(log);
124-
}
125-
}
126-
}
127-
returnresult;
128-
}
129-
130-
privatenativelonggetWin32Pid(longhandle);
131-
132104
privatevoidrunGatherer(Stringname,PathworkDir,PrintWriterlog,
133105
PrintWriterout,longpid) {
134106
try (HtmlPagehtml =newHtmlPage(out)) {

‎test/failure_handler/src/windows/native/libtimeoutHandler/GatherProcessInfoTimeoutHandler.c‎

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp