Skip to content

Commit c90c31b

Browse files
author
Paul Hohensee
committed
8279005: sun/tools/jstat tests do not check for test case exit codes after JDK-8245129
Reviewed-by: cjplummer, rkennke
1 parent 52c6044 commit c90c31b

16 files changed

+76
-16
lines changed

test/jdk/sun/tools/jstat/jstatGcCapacityOutput1.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2004, 2025, 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
@@ -34,4 +34,9 @@ verify_os
3434
JSTAT="${TESTJAVA}/bin/jstat"
3535

3636
${JSTAT} ${COMMON_JSTAT_FLAGS} -gccapacity 0 2>&1 | awk -f ${TESTSRC}/gcCapacityOutput1.awk
37+
RC=$?
38+
if [ $RC -ne 0 ]; then
39+
exit $RC
40+
fi
41+
3742
${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gccapacity 0 2>&1 | awk -f ${TESTSRC}/gcCapacityOutput1.awk

test/jdk/sun/tools/jstat/jstatGcCauseOutput1.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2004, 2025, 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
@@ -38,4 +38,9 @@ JSTAT="${TESTJAVA}/bin/jstat"
3838
# The UseParallelGC collector does not currently update the gc cause counters.
3939

4040
${JSTAT} ${COMMON_JSTAT_FLAGS} -gccause 0 2>&1 | awk -f ${TESTSRC}/gcCauseOutput1.awk
41+
RC=$?
42+
if [ $RC -ne 0 ]; then
43+
exit $RC
44+
fi
45+
4146
${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseSerialGC -gccause 0 2>&1 | awk -f ${TESTSRC}/gcCauseOutput1.awk

test/jdk/sun/tools/jstat/jstatGcMetaCapacityOutput1.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2013, 2025, 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
@@ -34,4 +34,9 @@ verify_os
3434
JSTAT="${TESTJAVA}/bin/jstat"
3535

3636
${JSTAT} ${COMMON_JSTAT_FLAGS} -gcmetacapacity 0 2>&1 | awk -f ${TESTSRC}/gcMetaCapacityOutput1.awk
37+
RC=$?
38+
if [ $RC -ne 0 ]; then
39+
exit $RC
40+
fi
41+
3742
${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gcmetacapacity 0 2>&1 | awk -f ${TESTSRC}/gcMetaCapacityOutput1.awk

test/jdk/sun/tools/jstat/jstatGcNewCapacityOutput1.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2004, 2025, 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
@@ -34,4 +34,9 @@ verify_os
3434
JSTAT="${TESTJAVA}/bin/jstat"
3535

3636
${JSTAT} ${COMMON_JSTAT_FLAGS} -gcnewcapacity 0 2>&1 | awk -f ${TESTSRC}/gcNewCapacityOutput1.awk
37+
RC=$?
38+
if [ $RC -ne 0 ]; then
39+
exit $RC
40+
fi
41+
3742
${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gcnewcapacity 0 2>&1 | awk -f ${TESTSRC}/gcNewCapacityOutput1.awk

test/jdk/sun/tools/jstat/jstatGcNewOutput1.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2004, 2025, 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
@@ -34,4 +34,9 @@ verify_os
3434
JSTAT="${TESTJAVA}/bin/jstat"
3535

3636
${JSTAT} ${COMMON_JSTAT_FLAGS} -gcnew 0 2>&1 | awk -f ${TESTSRC}/gcNewOutput1.awk
37+
RC=$?
38+
if [ $RC -ne 0 ]; then
39+
exit $RC
40+
fi
41+
3742
${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gcnew 0 2>&1 | awk -f ${TESTSRC}/gcNewOutput1.awk

test/jdk/sun/tools/jstat/jstatGcOldCapacityOutput1.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2004, 2025, 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
@@ -34,4 +34,9 @@ verify_os
3434
JSTAT="${TESTJAVA}/bin/jstat"
3535

3636
${JSTAT} ${COMMON_JSTAT_FLAGS} -gcoldcapacity 0 2>&1 | awk -f ${TESTSRC}/gcOldCapacityOutput1.awk
37+
RC=$?
38+
if [ $RC -ne 0 ]; then
39+
exit $RC
40+
fi
41+
3742
${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gcoldcapacity 0 2>&1 | awk -f ${TESTSRC}/gcOldCapacityOutput1.awk

test/jdk/sun/tools/jstat/jstatGcOldOutput1.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2004, 2025, 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
@@ -34,4 +34,9 @@ verify_os
3434
JSTAT="${TESTJAVA}/bin/jstat"
3535

3636
${JSTAT} ${COMMON_JSTAT_FLAGS} -gcold 0 2>&1 | awk -f ${TESTSRC}/gcOldOutput1.awk
37+
RC=$?
38+
if [ $RC -ne 0 ]; then
39+
exit $RC
40+
fi
41+
3742
${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gcold 0 2>&1 | awk -f ${TESTSRC}/gcOldOutput1.awk

test/jdk/sun/tools/jstat/jstatGcOutput1.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2004, 2025, 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
@@ -34,4 +34,9 @@ verify_os
3434
JSTAT="${TESTJAVA}/bin/jstat"
3535

3636
${JSTAT} ${COMMON_JSTAT_FLAGS} -gc 0 2>&1 | awk -f ${TESTSRC}/gcOutput1.awk
37+
RC=$?
38+
if [ $RC -ne 0 ]; then
39+
exit $RC
40+
fi
41+
3742
${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gc 0 2>&1 | awk -f ${TESTSRC}/gcOutput1.awk

test/jdk/sun/tools/jstat/jstatLineCounts1.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2004, 2025, 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
@@ -34,4 +34,9 @@ verify_os
3434
JSTAT="${TESTJAVA}/bin/jstat"
3535

3636
${JSTAT} ${COMMON_JSTAT_FLAGS} -gcutil 0 250 5 2>&1 | awk -f ${TESTSRC}/lineCounts1.awk
37+
RC=$?
38+
if [ $RC -ne 0 ]; then
39+
exit $RC
40+
fi
41+
3742
${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gcutil 0 250 5 2>&1 | awk -f ${TESTSRC}/lineCounts1.awk

test/jdk/sun/tools/jstat/jstatLineCounts2.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2004, 2025, 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
@@ -34,4 +34,9 @@ verify_os
3434
JSTAT="${TESTJAVA}/bin/jstat"
3535

3636
${JSTAT} ${COMMON_JSTAT_FLAGS} -gcutil 0 2>&1 | awk -f ${TESTSRC}/lineCounts2.awk
37+
RC=$?
38+
if [ $RC -ne 0 ]; then
39+
exit $RC
40+
fi
41+
3742
${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gcutil 0 2>&1 | awk -f ${TESTSRC}/lineCounts2.awk

0 commit comments

Comments
 (0)