|
1 | 1 | /* |
2 | | - * Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
|
35 | 35 |
|
36 | 36 | /** |
37 | 37 | * @test |
| 38 | + * @bug 8214226 8243500 |
38 | 39 | * @requires vm.hasSA |
39 | 40 | * @requires os.arch=="amd64" | os.arch=="x86_64" |
40 | 41 | * @requires os.family=="windows" | os.family == "linux" | os.family == "mac" |
|
53 | 54 | * |
54 | 55 | * The test works by spawning a process that sits in a 10 line loop in the busywork() method, |
55 | 56 | * all while the main test does repeated jstacks on the process. The expectation is |
56 | | - * that at least 5 of the lines in the busywork() loop will eventually show up in at |
| 57 | + * that at least 4 of the lines in the busywork() loop will eventually show up in at |
57 | 58 | * least one of the jstack runs. |
58 | 59 | */ |
59 | 60 |
|
@@ -94,8 +95,11 @@ public static void main(String... args) { |
94 | 95 | public class TestJhsdbJstackLineNumbers { |
95 | 96 | // This is the number of lines in the busywork main loop |
96 | 97 | static final int TOTAL_BUSYWORK_LOOP_LINES = 10; |
97 | | - // The minimum number of lines that we must at some point see in the jstack output |
98 | | - static final int MIN_BUSYWORK_LOOP_LINES = 5; |
| 98 | + // The minimum number of lines that we must see at some point in the jstack output. |
| 99 | + // There's always a chance we could see fewer, but the chances are so low that |
| 100 | + // it is unlikely to ever happen. We can always decrease the odds by lowering |
| 101 | + // the required number of lines or increasing the number of jstack runs. |
| 102 | + static final int MIN_BUSYWORK_LOOP_LINES = 4; |
99 | 103 |
|
100 | 104 | static final int MAX_NUMBER_OF_JSTACK_RUNS = 25; |
101 | 105 |
|
|
0 commit comments