< prev index next >

test/jdk/java/nio/channels/SocketChannel/BigReadWrite.java

Print this page
rev 59383 : [mq]: final

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -20,10 +20,11 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
 /* @test
+ * @requires os.family == "Linux"
  * @bug 4863423
  * @summary Test Util caching policy
  */
 
 import java.io.*;

@@ -33,15 +34,10 @@
 public class BigReadWrite {
 
     static int testSize = 15;
 
     public static void main(String[] args) throws Exception {
-        // One platform suffices to check for this bug
-        String osName = System.getProperty("os.name");
-        if (!osName.startsWith("SunOS"))
-            return;
-
         FileOutputStream fos = new FileOutputStream("/dev/zero");
         FileChannel fc = fos.getChannel();
 
         // Three small writes to fill up the Util cache
         ByteBuffer buf = ByteBuffer.allocate(900);
< prev index next >