8211978: Move testlibrary/jdk/testlibrary/SimpleSSLContext.java and testkeys to network testlibrary
authorjjiang
Mon, 15 Oct 2018 22:47:03 +0800
changeset 52121 934969c63223
parent 52120 84fe81feae26
child 52122 cb20bf10cfbd
8211978: Move testlibrary/jdk/testlibrary/SimpleSSLContext.java and testkeys to network testlibrary Summary: Move SimpleSSLContext.java and testkeys to test/lib/jdk/test/lib/net Reviewed-by: chegar
test/jdk/com/sun/net/httpserver/SelCacheTest.java
test/jdk/com/sun/net/httpserver/Test1.java
test/jdk/com/sun/net/httpserver/Test12.java
test/jdk/com/sun/net/httpserver/Test13.java
test/jdk/com/sun/net/httpserver/Test6a.java
test/jdk/com/sun/net/httpserver/Test7a.java
test/jdk/com/sun/net/httpserver/Test8a.java
test/jdk/com/sun/net/httpserver/Test9.java
test/jdk/com/sun/net/httpserver/Test9a.java
test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPSetAuthenticatorTest.java
test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTest.java
test/jdk/java/net/URLPermission/URLTest.java
test/jdk/java/net/httpclient/AbstractNoBody.java
test/jdk/java/net/httpclient/AbstractThrowingPublishers.java
test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java
test/jdk/java/net/httpclient/AbstractThrowingSubscribers.java
test/jdk/java/net/httpclient/AsFileDownloadTest.java
test/jdk/java/net/httpclient/AsFileDownloadTest.policy
test/jdk/java/net/httpclient/BasicRedirectTest.java
test/jdk/java/net/httpclient/CancelledResponse.java
test/jdk/java/net/httpclient/ConcurrentResponses.java
test/jdk/java/net/httpclient/CookieHeaderTest.java
test/jdk/java/net/httpclient/CustomRequestPublisher.java
test/jdk/java/net/httpclient/CustomResponseSubscriber.java
test/jdk/java/net/httpclient/DependentActionsTest.java
test/jdk/java/net/httpclient/DependentPromiseActionsTest.java
test/jdk/java/net/httpclient/DigestEchoClient.java
test/jdk/java/net/httpclient/DigestEchoClientSSL.java
test/jdk/java/net/httpclient/EchoHandler.java
test/jdk/java/net/httpclient/EncodedCharsInURI.java
test/jdk/java/net/httpclient/EscapedOctetsInURI.java
test/jdk/java/net/httpclient/ExpectContinue.java
test/jdk/java/net/httpclient/FlowAdapterPublisherTest.java
test/jdk/java/net/httpclient/FlowAdapterSubscriberTest.java
test/jdk/java/net/httpclient/HeadTest.java
test/jdk/java/net/httpclient/HttpClientBuilderTest.java
test/jdk/java/net/httpclient/HttpEchoHandler.java
test/jdk/java/net/httpclient/HttpsTunnelTest.java
test/jdk/java/net/httpclient/ImmutableFlowItems.java
test/jdk/java/net/httpclient/InvalidInputStreamSubscriptionRequest.java
test/jdk/java/net/httpclient/InvalidSSLContextTest.java
test/jdk/java/net/httpclient/InvalidSubscriptionRequest.java
test/jdk/java/net/httpclient/LightWeightHttpServer.java
test/jdk/java/net/httpclient/LineBodyHandlerTest.java
test/jdk/java/net/httpclient/ManyRequests.java
test/jdk/java/net/httpclient/ManyRequests2.java
test/jdk/java/net/httpclient/ManyRequestsLegacy.java
test/jdk/java/net/httpclient/MappingResponseSubscriber.java
test/jdk/java/net/httpclient/MaxStreams.java
test/jdk/java/net/httpclient/NoBodyPartOne.java
test/jdk/java/net/httpclient/NoBodyPartTwo.java
test/jdk/java/net/httpclient/NonAsciiCharsInURI.java
test/jdk/java/net/httpclient/ProxyAuthDisabledSchemes.java
test/jdk/java/net/httpclient/ProxyAuthDisabledSchemesSSL.java
test/jdk/java/net/httpclient/ProxyTest.java
test/jdk/java/net/httpclient/RedirectMethodChange.java
test/jdk/java/net/httpclient/RedirectWithCookie.java
test/jdk/java/net/httpclient/RequestBodyTest.java
test/jdk/java/net/httpclient/RequestBodyTest.policy
test/jdk/java/net/httpclient/ResponseBodyBeforeError.java
test/jdk/java/net/httpclient/ResponsePublisher.java
test/jdk/java/net/httpclient/RetryWithCookie.java
test/jdk/java/net/httpclient/ServerCloseTest.java
test/jdk/java/net/httpclient/ShortResponseBody.java
test/jdk/java/net/httpclient/ShortResponseBodyWithRetry.java
test/jdk/java/net/httpclient/SmokeTest.java
test/jdk/java/net/httpclient/SpecialHeadersTest.java
test/jdk/java/net/httpclient/SplitResponse.java
test/jdk/java/net/httpclient/SplitResponseAsync.java
test/jdk/java/net/httpclient/SplitResponseKeepAlive.java
test/jdk/java/net/httpclient/SplitResponseKeepAliveAsync.java
test/jdk/java/net/httpclient/SplitResponseSSL.java
test/jdk/java/net/httpclient/SplitResponseSSLAsync.java
test/jdk/java/net/httpclient/SplitResponseSSLKeepAlive.java
test/jdk/java/net/httpclient/SplitResponseSSLKeepAliveAsync.java
test/jdk/java/net/httpclient/StreamingBody.java
test/jdk/java/net/httpclient/ThrowingPublishersCustomAfterCancel.java
test/jdk/java/net/httpclient/ThrowingPublishersCustomBeforeCancel.java
test/jdk/java/net/httpclient/ThrowingPublishersIOAfterCancel.java
test/jdk/java/net/httpclient/ThrowingPublishersIOBeforeCancel.java
test/jdk/java/net/httpclient/ThrowingPublishersInNextRequest.java
test/jdk/java/net/httpclient/ThrowingPublishersInRequest.java
test/jdk/java/net/httpclient/ThrowingPublishersInSubscribe.java
test/jdk/java/net/httpclient/ThrowingPublishersSanity.java
test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamCustom.java
test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamIO.java
test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesCustom.java
test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesIO.java
test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringCustom.java
test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringIO.java
test/jdk/java/net/httpclient/ThrowingPushPromisesSanity.java
test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStream.java
test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStreamAsync.java
test/jdk/java/net/httpclient/ThrowingSubscribersAsLines.java
test/jdk/java/net/httpclient/ThrowingSubscribersAsLinesAsync.java
test/jdk/java/net/httpclient/ThrowingSubscribersAsString.java
test/jdk/java/net/httpclient/ThrowingSubscribersAsStringAsync.java
test/jdk/java/net/httpclient/ThrowingSubscribersSanity.java
test/jdk/java/net/httpclient/TimeoutBasic.java
test/jdk/java/net/httpclient/UnauthorizedTest.java
test/jdk/java/net/httpclient/UnknownBodyLengthTest.java
test/jdk/java/net/httpclient/dependent.policy
test/jdk/java/net/httpclient/http2/BadHeadersTest.java
test/jdk/java/net/httpclient/http2/BasicTest.java
test/jdk/java/net/httpclient/http2/ContinuationFrameTest.java
test/jdk/java/net/httpclient/http2/ErrorTest.java
test/jdk/java/net/httpclient/http2/FixedThreadPoolTest.java
test/jdk/java/net/httpclient/http2/ImplicitPushCancel.java
test/jdk/java/net/httpclient/http2/ProxyTest2.java
test/jdk/java/net/httpclient/http2/RedirectTest.java
test/jdk/java/net/httpclient/http2/ServerPush.java
test/jdk/java/net/httpclient/http2/ServerPushWithDiffTypes.java
test/jdk/java/net/httpclient/security/Driver.java
test/jdk/java/net/httpclient/security/Security.java
test/jdk/java/net/httpclient/websocket/WSHandshakeExceptionTest.java
test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/AbstractSSLTubeTest.java
test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/FlowTest.java
test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/SimpleSSLContext.java
test/jdk/javax/net/ssl/HttpsURLConnection/Equals.java
test/jdk/lib/testlibrary/jdk/testlibrary/SimpleSSLContext.java
test/jdk/lib/testlibrary/jdk/testlibrary/testkeys
test/jdk/sun/net/www/protocol/http/RedirectOnPost.java
test/lib/jdk/test/lib/net/SimpleSSLContext.java
test/lib/jdk/test/lib/net/testkeys
--- a/test/jdk/com/sun/net/httpserver/SelCacheTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/com/sun/net/httpserver/SelCacheTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -24,14 +24,14 @@
 /**
  * @test
  * @bug 6270015
- * @library /lib/testlibrary/
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run main/othervm -Dsun.net.httpserver.selCacheTimeout=2 SelCacheTest
  * @summary  Light weight HTTP server
  */
 
 import com.sun.net.httpserver.*;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 import java.util.*;
 import java.util.concurrent.*;
--- a/test/jdk/com/sun/net/httpserver/Test1.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/com/sun/net/httpserver/Test1.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -24,8 +24,8 @@
 /**
  * @test
  * @bug 6270015
- * @library /lib/testlibrary/
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run main/othervm Test1
  * @run main/othervm -Dsun.net.httpserver.maxReqTime=10 Test1
  * @run main/othervm -Dsun.net.httpserver.nodelay=true Test1
@@ -38,7 +38,7 @@
 import java.io.*;
 import java.net.*;
 import javax.net.ssl.*;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 /* basic http/s connectivity test
  * Tests:
--- a/test/jdk/com/sun/net/httpserver/Test12.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/com/sun/net/httpserver/Test12.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -24,10 +24,10 @@
 /**
  * @test
  * @bug 6270015
- * @library /lib/testlibrary/
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run main/othervm Test12
- * @summary  Light weight HTTP server
+ * @summary Light weight HTTP server
  */
 
 import com.sun.net.httpserver.*;
