--- old/test/jdk/java/nio/channels/FileChannel/Write.java 2020-05-20 18:06:23.753442129 -0700 +++ new/test/jdk/java/nio/channels/FileChannel/Write.java 2020-05-20 18:06:23.377434910 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2020, 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 @@ -38,11 +38,6 @@ test1(); // for bug 4475533 test2(); test3(); // for bug 4698138 - - // This test is not suitable for automated testing at this time. - // I am commenting it out but it will be easy to manually - // test for a regression in this area. See also 4796221. - //test4(); // for bug 4638365 } // Test to see that offset > length does not throw exception @@ -123,73 +118,4 @@ fos.close(); } } - - private static final int TEST4_NUM_BUFFERS = 3; - - private static final int TEST4_BUF_CAP = Integer.MAX_VALUE / 2; - - /** - * Test to see that vector write can return > Integer.MAX_VALUE - * - * Note that under certain circumstances disk space problems occur - * with this test. It typically relies upon adequate disk space and/or - * a Solaris disk space optimization where empty files take up less - * space than their logical size. - * - * Note that if this test fails it is not necessarily a violation of - * spec: the value returned by fc.write can be smaller than the number - * of bytes requested to write. It is testing an optimization that allows - * for larger return values. - */ - static void test4() throws Exception { - // Only works on 64 bit Solaris - String osName = System.getProperty("os.name"); - if (!osName.startsWith("SunOS")) - return; - String dataModel = System.getProperty("sun.arch.data.model"); - if (!dataModel.startsWith("64")) - return; - - File testFile = File.createTempFile("test4", null); - testFile.deleteOnExit(); - - FileChannel[] fcs = new FileChannel[TEST4_NUM_BUFFERS]; - - ByteBuffer[] dsts = new ByteBuffer[TEST4_NUM_BUFFERS]; - // Map these buffers from a file so we don't run out of memory - for (int i=0; i