< prev index next >

test/runtime/SharedArchiveFile/LimitSharedSizes.java

Print this page
rev 10304 : [mq]: jake_pre_integ


   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /* @test LimitSharedSizes
  25  * @summary Test handling of limits on shared space size
  26  * @library /testlibrary /runtime/CommandLine/OptionsValidation/common
  27  * @modules java.base/sun.misc
  28  *          java.management

  29  * @run main LimitSharedSizes
  30  */
  31 
  32 import jdk.test.lib.*;
  33 import optionsvalidation.JVMOptionsUtils;
  34 
  35 public class LimitSharedSizes {
  36     static enum Result {
  37         OUT_OF_RANGE,
  38         TOO_SMALL,
  39         VALID,
  40         VALID_ARCHIVE
  41     }
  42 
  43     static enum Region {
  44         RO, RW, MD, MC
  45     }
  46 
  47     private static final boolean fitsRange(String name, String value) throws RuntimeException {
  48         boolean fits = true;




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /* @test LimitSharedSizes
  25  * @summary Test handling of limits on shared space size
  26  * @library /testlibrary /runtime/CommandLine/OptionsValidation/common
  27  * @modules java.base/sun.misc
  28  *          java.management
  29  *          jdk.attach/sun.tools.attach
  30  * @run main LimitSharedSizes
  31  */
  32 
  33 import jdk.test.lib.*;
  34 import optionsvalidation.JVMOptionsUtils;
  35 
  36 public class LimitSharedSizes {
  37     static enum Result {
  38         OUT_OF_RANGE,
  39         TOO_SMALL,
  40         VALID,
  41         VALID_ARCHIVE
  42     }
  43 
  44     static enum Region {
  45         RO, RW, MD, MC
  46     }
  47 
  48     private static final boolean fitsRange(String name, String value) throws RuntimeException {
  49         boolean fits = true;


< prev index next >