Skip to content

Commit a36df1f

Browse files
author
duke
committed
Backport ea50c54a14d39fcedabe8426a14eaec27ab24af2
1 parent cce9336 commit a36df1f

File tree

9 files changed

+53
-8
lines changed

9 files changed

+53
-8
lines changed

test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace007.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -125,6 +125,11 @@ static boolean makeSnapshot() {
125125
StackTraceElement[] all;
126126
for (int i = 1; i < THRD_COUNT; i++) {
127127
all = traces.get(threads[i]);
128+
if (all == null) {
129+
complain("No stacktrace for thread " + threads[i].getName() +
130+
" was found in the set of all traces");
131+
return false;
132+
}
128133
int k = all.length;
129134
if (count - k > 2) {
130135
complain("wrong lengths of stack traces:\n\t"

test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace008.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -129,6 +129,11 @@ static boolean makeSnapshot() {
129129
StackTraceElement[] all;
130130
for (int i = 1; i < THRD_COUNT; i++) {
131131
all = traces.get(threads[i]);
132+
if (all == null) {
133+
complain("No stacktrace for thread " + threads[i].getName() +
134+
" was found in the set of all traces");
135+
return false;
136+
}
132137
int k = all.length;
133138
if (count - k > 4) {
134139
complain("wrong lengths of stack traces:\n\t"

test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace009.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -129,6 +129,11 @@ static boolean makeSnapshot() {
129129
StackTraceElement[] all;
130130
for (int i = 1; i < THRD_COUNT; i++) {
131131
all = traces.get(threads[i]);
132+
if (all == null) {
133+
complain("No stacktrace for thread " + threads[i].getName() +
134+
" was found in the set of all traces");
135+
return false;
136+
}
132137
int k = all.length;
133138
if (count - k > 2) {
134139
complain("wrong lengths of stack traces:\n\t"

test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace010.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -145,6 +145,11 @@ boolean makeSnapshot() {
145145
StackTraceElement[] all;
146146
for (int i = 1; i < THRD_COUNT; i++) {
147147
all = traces.get(threads[i]);
148+
if (all == null) {
149+
complain("No stacktrace for thread " + threads[i].getName() +
150+
" was found in the set of all traces");
151+
return false;
152+
}
148153
int k = all.length;
149154
if (count - k > 2) {
150155
complain("wrong lengths of stack traces:\n\t"

test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace011.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -149,6 +149,11 @@ boolean makeSnapshot() {
149149
StackTraceElement[] all;
150150
for (int i = 1; i < THRD_COUNT; i++) {
151151
all = traces.get(threads[i]);
152+
if (all == null) {
153+
complain("No stacktrace for thread " + threads[i].getName() +
154+
" was found in the set of all traces");
155+
return false;
156+
}
152157
int k = all.length;
153158
if (count - k > 2) {
154159
complain("wrong lengths of stack traces:\n\t"

test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace012.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -151,6 +151,11 @@ boolean makeSnapshot() {
151151
StackTraceElement[] all;
152152
for (int i = 1; i < THRD_COUNT; i++) {
153153
all = traces.get(threads[i]);
154+
if (all == null) {
155+
complain("No stacktrace for thread " + threads[i].getName() +
156+
" was found in the set of all traces");
157+
return false;
158+
}
154159
int k = all.length;
155160
if (count - k > 2) {
156161
complain("wrong lengths of stack traces:\n\t"

test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace013.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -130,6 +130,11 @@ boolean makeSnapshot() {
130130
StackTraceElement[] all;
131131
for (int i = 1; i < THRD_COUNT; i++) {
132132
all = traces.get(threads[i]);
133+
if (all == null) {
134+
complain("No stacktrace for thread " + threads[i].getName() +
135+
" was found in the set of all traces");
136+
return false;
137+
}
133138
int k = all.length;
134139
if (count - k > 3) {
135140
complain("wrong lengths of stack traces:\n\t"

test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace014.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ boolean makeSnapshot() {
140140
StackTraceElement[] all;
141141
for (int i = 1; i < THRD_COUNT; i++) {
142142
all = traces.get(threads[i]);
143+
if (all == null) {
144+
complain("No stacktrace for thread " + threads[i].getName() +
145+
" was found in the set of all traces");
146+
return false;
147+
}
143148
int k = all.length;
144149
if (count - k > 4) {
145150
complain("wrong lengths of stack traces:\n\t"

test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace015.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -138,6 +138,11 @@ boolean makeSnapshot() {
138138
StackTraceElement[] all;
139139
for (int i = 1; i < THRD_COUNT; i++) {
140140
all = traces.get(threads[i]);
141+
if (all == null) {
142+
complain("No stacktrace for thread " + threads[i].getName() +
143+
" was found in the set of all traces");
144+
return false;
145+
}
141146
int k = all.length;
142147
if (count - k > 3) {
143148
complain("wrong lengths of stack traces:\n\t"

0 commit comments

Comments
 (0)