test/hotspot/jtreg/runtime/logging/LoaderConstraintsTest.java
changeset 50634 c349d409262a
parent 47216 71c04702a3d5
equal deleted inserted replaced
50633:b8055b38b252 50634:c349d409262a
     1 /*
     1 /*
     2  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2016, 2018 Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    65 
    65 
    66         // -XX:+TraceLoaderConstraints
    66         // -XX:+TraceLoaderConstraints
    67         pb = exec("-XX:+TraceLoaderConstraints");
    67         pb = exec("-XX:+TraceLoaderConstraints");
    68         out = new OutputAnalyzer(pb.start());
    68         out = new OutputAnalyzer(pb.start());
    69         out.getOutput();
    69         out.getOutput();
    70         out.shouldContain("[class,loader,constraints] adding new constraint for name: java/lang/Class, loader[0]: jdk/internal/loader/ClassLoaders$AppClassLoader, loader[1]: <bootloader>");
    70         out.shouldContain("[class,loader,constraints] adding new constraint for name: java/lang/Class, loader[0]: 'app', loader[1]: 'bootstrap'");
    71 
    71 
    72         // -Xlog:class+loader+constraints=info
    72         // -Xlog:class+loader+constraints=info
    73         pb = exec("-Xlog:class+loader+constraints=info");
    73         pb = exec("-Xlog:class+loader+constraints=info");
    74         out = new OutputAnalyzer(pb.start());
    74         out = new OutputAnalyzer(pb.start());
    75         out.shouldContain("[class,loader,constraints] adding new constraint for name: java/lang/Class, loader[0]: jdk/internal/loader/ClassLoaders$AppClassLoader, loader[1]: <bootloader>");
    75         out.shouldContain("[class,loader,constraints] adding new constraint for name: java/lang/Class, loader[0]: 'app', loader[1]: 'bootstrap'");
    76 
    76 
    77         // -XX:-TraceLoaderConstraints
    77         // -XX:-TraceLoaderConstraints
    78         pb = exec("-XX:-TraceLoaderConstraints");
    78         pb = exec("-XX:-TraceLoaderConstraints");
    79         out = new OutputAnalyzer(pb.start());
    79         out = new OutputAnalyzer(pb.start());
    80         out.shouldNotContain("[class,loaderconstraints]");
    80         out.shouldNotContain("[class,loaderconstraints]");