@@ -36,7 +36,7 @@
 import java.io.*;
 import java.net.*;
 import javax.net.ssl.*;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 /* basic http/s connectivity test
  * Tests:
--- a/test/jdk/com/sun/net/httpserver/Test13.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/com/sun/net/httpserver/Test13.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -24,10 +24,10 @@
 /**
  * @test
  * @bug 6270015
- * @library /lib/testlibrary/
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run main/othervm Test13
- * @summary  Light weight HTTP server
+ * @summary Light weight HTTP server
  */
 
 import com.sun.net.httpserver.*;
@@ -37,7 +37,7 @@
 import java.io.*;
 import java.net.*;
 import javax.net.ssl.*;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 /* basic http/s connectivity test
  * Tests:
--- a/test/jdk/com/sun/net/httpserver/Test6a.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/com/sun/net/httpserver/Test6a.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -24,10 +24,10 @@
 /**
  * @test
  * @bug 6270015
- * @library /lib/testlibrary/
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run main/othervm Test6a
- * @summary  Light weight HTTP server
+ * @summary Light weight HTTP server
  */
 
 import com.sun.net.httpserver.*;
@@ -36,7 +36,7 @@
 import java.io.*;
 import java.net.*;
 import javax.net.ssl.*;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 /**
  * Test https POST large file via chunked encoding (unusually small chunks)
--- a/test/jdk/com/sun/net/httpserver/Test7a.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/com/sun/net/httpserver/Test7a.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -24,10 +24,10 @@
 /**
  * @test
  * @bug 6270015
- * @library /lib/testlibrary/
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run main/othervm Test7a
- * @summary  Light weight HTTP server
+ * @summary Light weight HTTP server
  */
 
 import com.sun.net.httpserver.*;
@@ -36,7 +36,7 @@
 import java.io.*;
 import java.net.*;
 import javax.net.ssl.*;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 /**
  * Test POST large file via chunked encoding (large chunks)
--- a/test/jdk/com/sun/net/httpserver/Test8a.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/com/sun/net/httpserver/Test8a.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -24,10 +24,10 @@
 /**
  * @test
  * @bug 6270015
- * @library /lib/testlibrary/
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run main/othervm Test8a
- * @summary  Light weight HTTP server
+ * @summary Light weight HTTP server
  */
 
 import com.sun.net.httpserver.*;
@@ -36,7 +36,7 @@
 import java.io.*;
 import java.net.*;
 import javax.net.ssl.*;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 /**
  * Test POST large file via fixed len encoding
--- a/test/jdk/com/sun/net/httpserver/Test9.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/com/sun/net/httpserver/Test9.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -24,10 +24,10 @@
 /**
  * @test
  * @bug 6270015
- * @library /lib/testlibrary/
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run main/othervm Test9
- * @summary  Light weight HTTP server
+ * @summary Light weight HTTP server
  */
 
 import com.sun.net.httpserver.*;
@@ -36,7 +36,7 @@
 import java.io.*;
 import java.net.*;
 import javax.net.ssl.*;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 /* Same as Test1 but requests run in parallel.
  */
--- a/test/jdk/com/sun/net/httpserver/Test9a.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/com/sun/net/httpserver/Test9a.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -24,10 +24,10 @@
 /**
  * @test
  * @bug 6270015
- * @library /lib/testlibrary/
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run main/othervm Test9a
- * @summary  Light weight HTTP server
+ * @summary Light weight HTTP server
  */
 
 import com.sun.net.httpserver.*;
@@ -36,7 +36,7 @@
 import java.io.*;
 import java.net.*;
 import javax.net.ssl.*;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 /* Same as Test1 but requests run in parallel.
  */
--- a/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPSetAuthenticatorTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPSetAuthenticatorTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -35,12 +35,12 @@
 /*
  * @test
  * @bug 8169415
- * @library /lib/testlibrary/
+ * @library /test/lib
  * @modules java.logging
  *          java.base/sun.net.www
  *          java.base/sun.net.www.protocol.http
  *          jdk.httpserver/sun.net.httpserver
- * @build jdk.testlibrary.SimpleSSLContext HTTPTest HTTPTestServer HTTPTestClient HTTPSetAuthenticatorTest
+ * @build jdk.test.lib.net.SimpleSSLContext HTTPTest HTTPTestServer HTTPTestClient HTTPSetAuthenticatorTest
  * @summary A simple HTTP test that starts an echo server supporting the given
  *          authentication scheme, then starts a regular HTTP client to invoke it.
  *          The client first does a GET request on "/", then follows on
--- a/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -41,16 +41,16 @@
 import javax.net.ssl.HttpsURLConnection;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLSession;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 /*
  * @test
  * @bug 8169415
- * @library /lib/testlibrary/
+ * @library /test/lib
  * @modules java.logging
  *          java.base/sun.net.www
  *          jdk.httpserver/sun.net.httpserver
- * @build jdk.testlibrary.SimpleSSLContext HTTPTest HTTPTestServer HTTPTestClient
+ * @build jdk.test.lib.net.SimpleSSLContext HTTPTest HTTPTestServer HTTPTestClient
  * @summary A simple HTTP test that starts an echo server supporting Digest
  *          authentication, then starts a regular HTTP client to invoke it.
  *          The client first does a GET request on "/", then follows on
--- a/test/jdk/java/net/URLPermission/URLTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/URLPermission/URLTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -26,8 +26,8 @@
  * @test
  * @bug 8010464
  * @modules jdk.httpserver
- * @library /lib/testlibrary/
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run main/othervm URLTest
  * @summary check URLPermission with Http(s)URLConnection
  */
