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
25 /**
26 * @test
27 * @bug 6863420
28 * @summary os::javaTimeNanos() go backward on Solaris x86
29 *
30 * Notice the internal timeout in timeout thread Test.TOT.
31 * @run main/othervm/timeout=300 Test
32 */
33
34 public class Test {
35
36 static final int INTERNAL_TIMEOUT=240;
37 static class TOT extends Thread {
38 public void run() {
39 try {
40 Thread.sleep(INTERNAL_TIMEOUT*1000);
41 } catch (InterruptedException ex) {
42 }
43 done = true;
44 }
45 }
46
47 static long value = 0;
48 static boolean got_backward_time = false;
49 static volatile boolean done = false;
50
51 public static void main(String args[]) {
52 final int count = 100000;
53
54 TOT tot = new TOT();
55 tot.setDaemon(true);
|
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
25 /**
26 * @test
27 * @bug 6863420
28 * @summary os::javaTimeNanos() go backward on Solaris x86
29 *
30 * @run main/othervm/timeout=300 compiler.runtime.Test6863420
31 */
32 /*
33 * Notice the internal timeout in timeout thread Test6863420.TOT.
34 */
35
36 package compiler.runtime;
37
38 public class Test6863420 {
39
40 static final int INTERNAL_TIMEOUT=240;
41 static class TOT extends Thread {
42 public void run() {
43 try {
44 Thread.sleep(INTERNAL_TIMEOUT*1000);
45 } catch (InterruptedException ex) {
46 }
47 done = true;
48 }
49 }
50
51 static long value = 0;
52 static boolean got_backward_time = false;
53 static volatile boolean done = false;
54
55 public static void main(String args[]) {
56 final int count = 100000;
57
58 TOT tot = new TOT();
59 tot.setDaemon(true);
|