@@ -38,7 +38,7 @@
 import java.util.concurrent.*;
 import com.sun.net.httpserver.*;
 import javax.net.ssl.*;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 public class URLTest {
 
--- a/test/jdk/java/net/httpclient/AbstractNoBody.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/AbstractNoBody.java	Mon Oct 15 22:47:03 2018 +0800
@@ -35,7 +35,7 @@
 import com.sun.net.httpserver.HttpsServer;
 import java.net.http.HttpClient;
 import javax.net.ssl.SSLContext;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/AbstractThrowingPublishers.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/AbstractThrowingPublishers.java	Mon Oct 15 22:47:03 2018 +0800
@@ -24,7 +24,7 @@
 import com.sun.net.httpserver.HttpServer;
 import com.sun.net.httpserver.HttpsConfigurator;
 import com.sun.net.httpserver.HttpsServer;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
--- a/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when push promise handlers and their
  *          response body handlers and subscribers throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
   *       ReferenceTracker AbstractThrowingPushPromises
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
@@ -35,7 +35,7 @@
  * @run testng/othervm -Djdk.internal.httpclient.debug=true AbstractThrowingPushPromises
  */
 
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeTest;
--- a/test/jdk/java/net/httpclient/AbstractThrowingSubscribers.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/AbstractThrowingSubscribers.java	Mon Oct 15 22:47:03 2018 +0800
@@ -24,7 +24,7 @@
 import com.sun.net.httpserver.HttpServer;
 import com.sun.net.httpserver.HttpsConfigurator;
 import com.sun.net.httpserver.HttpsServer;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeTest;
--- a/test/jdk/java/net/httpclient/AsFileDownloadTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/AsFileDownloadTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -31,9 +31,9 @@
  *          java.net.http/jdk.internal.net.http.hpack
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary /test/lib http2/server
+ * @library /test/lib http2/server
  * @build Http2TestServer
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @build jdk.test.lib.Platform
  * @build jdk.test.lib.util.FileUtils
  * @run testng/othervm AsFileDownloadTest
@@ -67,7 +67,7 @@
 import java.util.Locale;
 import java.util.Map;
 import javax.net.ssl.SSLContext;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import jdk.test.lib.util.FileUtils;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
--- a/test/jdk/java/net/httpclient/AsFileDownloadTest.policy	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/AsFileDownloadTest.policy	Mon Oct 15 22:47:03 2018 +0800
@@ -21,10 +21,10 @@
 // questions.
 //
 
-// for JTwork/classes/0/lib/testlibrary/jdk/testlibrary/SimpleSSLContext.class
-grant codeBase "file:${test.classes}/../../../../lib/testlibrary/-" {
+// for JTwork/classes/0/test/lib/jdk/test/lib/net/SimpleSSLContext.class
+grant codeBase "file:${test.classes}/../../../../test/lib/-" {
     permission java.util.PropertyPermission "test.src.path", "read";
-    permission java.io.FilePermission "${test.src}/../../../lib/testlibrary/jdk/testlibrary/testkeys", "read";
+    permission java.io.FilePermission "${test.src}/../../../../lib/jdk/test/lib/net/testkeys", "read";
 };
 
 // for JTwork//classes/0/java/net/httpclient/http2/server/*
--- a/test/jdk/java/net/httpclient/BasicRedirectTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/BasicRedirectTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -30,9 +30,9 @@
  *          java.net.http/jdk.internal.net.http.hpack
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary /test/lib http2/server
+ * @library /test/lib http2/server
  * @build Http2TestServer
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm
  *       -Djdk.httpclient.HttpClient.log=trace,headers,requests
  *       BasicRedirectTest
@@ -53,7 +53,7 @@
 import java.net.http.HttpResponse;
 import java.net.http.HttpResponse.BodyHandlers;
 import javax.net.ssl.SSLContext;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/CancelledResponse.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/CancelledResponse.java	Mon Oct 15 22:47:03 2018 +0800
@@ -26,7 +26,7 @@
 import java.net.http.HttpHeaders;
 import java.net.http.HttpRequest;
 import java.net.http.HttpResponse;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 import javax.net.ServerSocketFactory;
 import javax.net.ssl.SSLContext;
@@ -55,9 +55,9 @@
 /**
  * @test
  * @bug 8087112
- * @library /lib/testlibrary
+ * @library /test/lib
  * @modules java.net.http/jdk.internal.net.http.common
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @build MockServer ReferenceTracker
  * @run main/othervm  CancelledResponse
  * @run main/othervm  CancelledResponse SSL
--- a/test/jdk/java/net/httpclient/ConcurrentResponses.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ConcurrentResponses.java	Mon Oct 15 22:47:03 2018 +0800
@@ -32,9 +32,9 @@
  *          java.net.http/jdk.internal.net.http.hpack
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary http2/server
+ * @library /test/lib http2/server
  * @build Http2TestServer
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm
  *      -Djdk.httpclient.HttpClient.log=headers,errors,channel
  *      ConcurrentResponses
@@ -67,7 +67,7 @@
 import java.net.http.HttpResponse.BodyHandlers;
 import java.net.http.HttpResponse.BodySubscriber;
 import java.net.http.HttpResponse.BodySubscribers;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/CookieHeaderTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/CookieHeaderTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -31,9 +31,9 @@
  *          java.net.http/jdk.internal.net.http.hpack
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary /test/lib http2/server
+ * @library /test/lib http2/server
  * @build Http2TestServer
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm
  *       -Djdk.tls.acknowledgeCloseNotify=true
  *       -Djdk.httpclient.HttpClient.log=trace,headers,requests
@@ -43,7 +43,7 @@
 import com.sun.net.httpserver.HttpServer;
 import com.sun.net.httpserver.HttpsConfigurator;
 import com.sun.net.httpserver.HttpsServer;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/CustomRequestPublisher.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/CustomRequestPublisher.java	Mon Oct 15 22:47:03 2018 +0800
@@ -30,9 +30,9 @@
  *          java.net.http/jdk.internal.net.http.hpack
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary http2/server
+ * @library /test/lib http2/server
  * @build Http2TestServer
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm CustomRequestPublisher
  */
 
@@ -62,7 +62,7 @@
 import java.net.http.HttpClient;
 import java.net.http.HttpRequest;
 import java.net.http.HttpResponse;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/CustomResponseSubscriber.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/CustomResponseSubscriber.java	Mon Oct 15 22:47:03 2018 +0800
@@ -24,8 +24,8 @@
 /*
  * @test
  * @summary Tests response body subscribers's onComplete is not invoked before onSubscribe
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
@@ -57,7 +57,7 @@
 import java.net.http.HttpResponse.BodySubscriber;
 import java.net.http.HttpResponse.BodySubscribers;
 import javax.net.ssl.SSLContext;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/DependentActionsTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/DependentActionsTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -26,8 +26,8 @@
  * @summary Verify that dependent synchronous actions added before the CF
  *          completes are executed either asynchronously in an executor when the
  *          CF later completes, or in the user thread that joins.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters DependentActionsTest
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DependentActionsTest
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
@@ -43,7 +43,7 @@
 import com.sun.net.httpserver.HttpServer;
 import com.sun.net.httpserver.HttpsConfigurator;
 import com.sun.net.httpserver.HttpsServer;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeTest;
--- a/test/jdk/java/net/httpclient/DependentPromiseActionsTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/DependentPromiseActionsTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -26,8 +26,8 @@
  * @summary Verify that dependent synchronous actions added before the promise CF
  *          completes are executed either asynchronously in an executor when the
  *          CF later completes, or in the user thread that joins.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters DependentPromiseActionsTest
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DependentPromiseActionsTest
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
@@ -40,7 +40,7 @@
 import java.io.BufferedReader;
 import java.io.InputStreamReader;
 import java.lang.StackWalker.StackFrame;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeTest;
--- a/test/jdk/java/net/httpclient/DigestEchoClient.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/DigestEchoClient.java	Mon Oct 15 22:47:03 2018 +0800
@@ -51,7 +51,7 @@
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 import javax.net.ssl.SSLContext;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import sun.net.NetProperties;
 import sun.net.www.HeaderParser;
 import static java.lang.System.out;
@@ -62,8 +62,8 @@
  * @summary this test verifies that a client may provides authorization
  *          headers directly when connecting with a server.
  * @bug 8087112
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters DigestEchoServer
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DigestEchoServer
  *        ReferenceTracker DigestEchoClient
  * @modules java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
--- a/test/jdk/java/net/httpclient/DigestEchoClientSSL.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/DigestEchoClientSSL.java	Mon Oct 15 22:47:03 2018 +0800
@@ -26,8 +26,8 @@
  * @bug 8087112
  * @summary this test verifies that a client may provides authorization
  *          headers directly when connecting with a server over SSL.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext DigestEchoServer
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext DigestEchoServer
  *        DigestEchoClient ReferenceTracker DigestEchoClientSSL
  * @modules java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
--- a/test/jdk/java/net/httpclient/EchoHandler.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/EchoHandler.java	Mon Oct 15 22:47:03 2018 +0800
@@ -32,7 +32,7 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Random;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import static java.net.http.HttpRequest.*;
 import static java.net.http.HttpResponse.*;
 import java.util.logging.ConsoleHandler;
--- a/test/jdk/java/net/httpclient/EncodedCharsInURI.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/EncodedCharsInURI.java	Mon Oct 15 22:47:03 2018 +0800
@@ -26,8 +26,8 @@
  * @bug 8199683
  * @summary Tests that escaped characters in URI are correctly
  *          handled (not re-escaped and not unescaped)
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters EncodedCharsInURI
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters EncodedCharsInURI
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
@@ -42,7 +42,7 @@
 import com.sun.net.httpserver.HttpServer;
 import com.sun.net.httpserver.HttpsConfigurator;
 import com.sun.net.httpserver.HttpsServer;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
--- a/test/jdk/java/net/httpclient/EscapedOctetsInURI.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/EscapedOctetsInURI.java	Mon Oct 15 22:47:03 2018 +0800
@@ -31,9 +31,9 @@
  *          java.net.http/jdk.internal.net.http.hpack
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary http2/server
+ * @library /test/lib http2/server
  * @build Http2TestServer
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm
  *       -Djdk.httpclient.HttpClient.log=reqeusts,headers
  *       EscapedOctetsInURI
@@ -58,7 +58,7 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/ExpectContinue.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ExpectContinue.java	Mon Oct 15 22:47:03 2018 +0800
@@ -26,8 +26,8 @@
  * @summary Basic test for Expect 100-Continue ( HTTP/1.1 only )
  * @modules java.net.http
  *          jdk.httpserver
- * @library /lib/testlibrary
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm ExpectContinue
  */
 
@@ -49,7 +49,7 @@
 import java.net.http.HttpResponse.BodyHandlers;
 import java.util.List;
 import javax.net.ssl.SSLContext;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/FlowAdapterPublisherTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/FlowAdapterPublisherTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -43,7 +43,7 @@
 import java.net.http.HttpClient;
 import java.net.http.HttpRequest;
 import java.net.http.HttpResponse;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
@@ -67,9 +67,9 @@
  *          java.net.http/jdk.internal.net.http.hpack
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary http2/server
+ * @library /test/lib http2/server
  * @build Http2TestServer
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm FlowAdapterPublisherTest
  */
 
--- a/test/jdk/java/net/httpclient/FlowAdapterSubscriberTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/FlowAdapterSubscriberTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -48,7 +48,7 @@
 import java.net.http.HttpResponse;
 import java.net.http.HttpResponse.BodyHandlers;
 import java.net.http.HttpResponse.BodySubscribers;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
@@ -68,9 +68,9 @@
  *          java.net.http/jdk.internal.net.http.hpack
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary http2/server
+ * @library /test/lib http2/server
  * @build Http2TestServer
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm -Djdk.internal.httpclient.debug=true FlowAdapterSubscriberTest
  */
 
--- a/test/jdk/java/net/httpclient/HeadTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/HeadTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -31,9 +31,9 @@
  *          java.net.http/jdk.internal.net.http.hpack
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary /test/lib http2/server
+ * @library /test/lib http2/server
  * @build Http2TestServer
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm
  *       -Djdk.httpclient.HttpClient.log=trace,headers,requests
  *       HeadTest
@@ -42,7 +42,7 @@
 import com.sun.net.httpserver.HttpServer;
 import com.sun.net.httpserver.HttpsConfigurator;
 import com.sun.net.httpserver.HttpsServer;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/HttpClientBuilderTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/HttpClientBuilderTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -48,7 +48,7 @@
 import java.net.http.HttpClient;
 import java.net.http.HttpClient.Redirect;
 import java.net.http.HttpClient.Version;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.Test;
 import static java.time.Duration.*;
 import static org.testng.Assert.*;
@@ -56,8 +56,8 @@
 /*
  * @test
  * @summary HttpClient[.Builder] API and behaviour checks
- * @library /lib/testlibrary/
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng HttpClientBuilderTest
  */
 
--- a/test/jdk/java/net/httpclient/HttpEchoHandler.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/HttpEchoHandler.java	Mon Oct 15 22:47:03 2018 +0800
@@ -32,7 +32,7 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Random;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import static java.net.http.HttpRequest.*;
 import static java.net.http.HttpResponse.*;
 import java.util.logging.ConsoleHandler;
--- a/test/jdk/java/net/httpclient/HttpsTunnelTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/HttpsTunnelTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -23,7 +23,7 @@
 
 import com.sun.net.httpserver.HttpsConfigurator;
 import com.sun.net.httpserver.HttpsServer;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import javax.net.ssl.SSLContext;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
@@ -49,8 +49,8 @@
  *          be preemptively downgraded. That, is the stack should attempt
  *          a new h2 connection to the new host.
  * @bug 8196967
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters DigestEchoServer HttpsTunnelTest
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DigestEchoServer HttpsTunnelTest
  * @modules java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
  *          java.net.http/jdk.internal.net.http.hpack
--- a/test/jdk/java/net/httpclient/ImmutableFlowItems.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ImmutableFlowItems.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests response body subscribers's onNext's Lists are unmodifiable,
  *          and that the buffers are read-only
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
@@ -57,7 +57,7 @@
 import java.net.http.HttpResponse.BodySubscriber;
 import java.net.http.HttpResponse.BodySubscribers;
 import javax.net.ssl.SSLContext;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/InvalidInputStreamSubscriptionRequest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/InvalidInputStreamSubscriptionRequest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -26,8 +26,8 @@
  * @summary Tests an asynchronous BodySubscriber that completes
  *          immediately with an InputStream which issues bad
  *          requests
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext ReferenceTracker
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext ReferenceTracker
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
@@ -38,7 +38,7 @@
 import com.sun.net.httpserver.HttpServer;
 import com.sun.net.httpserver.HttpsConfigurator;
 import com.sun.net.httpserver.HttpsServer;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
--- a/test/jdk/java/net/httpclient/InvalidSSLContextTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/InvalidSSLContextTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Test to ensure the HTTP client throws an appropriate SSL exception
  *          when SSL context is not valid.
- * @library /lib/testlibrary
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm -Djdk.internal.httpclient.debug=true InvalidSSLContextTest
  */
 
@@ -47,7 +47,7 @@
 import java.net.http.HttpRequest;
 import java.net.http.HttpResponse;
 import java.net.http.HttpResponse.BodyHandlers;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.Assert;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
--- a/test/jdk/java/net/httpclient/InvalidSubscriptionRequest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/InvalidSubscriptionRequest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -27,8 +27,8 @@
  * @summary Tests an asynchronous BodySubscriber that completes
  *          immediately with a Publisher<List<ByteBuffer>> whose
  *          subscriber issues bad requests
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext ReferenceTracker
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext ReferenceTracker
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
@@ -39,7 +39,7 @@
 import com.sun.net.httpserver.HttpServer;
 import com.sun.net.httpserver.HttpsConfigurator;
 import com.sun.net.httpserver.HttpsServer;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/LightWeightHttpServer.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/LightWeightHttpServer.java	Mon Oct 15 22:47:03 2018 +0800
@@ -22,8 +22,8 @@
  */
 
 /**
- * library /lib/testlibrary/ /
- * build jdk.testlibrary.SimpleSSLContext ProxyServer
+ * library /test/lib /
+ * build jdk.test.lib.net.SimpleSSLContext ProxyServer
  * compile ../../../com/sun/net/httpserver/LogFilter.java
  * compile ../../../com/sun/net/httpserver/EchoHandler.java
  * compile ../../../com/sun/net/httpserver/FileServerHandler.java
@@ -50,7 +50,7 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import javax.net.ssl.SSLContext;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 public class LightWeightHttpServer {
 
--- a/test/jdk/java/net/httpclient/LineBodyHandlerTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/LineBodyHandlerTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -52,7 +52,7 @@
 import com.sun.net.httpserver.HttpServer;
 import com.sun.net.httpserver.HttpsConfigurator;
 import com.sun.net.httpserver.HttpsServer;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
@@ -77,9 +77,9 @@
  *          java.net.http/jdk.internal.net.http.hpack
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary http2/server
+ * @library /test/lib http2/server
  * @build Http2TestServer LineBodyHandlerTest HttpServerAdapters
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm LineBodyHandlerTest
  */
 
--- a/test/jdk/java/net/httpclient/ManyRequests.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ManyRequests.java	Mon Oct 15 22:47:03 2018 +0800
@@ -27,8 +27,8 @@
  * @modules java.net.http
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary/ /
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @compile ../../../com/sun/net/httpserver/LogFilter.java
  * @compile ../../../com/sun/net/httpserver/EchoHandler.java
  * @compile ../../../com/sun/net/httpserver/FileServerHandler.java
@@ -63,7 +63,7 @@
 import java.util.logging.Level;
 import java.util.concurrent.CompletableFuture;
 import javax.net.ssl.SSLContext;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 public class ManyRequests {
 
--- a/test/jdk/java/net/httpclient/ManyRequests2.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ManyRequests2.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -27,8 +27,8 @@
  * @modules java.net.http
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary/ /
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @compile ../../../com/sun/net/httpserver/LogFilter.java
  * @compile ../../../com/sun/net/httpserver/EchoHandler.java
  * @compile ../../../com/sun/net/httpserver/FileServerHandler.java
@@ -36,8 +36,11 @@
  * @run main/othervm/timeout=40 -Dtest.XFixed=true ManyRequests2
  * @run main/othervm/timeout=40 -Dtest.XFixed=true -Dtest.insertDelay=true ManyRequests2
  * @run main/othervm/timeout=40 -Dtest.XFixed=true -Dtest.chunkSize=64 ManyRequests2
- * @run main/othervm/timeout=40 -Djdk.internal.httpclient.debug=true -Dtest.XFixed=true -Dtest.insertDelay=true -Dtest.chunkSize=64 ManyRequests2
- * @summary Send a large number of requests asynchronously. The server echoes back using known content length.
+ * @run main/othervm/timeout=40 -Djdk.internal.httpclient.debug=true
+ *                              -Dtest.XFixed=true -Dtest.insertDelay=true
+ *                              -Dtest.chunkSize=64 ManyRequests2
+ * @summary Send a large number of requests asynchronously.
+ *          The server echoes back using known content length.
  */
  // * @run main/othervm/timeout=40 -Djdk.httpclient.HttpClient.log=ssl ManyRequests
 
--- a/test/jdk/java/net/httpclient/ManyRequestsLegacy.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ManyRequestsLegacy.java	Mon Oct 15 22:47:03 2018 +0800
@@ -26,16 +26,19 @@
  * @modules java.net.http
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary/ /
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @compile ../../../com/sun/net/httpserver/LogFilter.java
  * @compile ../../../com/sun/net/httpserver/EchoHandler.java
  * @compile ../../../com/sun/net/httpserver/FileServerHandler.java
  * @run main/othervm/timeout=40 ManyRequestsLegacy
  * @run main/othervm/timeout=40 -Dtest.insertDelay=true ManyRequestsLegacy
  * @run main/othervm/timeout=40 -Dtest.chunkSize=64 ManyRequestsLegacy
- * @run main/othervm/timeout=40 -Dtest.insertDelay=true -Dtest.chunkSize=64 ManyRequestsLegacy
- * @summary Send a large number of requests asynchronously using the legacy URL.openConnection(), to help sanitize results of the test ManyRequest.java.
+ * @run main/othervm/timeout=40 -Dtest.insertDelay=true
+ *                              -Dtest.chunkSize=64 ManyRequestsLegacy
+ * @summary Send a large number of requests asynchronously using the legacy
+ *          URL.openConnection(), to help sanitize results of the test
+ *          ManyRequest.java.
  */
 
 import javax.net.ssl.HttpsURLConnection;
@@ -70,7 +73,7 @@
 import java.util.Random;
 import java.util.logging.Logger;
 import java.util.logging.Level;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 public class ManyRequestsLegacy {
 
--- a/test/jdk/java/net/httpclient/MappingResponseSubscriber.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/MappingResponseSubscriber.java	Mon Oct 15 22:47:03 2018 +0800
@@ -24,8 +24,8 @@
 /*
  * @test
  * @summary Tests mapped response subscriber
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
@@ -62,7 +62,7 @@
 import  java.net.http.HttpResponse.BodySubscriber;
 import java.util.function.Function;
 import javax.net.ssl.SSLContext;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/MaxStreams.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/MaxStreams.java	Mon Oct 15 22:47:03 2018 +0800
@@ -32,9 +32,9 @@
  *          java.net.http/jdk.internal.net.http.hpack
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary http2/server
+ * @library /test/lib http2/server
  * @build Http2TestServer
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm -ea -esa MaxStreams
  */
 
@@ -60,7 +60,7 @@
 import java.net.http.HttpResponse;
 import java.net.http.HttpResponse.BodyHandler;
 import java.net.http.HttpResponse.BodyHandlers;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/NoBodyPartOne.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/NoBodyPartOne.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @bug 8161157
  * @summary Test response body handlers/subscribers when there is no body
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
--- a/test/jdk/java/net/httpclient/NoBodyPartTwo.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/NoBodyPartTwo.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @bug 8161157
  * @summary Test response body handlers/subscribers when there is no body
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
--- a/test/jdk/java/net/httpclient/NonAsciiCharsInURI.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/NonAsciiCharsInURI.java	Mon Oct 15 22:47:03 2018 +0800
@@ -32,9 +32,9 @@
  *          java.net.http/jdk.internal.net.http.hpack
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary http2/server
+ * @library /test/lib http2/server
  * @build Http2TestServer
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @compile -encoding utf-8 NonAsciiCharsInURI.java
  * @run testng/othervm
  *       -Djdk.httpclient.HttpClient.log=reqeusts,headers
@@ -58,7 +58,7 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemes.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemes.java	Mon Oct 15 22:47:03 2018 +0800
@@ -28,8 +28,8 @@
  *          it verifies that the client honor the jdk.http.auth.*.disabledSchemes
  *          net properties.
  * @bug 8087112
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext DigestEchoServer DigestEchoClient
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext DigestEchoServer DigestEchoClient
  *        ReferenceTracker ProxyAuthDisabledSchemes
  * @modules java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
--- a/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemesSSL.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemesSSL.java	Mon Oct 15 22:47:03 2018 +0800
@@ -28,8 +28,8 @@
  *          headers directly when connecting with a server over SSL, and
  *          it verifies that the client honor the jdk.http.auth.*.disabledSchemes
  *          net properties.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext DigestEchoServer DigestEchoClient
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext DigestEchoServer DigestEchoClient
  *        ReferenceTracker ProxyAuthDisabledSchemesSSL
  * @modules java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
--- a/test/jdk/java/net/httpclient/ProxyTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ProxyTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -56,7 +56,7 @@
 import java.net.http.HttpClient;
 import java.net.http.HttpRequest;
 import java.net.http.HttpResponse;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 /**
  * @test
@@ -67,8 +67,8 @@
  *          an SSL Tunnel connection when the client is HTTP/2 and the server
  *          and proxy are HTTP/1.1
  * @modules java.net.http
- * @library /lib/testlibrary/
- * @build jdk.testlibrary.SimpleSSLContext ProxyTest
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext ProxyTest
  * @run main/othervm ProxyTest
  * @author danielfuchs
  */
--- a/test/jdk/java/net/httpclient/RedirectMethodChange.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/RedirectMethodChange.java	Mon Oct 15 22:47:03 2018 +0800
@@ -29,9 +29,9 @@
  *          java.net.http/jdk.internal.net.http.frame
  *          java.net.http/jdk.internal.net.http.hpack
  *          jdk.httpserver
- * @library /lib/testlibrary /test/lib http2/server
+ * @library /test/lib http2/server
  * @build Http2TestServer
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm RedirectMethodChange
  */
 
@@ -50,7 +50,7 @@
 import com.sun.net.httpserver.HttpServer;
 import com.sun.net.httpserver.HttpsConfigurator;
 import com.sun.net.httpserver.HttpsServer;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/RedirectWithCookie.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/RedirectWithCookie.java	Mon Oct 15 22:47:03 2018 +0800
@@ -30,9 +30,9 @@
  *          java.net.http/jdk.internal.net.http.hpack
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary /test/lib http2/server
+ * @library /test/lib http2/server
  * @build Http2TestServer
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm
  *       -Djdk.httpclient.HttpClient.log=trace,headers,requests
  *       RedirectWithCookie
@@ -55,7 +55,7 @@
 import java.net.http.HttpResponse.BodyHandlers;
 import java.util.List;
 import javax.net.ssl.SSLContext;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/RequestBodyTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/RequestBodyTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -27,11 +27,11 @@
  * @modules java.net.http
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary/ /test/lib
+ * @library /test/lib
  * @compile ../../../com/sun/net/httpserver/LogFilter.java
  * @compile ../../../com/sun/net/httpserver/EchoHandler.java
  * @compile ../../../com/sun/net/httpserver/FileServerHandler.java
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @build LightWeightHttpServer
  * @build jdk.test.lib.Platform
  * @build jdk.test.lib.util.FileUtils
--- a/test/jdk/java/net/httpclient/RequestBodyTest.policy	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/RequestBodyTest.policy	Mon Oct 15 22:47:03 2018 +0800
@@ -27,10 +27,10 @@
     permission java.io.FilePermission "RequestBodyTest.tmp", "read,delete";
 };
 
-// for JTwork/classes/0/lib/testlibrary/jdk/testlibrary/SimpleSSLContext.class
-grant codeBase "file:${test.classes}/../../../../lib/testlibrary/-" {
+// for JTwork/classes/0/test/lib/jdk/test/lib/net/SimpleSSLContext.class
+grant codeBase "file:${test.classes}/../../../../test/lib/-" {
     permission java.util.PropertyPermission "test.src.path", "read";
-    permission java.io.FilePermission "${test.src}/../../../lib/testlibrary/jdk/testlibrary/testkeys", "read";
+    permission java.io.FilePermission "${test.src}/../../../../lib/jdk/test/lib/net/testkeys", "read";
 };
 
 grant codeBase "file:${test.classes}/*" {
--- a/test/jdk/java/net/httpclient/ResponseBodyBeforeError.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ResponseBodyBeforeError.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests that all response body is delivered to the BodySubscriber
  *          before an abortive error terminates the flow
- * @library /lib/testlibrary
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm ResponseBodyBeforeError
  */
 
@@ -52,7 +52,7 @@
 import java.util.concurrent.CompletionStage;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Flow;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/ResponsePublisher.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ResponsePublisher.java	Mon Oct 15 22:47:03 2018 +0800
@@ -26,8 +26,8 @@
  * @bug 8201186
  * @summary Tests an asynchronous BodySubscriber that completes
  *          immediately with a Publisher<List<ByteBuffer>>
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
@@ -40,7 +40,7 @@
 import com.sun.net.httpserver.HttpServer;
 import com.sun.net.httpserver.HttpsConfigurator;
 import com.sun.net.httpserver.HttpsServer;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/RetryWithCookie.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/RetryWithCookie.java	Mon Oct 15 22:47:03 2018 +0800
@@ -31,9 +31,9 @@
  *          java.net.http/jdk.internal.net.http.hpack
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary /test/lib http2/server
+ * @library /test/lib http2/server
  * @build Http2TestServer
- * @build jdk.testlibrary.SimpleSSLContext ReferenceTracker
+ * @build jdk.test.lib.net.SimpleSSLContext ReferenceTracker
  * @run testng/othervm
  *       -Djdk.httpclient.HttpClient.log=trace,headers,requests
  *       RetryWithCookie
@@ -42,7 +42,7 @@
 import com.sun.net.httpserver.HttpServer;
 import com.sun.net.httpserver.HttpsConfigurator;
 import com.sun.net.httpserver.HttpsServer;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/ServerCloseTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ServerCloseTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests that our client deals correctly with servers that
  *          close the connection right after sending the last byte.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters EncodedCharsInURI
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters EncodedCharsInURI
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
@@ -35,7 +35,7 @@
  */
 //*        -Djdk.internal.httpclient.debug=true
 
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
--- a/test/jdk/java/net/httpclient/ShortResponseBody.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ShortResponseBody.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests Exception detail message when too few response bytes are
  *          received before a socket exception or eof.
- * @library /lib/testlibrary
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm
  *       -Djdk.httpclient.HttpClient.log=headers,errors,channel
  *       ShortResponseBody
@@ -55,7 +55,7 @@
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.stream.Stream;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/ShortResponseBodyWithRetry.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ShortResponseBodyWithRetry.java	Mon Oct 15 22:47:03 2018 +0800
@@ -24,8 +24,8 @@
 /*
  * @test
  * @summary Run of ShortResponseBody with -Djdk.httpclient.enableAllMethodRetry
- * @library /lib/testlibrary
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @build ShortResponseBody
  * @run testng/othervm
  *       -Djdk.httpclient.HttpClient.log=headers,errors,channel
--- a/test/jdk/java/net/httpclient/SmokeTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/SmokeTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -27,8 +27,8 @@
  * @modules java.net.http
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary/ /
- * @build jdk.testlibrary.SimpleSSLContext ProxyServer
+ * @library /test/lib /
+ * @build jdk.test.lib.net.SimpleSSLContext ProxyServer
  * @compile ../../../com/sun/net/httpserver/LogFilter.java
  * @compile ../../../com/sun/net/httpserver/EchoHandler.java
  * @compile ../../../com/sun/net/httpserver/FileServerHandler.java
@@ -88,7 +88,7 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Random;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import static java.nio.file.StandardOpenOption.TRUNCATE_EXISTING;
 import static java.nio.file.StandardOpenOption.WRITE;
 
--- a/test/jdk/java/net/httpclient/SpecialHeadersTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/SpecialHeadersTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -32,9 +32,9 @@
  *          java.net.http/jdk.internal.net.http.hpack
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary http2/server
+ * @library /test/lib http2/server
  * @build Http2TestServer HttpServerAdapters SpecialHeadersTest
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm
  *       -Djdk.httpclient.HttpClient.log=requests,headers,errors
  *       SpecialHeadersTest
@@ -43,7 +43,7 @@
 import com.sun.net.httpserver.HttpServer;
 import com.sun.net.httpserver.HttpsConfigurator;
 import com.sun.net.httpserver.HttpsServer;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/SplitResponse.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/SplitResponse.java	Mon Oct 15 22:47:03 2018 +0800
@@ -40,7 +40,7 @@
 import java.net.http.HttpResponse;
 import java.util.stream.Stream;
 
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import static java.lang.System.out;
 import static java.lang.String.format;
 import static java.nio.charset.StandardCharsets.ISO_8859_1;
@@ -49,8 +49,8 @@
 /**
  * @test
  * @bug 8087112
- * @library /lib/testlibrary
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @build MockServer
  * @run main/othervm
  *     -Djdk.internal.httpclient.debug=true
--- a/test/jdk/java/net/httpclient/SplitResponseAsync.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/SplitResponseAsync.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -24,8 +24,8 @@
 /**
  * @test
  * @bug 8087112
- * @library /lib/testlibrary
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @build MockServer SplitResponse
  * @run main/othervm
  *      -Djdk.internal.httpclient.debug=true
--- a/test/jdk/java/net/httpclient/SplitResponseKeepAlive.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/SplitResponseKeepAlive.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -24,8 +24,8 @@
 /**
  * @test
  * @bug 8087112
- * @library /lib/testlibrary
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @build MockServer SplitResponse
  * @run main/othervm
  *      -Djdk.internal.httpclient.debug=true
--- a/test/jdk/java/net/httpclient/SplitResponseKeepAliveAsync.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/SplitResponseKeepAliveAsync.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -24,8 +24,8 @@
 /**
  * @test
  * @bug 8087112
- * @library /lib/testlibrary
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @build MockServer SplitResponse
  * @run main/othervm
  *      -Djdk.internal.httpclient.debug=true
--- a/test/jdk/java/net/httpclient/SplitResponseSSL.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/SplitResponseSSL.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -24,8 +24,8 @@
 /**
  * @test
  * @bug 8087112
- * @library /lib/testlibrary
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @build MockServer SplitResponse
  * @run main/othervm
  *      -Djdk.internal.httpclient.debug=true
--- a/test/jdk/java/net/httpclient/SplitResponseSSLAsync.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/SplitResponseSSLAsync.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -24,8 +24,8 @@
 /**
  * @test
  * @bug 8087112
- * @library /lib/testlibrary
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @build MockServer SplitResponse
  * @run main/othervm
  *      -Djdk.internal.httpclient.debug=true
--- a/test/jdk/java/net/httpclient/SplitResponseSSLKeepAlive.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/SplitResponseSSLKeepAlive.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -24,8 +24,8 @@
 /**
  * @test
  * @bug 8087112
- * @library /lib/testlibrary
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @build MockServer SplitResponse
  * @run main/othervm
  *      -Djdk.internal.httpclient.debug=true
--- a/test/jdk/java/net/httpclient/SplitResponseSSLKeepAliveAsync.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/SplitResponseSSLKeepAliveAsync.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -24,8 +24,8 @@
 /**
  * @test
  * @bug 8087112
- * @library /lib/testlibrary
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @build MockServer SplitResponse
  * @run main/othervm
  *      -Djdk.internal.httpclient.debug=true
--- a/test/jdk/java/net/httpclient/StreamingBody.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/StreamingBody.java	Mon Oct 15 22:47:03 2018 +0800
@@ -31,9 +31,9 @@
  *          java.net.http/jdk.internal.net.http.hpack
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary /test/lib http2/server
+ * @library /test/lib http2/server
  * @build Http2TestServer
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm
  *       -Djdk.httpclient.HttpClient.log=trace,headers,requests
  *       StreamingBody
@@ -53,7 +53,7 @@
 import java.net.http.HttpResponse;
 import java.net.http.HttpResponse.BodyHandlers;
 import javax.net.ssl.SSLContext;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/ThrowingPublishersCustomAfterCancel.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingPublishersCustomAfterCancel.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when request publishers
  *          throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
  *        ReferenceTracker AbstractThrowingPublishers ThrowingPublishersCustomAfterCancel
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingPublishersCustomBeforeCancel.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingPublishersCustomBeforeCancel.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when request publishers
  *          throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
  *        ReferenceTracker AbstractThrowingPublishers ThrowingPublishersCustomBeforeCancel
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingPublishersIOAfterCancel.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingPublishersIOAfterCancel.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when request publishers
  *          throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
  *        ReferenceTracker AbstractThrowingPublishers ThrowingPublishersIOAfterCancel
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingPublishersIOBeforeCancel.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingPublishersIOBeforeCancel.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when request publishers
  *          throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
  *        ReferenceTracker AbstractThrowingPublishers ThrowingPublishersIOBeforeCancel
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingPublishersInNextRequest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingPublishersInNextRequest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when request publishers
  *          throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
  *        ReferenceTracker AbstractThrowingPublishers ThrowingPublishersInNextRequest
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingPublishersInRequest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingPublishersInRequest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when request publishers
  *          throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
  *        ReferenceTracker AbstractThrowingPublishers ThrowingPublishersInRequest
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingPublishersInSubscribe.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingPublishersInSubscribe.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when request publishers
  *          throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
  *        ReferenceTracker AbstractThrowingPublishers ThrowingPublishersInSubscribe
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingPublishersSanity.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingPublishersSanity.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when request publishers
  *          throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
  *        ReferenceTracker AbstractThrowingPublishers ThrowingPublishersSanity
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamCustom.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamCustom.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when push promise handlers and their
  *          response body handlers and subscribers throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
   *       ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsInputStreamCustom
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamIO.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamIO.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when push promise handlers and their
  *          response body handlers and subscribers throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
   *       ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsInputStreamIO
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesCustom.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesCustom.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when push promise handlers and their
  *          response body handlers and subscribers throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
   *       ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsLinesCustom
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesIO.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesIO.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when push promise handlers and their
  *          response body handlers and subscribers throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
   *       ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsLinesIO
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringCustom.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringCustom.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when push promise handlers and their
  *          response body handlers and subscribers throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
   *       ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsStringCustom
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringIO.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringIO.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when push promise handlers and their
  *          response body handlers and subscribers throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
   *       ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsStringIO
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingPushPromisesSanity.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesSanity.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when push promise handlers and their
  *          response body handlers and subscribers throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
   *       ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesSanity
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStream.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStream.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when response body handlers and subscribers
  *          throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
   *       ReferenceTracker ThrowingSubscribersAsInputStream AbstractThrowingSubscribers
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStreamAsync.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStreamAsync.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when response body handlers and subscribers
  *          throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
   *       ReferenceTracker ThrowingSubscribersAsInputStreamAsync AbstractThrowingSubscribers
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingSubscribersAsLines.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingSubscribersAsLines.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when response body handlers and subscribers
  *          throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
   *       ReferenceTracker ThrowingSubscribersAsLines AbstractThrowingSubscribers
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingSubscribersAsLinesAsync.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingSubscribersAsLinesAsync.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when response body handlers and subscribers
  *          throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
   *       ReferenceTracker ThrowingSubscribersAsLinesAsync AbstractThrowingSubscribers
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingSubscribersAsString.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingSubscribersAsString.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when response body handlers and subscribers
  *          throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
   *       ReferenceTracker ThrowingSubscribersAsString AbstractThrowingSubscribers
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingSubscribersAsStringAsync.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingSubscribersAsStringAsync.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when response body handlers and subscribers
  *          throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
   *       ReferenceTracker ThrowingSubscribersAsStringAsync AbstractThrowingSubscribers
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/ThrowingSubscribersSanity.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/ThrowingSubscribersSanity.java	Mon Oct 15 22:47:03 2018 +0800
@@ -25,8 +25,8 @@
  * @test
  * @summary Tests what happens when response body handlers and subscribers
  *          throw unexpected exceptions.
- * @library /lib/testlibrary http2/server
- * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters
+ * @library /test/lib http2/server
+ * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
   *       ReferenceTracker ThrowingSubscribersSanity AbstractThrowingSubscribers
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
--- a/test/jdk/java/net/httpclient/TimeoutBasic.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/TimeoutBasic.java	Mon Oct 15 22:47:03 2018 +0800
@@ -31,7 +31,7 @@
 import java.net.http.HttpResponse;
 import java.net.http.HttpResponse.BodyHandlers;
 import java.net.http.HttpTimeoutException;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 import javax.net.ServerSocketFactory;
 import javax.net.ssl.SSLContext;
@@ -46,8 +46,8 @@
 
 /**
  * @test
- * @library /lib/testlibrary
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @summary Basic tests for response timeouts
  * @run main/othervm TimeoutBasic
  */
--- a/test/jdk/java/net/httpclient/UnauthorizedTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/UnauthorizedTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -35,9 +35,9 @@
  *          java.net.http/jdk.internal.net.http.hpack
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary /test/lib http2/server
+ * @library /test/lib http2/server
  * @build Http2TestServer
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm
  *       -Djdk.httpclient.HttpClient.log=headers
  *       UnauthorizedTest
@@ -46,7 +46,7 @@
 import com.sun.net.httpserver.HttpServer;
 import com.sun.net.httpserver.HttpsConfigurator;
 import com.sun.net.httpserver.HttpsServer;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/UnknownBodyLengthTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/UnknownBodyLengthTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -35,13 +35,13 @@
 import java.net.http.HttpClient;
 import java.net.http.HttpRequest;
 import java.net.http.HttpResponse;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 /**
  * @test
  * @bug 8207966
- * @library /lib/testlibrary
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run main/othervm -Djdk.tls.acknowledgeCloseNotify=true UnknownBodyLengthTest plain false
  * @run main/othervm -Djdk.tls.acknowledgeCloseNotify=true UnknownBodyLengthTest SSL false
  * @run main/othervm -Djdk.tls.acknowledgeCloseNotify=true UnknownBodyLengthTest plain true
--- a/test/jdk/java/net/httpclient/dependent.policy	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/dependent.policy	Mon Oct 15 22:47:03 2018 +0800
@@ -21,10 +21,10 @@
 // questions.
 //
 
-// for JTwork/classes/0/lib/testlibrary/jdk/testlibrary/SimpleSSLContext.class
-grant codeBase "file:${test.classes}/../../../../lib/testlibrary/-" {
+// for JTwork/classes/0/test/lib/jdk/test/lib/net/SimpleSSLContext.class
+grant codeBase "file:${test.classes}/../../../../test/lib/-" {
     permission java.util.PropertyPermission "test.src.path", "read";
-    permission java.io.FilePermission "${test.src}/../../../lib/testlibrary/jdk/testlibrary/testkeys", "read";
+    permission java.io.FilePermission "${test.src}/../../../../lib/jdk/test/lib/net/testkeys", "read";
 };
 
 // for JTwork//classes/0/java/net/httpclient/http2/server/*
--- a/test/jdk/java/net/httpclient/http2/BadHeadersTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/http2/BadHeadersTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -27,9 +27,9 @@
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
  *          java.net.http/jdk.internal.net.http.hpack
- * @library /lib/testlibrary server
+ * @library /test/lib server
  * @build Http2TestServer
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm -Djdk.internal.httpclient.debug=true BadHeadersTest
  */
 
@@ -38,7 +38,7 @@
 import jdk.internal.net.http.frame.HeaderFrame;
 import jdk.internal.net.http.frame.HeadersFrame;
 import jdk.internal.net.http.frame.Http2Frame;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/http2/BasicTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/http2/BasicTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -24,8 +24,8 @@
 /*
  * @test
  * @bug 8087112
- * @library /lib/testlibrary server
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib server
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
@@ -47,7 +47,7 @@
 import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.Test;
 import static java.net.http.HttpClient.Version.HTTP_2;
 
--- a/test/jdk/java/net/httpclient/http2/ContinuationFrameTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/http2/ContinuationFrameTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -28,9 +28,9 @@
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
  *          java.net.http/jdk.internal.net.http.hpack
- * @library /lib/testlibrary server
+ * @library /test/lib server
  * @build Http2TestServer
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run testng/othervm ContinuationFrameTest
  */
 
@@ -55,7 +55,7 @@
 import jdk.internal.net.http.frame.HeaderFrame;
 import jdk.internal.net.http.frame.HeadersFrame;
 import jdk.internal.net.http.frame.Http2Frame;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/http2/ErrorTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/http2/ErrorTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -24,8 +24,8 @@
 /*
  * @test
  * @bug 8157105
- * @library /lib/testlibrary server
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib server
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
@@ -46,7 +46,7 @@
 import javax.net.ssl.SSLParameters;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ExecutorService;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import static java.net.http.HttpClient.Version.HTTP_2;
 
 import org.testng.annotations.Test;
--- a/test/jdk/java/net/httpclient/http2/FixedThreadPoolTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/http2/FixedThreadPoolTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -24,8 +24,8 @@
 /*
  * @test
  * @bug 8087112 8177935
- * @library /lib/testlibrary server
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib server
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
@@ -40,7 +40,7 @@
 import javax.net.ssl.*;
 import java.nio.file.*;
 import java.util.concurrent.*;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import static java.net.http.HttpClient.Version.HTTP_2;
 import org.testng.annotations.Test;
 
--- a/test/jdk/java/net/httpclient/http2/ImplicitPushCancel.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/http2/ImplicitPushCancel.java	Mon Oct 15 22:47:03 2018 +0800
@@ -23,8 +23,8 @@
 
 /*
  * @test
- * @library /lib/testlibrary server
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib server
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
--- a/test/jdk/java/net/httpclient/http2/ProxyTest2.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/http2/ProxyTest2.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -52,7 +52,7 @@
 import java.net.http.HttpClient;
 import java.net.http.HttpRequest;
 import java.net.http.HttpResponse;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import java.util.concurrent.*;
 
 /**
@@ -61,12 +61,12 @@
  * @summary  Verifies that you can access an HTTP/2 server over HTTPS by
  *           tunnelling through an HTTP/1.1 proxy.
  * @modules java.net.http
- * @library /lib/testlibrary server
+ * @library /test/lib server
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
  *          java.net.http/jdk.internal.net.http.hpack
- * @build jdk.testlibrary.SimpleSSLContext ProxyTest2
+ * @build jdk.test.lib.net.SimpleSSLContext ProxyTest2
  * @run main/othervm ProxyTest2
  * @author danielfuchs
  */
--- a/test/jdk/java/net/httpclient/http2/RedirectTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/http2/RedirectTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -24,8 +24,8 @@
 /*
  * @test
  * @bug 8156514
- * @library /lib/testlibrary server
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib server
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
--- a/test/jdk/java/net/httpclient/http2/ServerPush.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/http2/ServerPush.java	Mon Oct 15 22:47:03 2018 +0800
@@ -24,8 +24,8 @@
 /*
  * @test
  * @bug 8087112 8159814
- * @library /lib/testlibrary server
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib server
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
--- a/test/jdk/java/net/httpclient/http2/ServerPushWithDiffTypes.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/http2/ServerPushWithDiffTypes.java	Mon Oct 15 22:47:03 2018 +0800
@@ -23,8 +23,8 @@
 
 /*
  * @test
- * @library /lib/testlibrary server
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib server
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @modules java.base/sun.net.www.http
  *          java.net.http/jdk.internal.net.http.common
  *          java.net.http/jdk.internal.net.http.frame
--- a/test/jdk/java/net/httpclient/security/Driver.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/security/Driver.java	Mon Oct 15 22:47:03 2018 +0800
@@ -24,12 +24,11 @@
 /*
  * @test
  * @bug 8087112
- * @library /lib/testlibrary/
  * @library /test/lib
  * @modules java.net.http
  *          java.logging
  *          jdk.httpserver
- * @build jdk.testlibrary.SimpleSSLContext jdk.test.lib.Utils
+ * @build jdk.test.lib.net.SimpleSSLContext jdk.test.lib.Utils
  * @compile ../../../../com/sun/net/httpserver/LogFilter.java
  * @compile ../../../../com/sun/net/httpserver/FileServerHandler.java
  * @compile ../ProxyServer.java
--- a/test/jdk/java/net/httpclient/security/Security.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/security/Security.java	Mon Oct 15 22:47:03 2018 +0800
@@ -27,8 +27,8 @@
  * @modules java.net.http
  *          java.logging
  *          jdk.httpserver
- * @library /lib/testlibrary/
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @compile ../../../../com/sun/net/httpserver/LogFilter.java
  * @compile ../../../../com/sun/net/httpserver/FileServerHandler.java
  * @compile ../ProxyServer.java
--- a/test/jdk/java/net/httpclient/websocket/WSHandshakeExceptionTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/websocket/WSHandshakeExceptionTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -24,8 +24,8 @@
 /*
  * @test
  * @summary Basic test for WebSocketHandshakeException
- * @library /lib/testlibrary
- * @build jdk.testlibrary.SimpleSSLContext
+ * @library /test/lib
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @modules java.net.http
  *          jdk.httpserver
  * @run testng/othervm -Djdk.internal.httpclient.debug=true WSHandshakeExceptionTest
@@ -39,7 +39,7 @@
 import java.net.http.HttpClient;
 import java.net.http.WebSocket;
 import java.net.http.WebSocketHandshakeException;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
--- a/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/AbstractSSLTubeTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/AbstractSSLTubeTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -28,22 +28,13 @@
 import jdk.internal.net.http.common.Utils;
 import org.testng.annotations.Test;
 
-import javax.net.ssl.KeyManagerFactory;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLEngine;
 import javax.net.ssl.SSLParameters;
-import javax.net.ssl.TrustManagerFactory;
-import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.nio.ByteBuffer;
-import java.security.KeyManagementException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.UnrecoverableKeyException;
-import java.security.cert.CertificateException;
 import java.util.List;
 import java.util.StringTokenizer;
 import java.util.concurrent.CompletableFuture;
@@ -244,76 +235,4 @@
         engine.setUseClientMode(client);
         return engine;
     }
-
-    /**
-     * Creates a simple usable SSLContext for SSLSocketFactory or a HttpsServer
-     * using either a given keystore or a default one in the test tree.
-     *
-     * Using this class with a security manager requires the following
-     * permissions to be granted:
-     *
-     * permission "java.util.PropertyPermission" "test.src.path", "read";
-     * permission java.io.FilePermission "${test.src}/../../../../lib/testlibrary/jdk/testlibrary/testkeys",
-     * "read"; The exact path above depends on the location of the test.
-     */
-    protected static class SimpleSSLContext {
-
-        private final SSLContext ssl;
-
-        /**
-         * Loads default keystore from SimpleSSLContext source directory
-         */
-        public SimpleSSLContext() throws IOException {
-            String paths = System.getProperty("test.src.path");
-            StringTokenizer st = new StringTokenizer(paths, File.pathSeparator);
-            boolean securityExceptions = false;
-            SSLContext sslContext = null;
-            while (st.hasMoreTokens()) {
-                String path = st.nextToken();
-                try {
-                    File f = new File(path, "../../../../lib/testlibrary/jdk/testlibrary/testkeys");
-                    if (f.exists()) {
-                        try (FileInputStream fis = new FileInputStream(f)) {
-                            sslContext = init(fis);
-                            break;
-                        }
-                    }
-                } catch (SecurityException e) {
-                    // catch and ignore because permission only required
-                    // for one entry on path (at most)
-                    securityExceptions = true;
-                }
-            }
-            if (securityExceptions) {
-                System.err.println("SecurityExceptions thrown on loading testkeys");
-            }
-            ssl = sslContext;
-        }
-
-        private SSLContext init(InputStream i) throws IOException {
-            try {
-                char[] passphrase = "passphrase".toCharArray();
-                KeyStore ks = KeyStore.getInstance("JKS");
-                ks.load(i, passphrase);
-
-                KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
-                kmf.init(ks, passphrase);
-
-                TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
-                tmf.init(ks);
-
-                SSLContext ssl = SSLContext.getInstance("TLS");
-                ssl.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
-                return ssl;
-            } catch (KeyManagementException | KeyStoreException |
-                    UnrecoverableKeyException | CertificateException |
-                    NoSuchAlgorithmException e) {
-                throw new RuntimeException(e.getMessage());
-            }
-        }
-
-        public SSLContext get() {
-            return ssl;
-        }
-    }
 }
--- a/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/FlowTest.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/FlowTest.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -24,8 +24,6 @@
 package jdk.internal.net.http;
 
 import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -33,12 +31,6 @@
 import java.net.InetSocketAddress;
 import java.net.Socket;
 import java.nio.ByteBuffer;
-import java.security.KeyManagementException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.UnrecoverableKeyException;
-import java.security.cert.CertificateException;
 import java.util.List;
 import java.util.Random;
 import java.util.StringTokenizer;
@@ -53,9 +45,7 @@
 import java.util.concurrent.SubmissionPublisher;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
-import javax.net.ssl.KeyManagerFactory;
 import javax.net.ssl.*;
-import javax.net.ssl.TrustManagerFactory;
 import jdk.internal.net.http.common.Utils;
 import org.testng.annotations.Test;
 import jdk.internal.net.http.common.SSLFlowDelegate;
@@ -467,80 +457,6 @@
         }
     }
 
-    /**
-     * Creates a simple usable SSLContext for SSLSocketFactory
-     * or a HttpsServer using either a given keystore or a default
-     * one in the test tree.
-     * <p>
-     * Using this class with a security manager requires the following
-     * permissions to be granted:
-     * <p>
-     * permission "java.util.PropertyPermission" "test.src.path", "read";
-     * permission java.io.FilePermission
-     * "${test.src}/../../../../lib/testlibrary/jdk/testlibrary/testkeys", "read";
-     * The exact path above depends on the location of the test.
-     */
-    static class SimpleSSLContext {
-
-        private final SSLContext ssl;
-
-        /**
-         * Loads default keystore from SimpleSSLContext source directory
-         */
-        public SimpleSSLContext() throws IOException {
-            String paths = System.getProperty("test.src.path");
-            StringTokenizer st = new StringTokenizer(paths, File.pathSeparator);
-            boolean securityExceptions = false;
-            SSLContext sslContext = null;
-            while (st.hasMoreTokens()) {
-                String path = st.nextToken();
-                try {
-                    File f = new File(path, "../../../../lib/testlibrary/jdk/testlibrary/testkeys");
-                    if (f.exists()) {
-                        try (FileInputStream fis = new FileInputStream(f)) {
-                            sslContext = init(fis);
-                            break;
-                        }
-                    }
-                } catch (SecurityException e) {
-                    // catch and ignore because permission only required
-                    // for one entry on path (at most)
-                    securityExceptions = true;
-                }
-            }
-            if (securityExceptions) {
-                System.out.println("SecurityExceptions thrown on loading testkeys");
-            }
-            ssl = sslContext;
-        }
-
-        private SSLContext init(InputStream i) throws IOException {
-            try {
-                char[] passphrase = "passphrase".toCharArray();
-                KeyStore ks = KeyStore.getInstance("JKS");
-                ks.load(i, passphrase);
-
-                KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
-                kmf.init(ks, passphrase);
-
-                TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
-                tmf.init(ks);
-
-                SSLContext ssl = SSLContext.getInstance("TLS");
-                ssl.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
-                return ssl;
-            } catch (KeyManagementException | KeyStoreException |
-                    UnrecoverableKeyException | CertificateException |
-                    NoSuchAlgorithmException e) {
-                throw new RuntimeException(e.getMessage());
-            }
-        }
-
-        public SSLContext get() {
-            return ssl;
-        }
-    }
-
     private static void sleep(int millis) {
         try {
             Thread.sleep(millis);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/SimpleSSLContext.java	Mon Oct 15 22:47:03 2018 +0800
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 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.
+ */
+
+package jdk.internal.net.http;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.KeyManagementException;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.UnrecoverableKeyException;
+import java.security.cert.CertificateException;
+import java.util.StringTokenizer;
+
+import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManagerFactory;
+
+/**
+ * Creates a simple usable SSLContext for SSLSocketFactory
+ * or a HttpsServer using a default keystore in the test tree.
+ * <p>
+ * Using this class with a security manager requires the following
+ * permissions to be granted:
+ * <p>
+ * permission "java.util.PropertyPermission" "test.src.path", "read";
+ * permission java.io.FilePermission "/path/to/test/lib/jdk/test/lib/testkeys", "read";
+ * The exact path above depends on the location of the test.
+ */
+public class SimpleSSLContext {
+
+    private final SSLContext ssl;
+
+    /**
+     * Loads default keystore from SimpleSSLContext source directory
+     */
+    public SimpleSSLContext() throws IOException {
+        String paths = System.getProperty("test.src.path");
+        StringTokenizer st = new StringTokenizer(paths, File.pathSeparator);
+        boolean securityExceptions = false;
+        SSLContext sslContext = null;
+        while (st.hasMoreTokens()) {
+            String path = st.nextToken();
+            try {
+                File f = new File(path, "../../../../../lib/jdk/test/lib/net/testkeys");
+                if (f.exists()) {
+                    try (FileInputStream fis = new FileInputStream(f)) {
+                        sslContext = init(fis);
+                        break;
+                    }
+                }
+            } catch (SecurityException e) {
+                // catch and ignore because permission only required
+                // for one entry on path (at most)
+                securityExceptions = true;
+            }
+        }
+        if (securityExceptions) {
+            System.out.println("SecurityExceptions thrown on loading testkeys");
+        }
+        ssl = sslContext;
+    }
+
+    private SSLContext init(InputStream i) throws IOException {
+        try {
+            char[] passphrase = "passphrase".toCharArray();
+            KeyStore ks = KeyStore.getInstance("PKCS12");
+            ks.load(i, passphrase);
+
+            KeyManagerFactory kmf = KeyManagerFactory.getInstance("PKIX");
+            kmf.init(ks, passphrase);
+
+            TrustManagerFactory tmf = TrustManagerFactory.getInstance("PKIX");
+            tmf.init(ks);
+
+            SSLContext ssl = SSLContext.getInstance("TLS");
+            ssl.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
+            return ssl;
+        } catch (KeyManagementException | KeyStoreException |
+                UnrecoverableKeyException | CertificateException |
+                NoSuchAlgorithmException e) {
+            throw new RuntimeException(e.getMessage());
+        }
+    }
+
+    public SSLContext get() {
+        return ssl;
+    }
+}
\ No newline at end of file
--- a/test/jdk/javax/net/ssl/HttpsURLConnection/Equals.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/javax/net/ssl/HttpsURLConnection/Equals.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -24,9 +24,9 @@
 /**
  * @test
  * @bug 8055299
- * @library /lib/testlibrary
+ * @library /test/lib
  * @modules jdk.httpserver
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @run main/othervm -Djavax.net.debug=ssl,handshake,record Equals
  */
 import com.sun.net.httpserver.*;
@@ -34,7 +34,7 @@
 import java.io.*;
 import javax.net.ssl.*;
 import java.util.concurrent.*;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 public class Equals {
 
--- a/test/jdk/lib/testlibrary/jdk/testlibrary/SimpleSSLContext.java	Mon Oct 15 14:42:31 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2005, 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.
- *
- * 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.
- */
-
-package jdk.testlibrary;
-
-import java.util.*;
-import java.util.concurrent.*;
-import java.io.*;
-import java.net.*;
-import java.security.*;
-import java.security.cert.*;
-import javax.net.ssl.*;
-
-/**
- * Creates a simple usable SSLContext for SSLSocketFactory
- * or a HttpsServer using either a given keystore or a default
- * one in the test tree.
- *
- * Using this class with a security manager requires the following
- * permissions to be granted:
- *
- * permission "java.util.PropertyPermission" "test.src.path", "read";
- * permission java.io.FilePermission
- *    "${test.src}/../../../lib/testlibrary/jdk/testlibrary/testkeys", "read";
- * The exact path above depends on the location of the test.
- */
-public class SimpleSSLContext {
-
-    SSLContext ssl;
-
-    /**
-     * loads default keystore from SimpleSSLContext
-     * source directory
-     */
-    public SimpleSSLContext() throws IOException {
-        try {
-            AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
-                @Override
-                public Void run() throws Exception {
-                    String paths = System.getProperty("test.src.path");
-                    StringTokenizer st = new StringTokenizer(paths, File.pathSeparator);
-                    boolean securityExceptions = false;
-                    while (st.hasMoreTokens()) {
-                        String path = st.nextToken();
-                        try {
-                            File f = new File(path, "jdk/testlibrary/testkeys");
-                            if (f.exists()) {
-                                try (FileInputStream fis = new FileInputStream(f)) {
-                                    init(fis);
-                                    return null;
-                                }
-                            }
-                        } catch (SecurityException e) {
-                            // catch and ignore because permission only required
-                            // for one entry on path (at most)
-                            securityExceptions = true;
-                        }
-                    }
-                    if (securityExceptions) {
-                        System.err.println("SecurityExceptions thrown on loading testkeys");
-                    }
-                    return null;
-                }
-            });
-        } catch (PrivilegedActionException pae) {
-            Throwable t = pae.getCause() != null ? pae.getCause() : pae;
-            if (t instanceof IOException)
-                throw (IOException)t;
-            if (t instanceof RuntimeException)
-                throw (RuntimeException)t;
-            if (t instanceof Error)
-                throw (Error)t;
-            throw new RuntimeException(t);
-        }
-    }
-
-    /**
-     * loads default keystore from given directory
-     */
-    public SimpleSSLContext(String dir) throws IOException {
-        String file = dir+"/testkeys";
-        try (FileInputStream fis = new FileInputStream(file)) {
-            init(fis);
-        }
-    }
-
-    private void init(InputStream i) throws IOException {
-        try {
-            char[] passphrase = "passphrase".toCharArray();
-            KeyStore ks = KeyStore.getInstance("JKS");
-            ks.load(i, passphrase);
-
-            KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
-            kmf.init(ks, passphrase);
-
-            TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
-            tmf.init(ks);
-
-            ssl = SSLContext.getInstance("TLS");
-            ssl.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
-        } catch (KeyManagementException e) {
-            throw new RuntimeException(e.getMessage());
-        } catch (KeyStoreException e) {
-            throw new RuntimeException(e.getMessage());
-        } catch (UnrecoverableKeyException e) {
-            throw new RuntimeException(e.getMessage());
-        } catch (CertificateException e) {
-            throw new RuntimeException(e.getMessage());
-        } catch (NoSuchAlgorithmException e) {
-            throw new RuntimeException(e.getMessage());
-        }
-    }
-
-    public SSLContext get() {
-        return ssl;
-    }
-}
Binary file test/jdk/lib/testlibrary/jdk/testlibrary/testkeys has changed
--- a/test/jdk/sun/net/www/protocol/http/RedirectOnPost.java	Mon Oct 15 14:42:31 2018 +0100
+++ b/test/jdk/sun/net/www/protocol/http/RedirectOnPost.java	Mon Oct 15 22:47:03 2018 +0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -23,9 +23,9 @@
 
 /**
  * @test
- * @library /lib/testlibrary/
+ * @library /test/lib
  * @modules jdk.httpserver
- * @build jdk.testlibrary.SimpleSSLContext
+ * @build jdk.test.lib.net.SimpleSSLContext
  * @compile RedirectOnPost.java
  * @run main/othervm RedirectOnPost
  * @bug 8029127
@@ -38,7 +38,7 @@
 import com.sun.net.httpserver.*;
 import java.util.concurrent.*;
 import javax.net.ssl.*;
-import jdk.testlibrary.SimpleSSLContext;
+import jdk.test.lib.net.SimpleSSLContext;
 
 public class RedirectOnPost {
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/lib/jdk/test/lib/net/SimpleSSLContext.java	Mon Oct 15 22:47:03 2018 +0800
@@ -0,0 +1,128 @@
+/*
+ * Copyright (c) 2005, 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.
+ */
+
+package jdk.test.lib.net;
+
+import java.util.*;
+import java.io.*;
+import java.security.*;
+import java.security.cert.*;
+import javax.net.ssl.*;
+
+/**
+ * Creates a simple usable SSLContext for SSLSocketFactory
+ * or a HttpsServer using either a given keystore or a default
+ * one in the test tree.
+ *
+ * Using this class with a security manager requires the following
+ * permissions to be granted:
+ *
+ * permission "java.util.PropertyPermission" "test.src.path", "read";
+ * permission java.io.FilePermission "/path/to/test/lib/jdk/test/lib/testkeys", "read";
+ * The exact path above depends on the location of the test.
+ */
+public class SimpleSSLContext {
+
+    SSLContext ssl;
+
+    /**
+     * loads default keystore from SimpleSSLContext
+     * source directory
+     */
+    public SimpleSSLContext() throws IOException {
+        try {
+            AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() {
+                @Override
+                public Void run() throws Exception {
+                    String paths = System.getProperty("test.src.path");
+                    StringTokenizer st = new StringTokenizer(paths, File.pathSeparator);
+                    boolean securityExceptions = false;
+                    while (st.hasMoreTokens()) {
+                        String path = st.nextToken();
+                        try {
+                            File f = new File(path, "jdk/test/lib/net/testkeys");
+                            if (f.exists()) {
+                                try (FileInputStream fis = new FileInputStream(f)) {
+                                    init(fis);
+                                    return null;
+                                }
+                            }
+                        } catch (SecurityException e) {
+                            // catch and ignore because permission only required
+                            // for one entry on path (at most)
+                            securityExceptions = true;
+                        }
+                    }
+                    if (securityExceptions) {
+                        System.err.println("SecurityExceptions thrown on loading testkeys");
+                    }
+                    return null;
+                }
+            });
+        } catch (PrivilegedActionException pae) {
+            Throwable t = pae.getCause() != null ? pae.getCause() : pae;
+            if (t instanceof IOException)
+                throw (IOException)t;
+            if (t instanceof RuntimeException)
+                throw (RuntimeException)t;
+            if (t instanceof Error)
+                throw (Error)t;
+            throw new RuntimeException(t);
+        }
+    }
+
+    /**
+     * loads default keystore from given directory
+     */
+    public SimpleSSLContext(String dir) throws IOException {
+        String file = dir + "/testkeys";
+        try (FileInputStream fis = new FileInputStream(file)) {
+            init(fis);
+        }
+    }
+
+    private void init(InputStream i) throws IOException {
+        try {
+            char[] passphrase = "passphrase".toCharArray();
+            KeyStore ks = KeyStore.getInstance("PKCS12");
+            ks.load(i, passphrase);
+
+            KeyManagerFactory kmf = KeyManagerFactory.getInstance("PKIX");
+            kmf.init(ks, passphrase);
+
+            TrustManagerFactory tmf = TrustManagerFactory.getInstance("PKIX");
+            tmf.init(ks);
+
+            ssl = SSLContext.getInstance("TLS");
+            ssl.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
+        } catch (KeyManagementException | KeyStoreException |
+                UnrecoverableKeyException | CertificateException |
+                NoSuchAlgorithmException e) {
+            throw new RuntimeException(e.getMessage());
+        }
+    }
+
+    public SSLContext get() {
+        return ssl;
+    }
+}
Binary file test/lib/jdk/test/lib/net/testkeys has changed