8228998: Remove the testing against NSK_FALSE from tests
Summary: Remove the testing against NSK_FALSE from tests
Reviewed-by: cjplummer, sspitsyn
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t001/em02t001.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t001/em02t001.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -114,27 +114,27 @@
/* ============================================================================= */
-static int prepare() {
+static bool prepare() {
ExceptionCheckingJniEnvPtr ec_jni(jni);
mainThread = findThread(MAIN_THREAD_NAME);
if (!NSK_VERIFY(mainThread != NULL)) {
NSK_COMPLAIN1("<%s> thread not found\n", MAIN_THREAD_NAME);
- return NSK_FALSE;
+ return false;
}
/* make thread accessable for a long time */
mainThread = ec_jni->NewGlobalRef(mainThread, TRACE_JNI_CALL);
startObject = getStaticObjField(DEBUGEE_CLASS_NAME, START_FIELD_NAME, OBJECT_FIELD_SIG);
if (!NSK_VERIFY(startObject != NULL))
- return NSK_FALSE;
+ return false;
/*make object accessable for a long time*/
startObject = ec_jni->NewGlobalRef(startObject, TRACE_JNI_CALL);
endObject = getStaticObjField(DEBUGEE_CLASS_NAME, END_FIELD_NAME, OBJECT_FIELD_SIG);
if (!NSK_VERIFY(endObject != NULL))
- return NSK_FALSE;
+ return false;
/*make object accessable for a long time*/
endObject = ec_jni->NewGlobalRef(endObject, TRACE_JNI_CALL);
@@ -143,17 +143,16 @@
THREAD_FIELD_NAME,
THREAD_FIELD_SIG);
if (!NSK_VERIFY(debuggeeThread != NULL))
- return NSK_FALSE;
+ return false;
/* make thread accessable for a long time */
debuggeeThread = ec_jni->NewGlobalRef(debuggeeThread, TRACE_JNI_CALL);
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
-static int
-clean() {
+static bool clean() {
ExceptionCheckingJniEnvPtr ec_jni(jni);
/* disable MonitorContendedEnter event */
@@ -173,7 +172,7 @@
debuggeeThread = NULL;
mainThread = NULL;
- return NSK_TRUE;
+ return true;
}
/* ========================================================================== */
@@ -224,10 +223,10 @@
/* ============================================================================= */
-int checkEvents(int step) {
+bool checkEvents(int step) {
int i;
jvmtiEvent curr;
- int result = NSK_TRUE;
+ bool result = true;
int *currentCounts;
int isExpected = 0;
@@ -243,7 +242,7 @@
default:
NSK_COMPLAIN1("Unexpected step no: %d\n", step);
- return NSK_FALSE;
+ return false;
}
for (i = 0; i < JVMTI_EVENT_COUNT; i++) {
@@ -277,14 +276,14 @@
NSK_COMPLAIN2("Unexpected events number %7d for %s\n\texpected value is 1\n",
currentCounts[i],
TranslateEvent(curr));
- result = NSK_FALSE;
+ result = false;
}
} else {
if (currentCounts[i] > 0) {
NSK_COMPLAIN2("Unexpected event %s was sent %d times\n",
TranslateEvent(curr),
currentCounts[i]);
- result = NSK_FALSE;
+ result = false;
}
}
}
@@ -546,7 +545,7 @@
/* ============================================================================= */
-static int enableEvent(jvmtiEvent event) {
+static bool enableEvent(jvmtiEvent event) {
if (nsk_jvmti_isOptionalEvent(event)
&& (event != JVMTI_EVENT_MONITOR_CONTENDED_ENTER)
@@ -557,22 +556,22 @@
jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
} else {
if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
}
- return NSK_TRUE;
+ return true;
}
-static int enableEventList() {
+static bool enableEventList() {
int i;
- int result = NSK_TRUE;
+ bool result = true;
NSK_DISPLAY0("Enable events\n");
@@ -588,18 +587,17 @@
result = result && enableEvent(event);
}
- if (result == NSK_FALSE) {
+ if (!result) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
-static int
-setCallBacks(int step) {
+static bool setCallBacks(int step) {
int i;
@@ -659,9 +657,9 @@
}
if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
- return NSK_FALSE;
+ return false;
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/em02t002.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/em02t002.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -69,12 +69,12 @@
* Testcase: check tested events.
* - check if expected events received for each method
*
- * Returns NSK_TRUE if test may continue; or NSK_FALSE for test break.
+ * Returns true if test may continue; or false for test break.
*/
-int checkEvents(int step) {
+bool checkEvents(int step) {
int i;
jvmtiEvent curr;
- int result = NSK_TRUE;
+ bool result = true;
int *currentCounts;
int isExpected = 0;
@@ -93,7 +93,7 @@
default:
NSK_COMPLAIN1("Unexpected step no: %d\n", step);
- return NSK_FALSE;
+ return false;
}
if (currentCounts[ind_start] != currentCounts[ind_fnsh]) {
@@ -103,7 +103,7 @@
currentCounts[ind_start]);
NSK_COMPLAIN1("\tGARBAGE_COLLECTION_FINISH:\t%6d\n",
currentCounts[ind_fnsh]);
- return NSK_FALSE;
+ return false;
}
for (i = 0; i < JVMTI_EVENT_COUNT; i++) {
@@ -132,14 +132,14 @@
NSK_COMPLAIN2("Unexpected events number %7d for %s\n\texpected value must be greater than 1\n",
currentCounts[i],
TranslateEvent(curr));
- result = NSK_FALSE;
+ result = false;
}
} else {
if (currentCounts[i] > 0) {
NSK_COMPLAIN2("Unexpected event %s was sent %d times\n",
TranslateEvent(curr),
currentCounts[i]);
- result = NSK_FALSE;
+ result = false;
}
}
}
@@ -338,7 +338,7 @@
/* ============================================================================= */
-static int enableEvent(jvmtiEvent event) {
+static bool enableEvent(jvmtiEvent event) {
if (nsk_jvmti_isOptionalEvent(event)
&& (event != JVMTI_EVENT_GARBAGE_COLLECTION_START)
@@ -347,22 +347,22 @@
jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
} else {
if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
}
- return NSK_TRUE;
+ return true;
}
-static int enableEventList() {
+static bool enableEventList() {
int i;
- int result = NSK_TRUE;
+ bool result = true;
NSK_DISPLAY0("Enable events\n");
@@ -378,18 +378,17 @@
result = result && enableEvent(event);
}
- if (result == NSK_FALSE) {
+ if (!result) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
-static int
-setCallBacks(int step) {
+static bool setCallBacks(int step) {
int i;
@@ -447,9 +446,9 @@
}
if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
- return NSK_FALSE;
+ return false;
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t003/em02t003.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t003/em02t003.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -67,10 +67,10 @@
/* ========================================================================== */
-int checkEvents(int step) {
+bool checkEvents(int step) {
int i;
jvmtiEvent curr;
- int result = NSK_TRUE;
+ bool result = true;
int *currentCounts;
int isExpected = 0;
@@ -86,7 +86,7 @@
default:
NSK_COMPLAIN1("Unexpected step no: %d\n", step);
- return NSK_FALSE;
+ return false;
}
for (i = 0; i < JVMTI_EVENT_COUNT; i++) {
@@ -113,7 +113,7 @@
NSK_COMPLAIN2("Unexpected events number %7d for %s\n\texpected value must be greater than 1\n",
currentCounts[i],
TranslateEvent(curr));
- result = NSK_FALSE;
+ result = false;
}
} else {
@@ -122,7 +122,7 @@
NSK_COMPLAIN2("Unexpected event %s was sent %d times\n",
TranslateEvent(curr),
currentCounts[i]);
- result = NSK_FALSE;
+ result = false;
}
}
}
@@ -372,7 +372,7 @@
/* ============================================================================= */
-static int enableEvent(jvmtiEvent event) {
+static bool enableEvent(jvmtiEvent event) {
if (nsk_jvmti_isOptionalEvent(event)
&& (event != JVMTI_EVENT_COMPILED_METHOD_LOAD)
@@ -381,25 +381,25 @@
jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
} else {
if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
}
- return NSK_TRUE;
+ return true;
}
/**
* Enable or disable tested events.
*/
-static int enableEventList() {
+static bool enableEventList() {
int i;
- int result = NSK_TRUE;
+ bool result = true;
NSK_DISPLAY0("Enable events\n");
@@ -415,18 +415,17 @@
result = result && enableEvent(event);
}
- if (result == NSK_FALSE) {
+ if (!result) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
-static int
-setCallBacks(int step) {
+static bool setCallBacks(int step) {
int i;
@@ -485,9 +484,9 @@
}
if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
- return NSK_FALSE;
+ return false;
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t004/em02t004.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t004/em02t004.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -82,10 +82,10 @@
/* ========================================================================== */
-int checkEvents(int step) {
+bool checkEvents(int step) {
int i;
jvmtiEvent curr;
- int result = NSK_TRUE;
+ bool result = true;
int *currentCounts;
int isExpected = 0;
@@ -101,7 +101,7 @@
default:
NSK_COMPLAIN1("Unexpected step no: %d\n", step);
- return NSK_FALSE;
+ return false;
}
for (i = 0; i < JVMTI_EVENT_COUNT; i++) {
@@ -128,14 +128,14 @@
NSK_COMPLAIN2("Unexpected events number %7d for %s\n\texpected value must be greater than 1\n",
currentCounts[i],
TranslateEvent(curr));
- result = NSK_FALSE;
+ result = false;
}
} else {
if (currentCounts[i] > 0) {
NSK_COMPLAIN2("Unexpected event %s was sent %d times\n",
TranslateEvent(curr),
currentCounts[i]);
- result = NSK_FALSE;
+ result = false;
}
}
}
@@ -382,7 +382,7 @@
/* ============================================================================= */
-static int enableEvent(jvmtiEvent event) {
+static bool enableEvent(jvmtiEvent event) {
if (nsk_jvmti_isOptionalEvent(event)
&& (event != JVMTI_EVENT_NATIVE_METHOD_BIND)) {
@@ -390,25 +390,25 @@
jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
} else {
if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
}
- return NSK_TRUE;
+ return true;
}
/**
* Enable or disable tested events.
*/
-static int enableEventList() {
+static bool enableEventList() {
int i;
- int result = NSK_TRUE;
+ bool result = true;
NSK_DISPLAY0("Enable events\n");
@@ -424,18 +424,17 @@
result = result && enableEvent(event);
}
- if (result == NSK_FALSE) {
+ if (!result) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
-static int
-setCallBacks(int step) {
+static bool setCallBacks(int step) {
int i;
@@ -492,9 +491,9 @@
}
if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
- return NSK_FALSE;
+ return false;
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t005/em02t005.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t005/em02t005.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -70,7 +70,7 @@
int checkEvents(int step) {
int i;
jvmtiEvent curr;
- int result = NSK_TRUE;
+ bool result = true;
int *currentCounts;
int isExpected = 0;
@@ -86,7 +86,7 @@
default:
NSK_COMPLAIN1("Unexpected step no: %d\n", step);
- return NSK_FALSE;
+ return false;
}
for (i = 0; i < JVMTI_EVENT_COUNT; i++) {
@@ -113,7 +113,7 @@
NSK_COMPLAIN2("Unexpected events number %7d for %s\n\texpected value must be non-negative\n",
currentCounts[i],
TranslateEvent(curr));
- result = NSK_FALSE;
+ result = false;
}
} else {
@@ -122,7 +122,7 @@
NSK_COMPLAIN2("Unexpected event %s was sent %d times\n",
TranslateEvent(curr),
currentCounts[i]);
- result = NSK_FALSE;
+ result = false;
}
}
}
@@ -374,7 +374,7 @@
/* ============================================================================= */
-static int enableEvent(jvmtiEvent event) {
+static bool enableEvent(jvmtiEvent event) {
if (nsk_jvmti_isOptionalEvent(event)
&& (event != JVMTI_EVENT_VM_OBJECT_ALLOC)) {
@@ -382,23 +382,23 @@
jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
} else {
if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
}
- return NSK_TRUE;
+ return true;
}
/**
* Enable or disable tested events.
*/
-static int enableEventList() {
+static bool enableEventList() {
int i, result;
@@ -414,18 +414,17 @@
result = result && enableEvent(event);
}
- if (result == NSK_FALSE) {
+ if (!result) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
-static int
-setCallBacks(int step) {
+static bool setCallBacks(int step) {
int i;
@@ -479,9 +478,9 @@
}
if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
- return NSK_FALSE;
+ return false;
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/em02t006.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/em02t006.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -59,9 +59,9 @@
if (!NSK_JVMTI_VERIFY(jvmti->SetTag(object, tag))) {
NSK_COMPLAIN0("TEST FAILED: unable to set tag for a tested object\n");
- return NSK_FALSE;
+ return false;
}
- return NSK_TRUE;
+ return true;
}
static void
@@ -86,7 +86,7 @@
int checkEvents(int step) {
int i;
jvmtiEvent curr;
- int result = NSK_TRUE;
+ bool result = true;
int *currentCounts;
int isExpected = 0;
@@ -102,7 +102,7 @@
default:
NSK_COMPLAIN1("Unexpected step no: %d\n", step);
- return NSK_FALSE;
+ return false;
}
for (i = 0; i < JVMTI_EVENT_COUNT; i++) {
@@ -129,7 +129,7 @@
NSK_COMPLAIN2("Unexpected events number %7d for %s\n\texpected value must be greater than 1\n",
currentCounts[i],
TranslateEvent(curr));
- result = NSK_FALSE;
+ result = false;
}
} else {
@@ -137,7 +137,7 @@
NSK_COMPLAIN2("Unexpected event %s was sent %d times\n",
TranslateEvent(curr),
currentCounts[i]);
- result = NSK_FALSE;
+ result = false;
}
}
}
@@ -323,7 +323,7 @@
/* ============================================================================= */
-static int enableEvent(jvmtiEvent event) {
+static bool enableEvent(jvmtiEvent event) {
if (nsk_jvmti_isOptionalEvent(event)
&& (event != JVMTI_EVENT_OBJECT_FREE)) {
@@ -331,23 +331,23 @@
jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
} else {
if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
}
- return NSK_TRUE;
+ return true;
}
/**
* Enable or disable tested events.
*/
-static int enableEventList() {
+static bool enableEventList() {
int i, result;
@@ -363,18 +363,17 @@
result = result && enableEvent(event);
}
- if (result == NSK_FALSE) {
+ if (!result) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
-static int
-setCallBacks(int step) {
+static bool setCallBacks(int step) {
int i;
@@ -428,9 +427,9 @@
}
if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
- return NSK_FALSE;
+ return false;
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t007/em02t007.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t007/em02t007.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -71,7 +71,7 @@
int checkEvents(int step) {
int i;
jvmtiEvent curr;
- int result = NSK_TRUE;
+ bool result = true;
int *currentCounts;
int isExpected = 0;
@@ -87,7 +87,7 @@
default:
NSK_COMPLAIN1("Unexpected step no: %d\n", step);
- return NSK_FALSE;
+ return false;
}
for (i = 0; i < JVMTI_EVENT_COUNT; i++) {
@@ -114,7 +114,7 @@
NSK_COMPLAIN2("Unexpected events number %7d for %s\n\texpected value must be greater than 1\n",
currentCounts[i],
TranslateEvent(curr));
- result = NSK_FALSE;
+ result = false;
}
} else {
@@ -122,7 +122,7 @@
NSK_COMPLAIN2("Unexpected event %s was sent %d times\n",
TranslateEvent(curr),
currentCounts[i]);
- result = NSK_FALSE;
+ result = false;
}
}
}
@@ -352,7 +352,7 @@
/* ============================================================================= */
-static int enableEvent(jvmtiEvent event) {
+static bool enableEvent(jvmtiEvent event) {
if (nsk_jvmti_isOptionalEvent(event)
&& (event != JVMTI_EVENT_SINGLE_STEP)) {
@@ -360,23 +360,23 @@
jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
} else {
if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
}
- return NSK_TRUE;
+ return true;
}
/**
* Enable or disable tested events.
*/
-static int enableEventList() {
+static bool enableEventList() {
int i, result;
@@ -392,18 +392,17 @@
result = result && enableEvent(event);
}
- if (result == NSK_FALSE) {
+ if (!result) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
-static int
-setCallBacks(int step) {
+static bool setCallBacks(int step) {
int i;
@@ -464,9 +463,9 @@
}
if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
- return NSK_FALSE;
+ return false;
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t008/em02t008.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t008/em02t008.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -68,7 +68,7 @@
int checkEvents(int step) {
int i;
jvmtiEvent curr;
- int result = NSK_TRUE;
+ bool result = true;
int *currentCounts;
int isExpected = 0;
@@ -84,7 +84,7 @@
default:
NSK_COMPLAIN1("Unexpected step no: %d\n", step);
- return NSK_FALSE;
+ return false;
}
for (i = 0; i < JVMTI_EVENT_COUNT; i++) {
@@ -113,7 +113,7 @@
NSK_COMPLAIN2("Unexpected events number %7d for %s\n\texpected value must be greater than 1\n",
currentCounts[i],
TranslateEvent(curr));
- result = NSK_FALSE;
+ result = false;
}
} else {
@@ -121,7 +121,7 @@
NSK_COMPLAIN2("Unexpected event %s was sent %d times\n",
TranslateEvent(curr),
currentCounts[i]);
- result = NSK_FALSE;
+ result = false;
}
}
}
@@ -371,7 +371,7 @@
/* ============================================================================= */
-static int enableEvent(jvmtiEvent event) {
+static bool enableEvent(jvmtiEvent event) {
if (nsk_jvmti_isOptionalEvent(event)
&& (event != JVMTI_EVENT_EXCEPTION)
@@ -380,23 +380,23 @@
jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
} else {
if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
}
- return NSK_TRUE;
+ return true;
}
/**
* Enable or disable tested events.
*/
-static int enableEventList() {
+static bool enableEventList() {
int i, result;
@@ -412,18 +412,17 @@
result = result && enableEvent(event);
}
- if (result == NSK_FALSE) {
+ if (!result) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
-static int
-setCallBacks(int step) {
+static bool setCallBacks(int step) {
int i;
@@ -478,9 +477,9 @@
}
if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
- return NSK_FALSE;
+ return false;
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t009/em02t009.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t009/em02t009.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -69,7 +69,7 @@
int checkEvents(int step) {
int i;
jvmtiEvent curr;
- int result = NSK_TRUE;
+ bool result = true;
int *currentCounts;
int isExpected = 0;
@@ -85,7 +85,7 @@
default:
NSK_COMPLAIN1("Unexpected step no: %d\n", step);
- return NSK_FALSE;
+ return false;
}
for (i = 0; i < JVMTI_EVENT_COUNT; i++) {
@@ -115,7 +115,7 @@
NSK_COMPLAIN2("Unexpected events number %7d for %s\n\texpected value must be greater than 1\n",
currentCounts[i],
TranslateEvent(curr));
- result = NSK_FALSE;
+ result = false;
}
} else {
if (currentCounts[i] != NUMBER_OF_INVOCATIONS) {
@@ -123,7 +123,7 @@
TranslateEvent(curr),
currentCounts[i],
NUMBER_OF_INVOCATIONS);
- result = NSK_FALSE;
+ result = false;
}
}
} else {
@@ -132,7 +132,7 @@
NSK_COMPLAIN2("Unexpected event %s was sent %d times\n",
TranslateEvent(curr),
currentCounts[i]);
- result = NSK_FALSE;
+ result = false;
}
}
}
@@ -378,7 +378,7 @@
/* ============================================================================= */
-static int enableEvent(jvmtiEvent event) {
+static bool enableEvent(jvmtiEvent event) {
if (nsk_jvmti_isOptionalEvent(event)
&& (event != JVMTI_EVENT_METHOD_ENTRY)
@@ -387,23 +387,23 @@
jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
} else {
if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
}
- return NSK_TRUE;
+ return true;
}
/**
* Enable or disable tested events.
*/
-static int enableEventList() {
+static bool enableEventList() {
int i, result;
@@ -419,18 +419,17 @@
result = result && enableEvent(event);
}
- if (result == NSK_FALSE) {
+ if (!result) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
-static int
-setCallBacks(int step) {
+static bool setCallBacks(int step) {
int i;
@@ -485,9 +484,9 @@
}
if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
- return NSK_FALSE;
+ return false;
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t010/em02t010.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t010/em02t010.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -73,7 +73,7 @@
int checkEvents(int step) {
int i;
jvmtiEvent curr;
- int result = NSK_TRUE;
+ bool result = true;
int *currentCounts;
int isExpected = 0;
@@ -89,7 +89,7 @@
default:
NSK_COMPLAIN1("Unexpected step no: %d\n", step);
- return NSK_FALSE;
+ return false;
}
for (i = 0; i < JVMTI_EVENT_COUNT; i++) {
@@ -121,14 +121,14 @@
TranslateEvent(curr),
currentCounts[i],
NUMBER_OF_INVOCATIONS);
- result = NSK_FALSE;
+ result = false;
}
} else {
if (currentCounts[i] < 1) {
NSK_COMPLAIN2("Unexpected events number %7d for %s\n\texpected value must be greater than 1\n",
currentCounts[i],
TranslateEvent(curr));
- result = NSK_FALSE;
+ result = false;
}
}
@@ -138,7 +138,7 @@
NSK_COMPLAIN2("Unexpected event %s was sent %d times\n",
TranslateEvent(curr),
currentCounts[i]);
- result = NSK_FALSE;
+ result = false;
}
}
}
@@ -334,7 +334,7 @@
/* ============================================================================= */
-static int enableEvent(jvmtiEvent event) {
+static bool enableEvent(jvmtiEvent event) {
if (nsk_jvmti_isOptionalEvent(event)
&& (event != JVMTI_EVENT_FIELD_MODIFICATION)
@@ -343,23 +343,23 @@
jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
} else {
if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
}
- return NSK_TRUE;
+ return true;
}
/**
* Enable or disable tested events.
*/
-static int enableEventList() {
+static bool enableEventList() {
int i, result;
@@ -375,18 +375,17 @@
result = result && enableEvent(event);
}
- if (result == NSK_FALSE) {
+ if (!result) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
-static int
-setCallBacks(int step) {
+static bool setCallBacks(int step) {
int i;
@@ -441,9 +440,9 @@
}
if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
- return NSK_FALSE;
+ return false;
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t011/em02t011.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t011/em02t011.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -72,7 +72,7 @@
int checkEvents(int step) {
int i;
jvmtiEvent curr;
- int result = NSK_TRUE;
+ bool result = true;
int *currentCounts;
int isExpected = 0;
@@ -88,7 +88,7 @@
default:
NSK_COMPLAIN1("Unexpected step no: %d\n", step);
- return NSK_FALSE;
+ return false;
}
for (i = 0; i < JVMTI_EVENT_COUNT; i++) {
@@ -116,7 +116,7 @@
NSK_COMPLAIN2("Unexpected events number %7d for %s\n\texpected value must be greater than 1\n",
currentCounts[i],
TranslateEvent(curr));
- result = NSK_FALSE;
+ result = false;
}
} else {
if (currentCounts[i] != NUMBER_OF_INVOCATIONS) {
@@ -124,7 +124,7 @@
TranslateEvent(curr),
currentCounts[i],
NUMBER_OF_INVOCATIONS);
- result = NSK_FALSE;
+ result = false;
}
}
@@ -134,7 +134,7 @@
NSK_COMPLAIN2("Unexpected event %s was sent %d times\n",
TranslateEvent(curr),
currentCounts[i]);
- result = NSK_FALSE;
+ result = false;
}
}
}
@@ -321,7 +321,7 @@
/* ============================================================================= */
-static int enableEvent(jvmtiEvent event) {
+static bool enableEvent(jvmtiEvent event) {
if (nsk_jvmti_isOptionalEvent(event)
&& (event != JVMTI_EVENT_BREAKPOINT)) {
@@ -329,23 +329,23 @@
jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
} else {
if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
}
- return NSK_TRUE;
+ return true;
}
/**
* Enable or disable tested events.
*/
-static int enableEventList() {
+static bool enableEventList() {
int i, result;
@@ -361,18 +361,17 @@
result = result && enableEvent(event);
}
- if (result == NSK_FALSE) {
+ if (!result) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
-static int
-setCallBacks(int step) {
+static bool setCallBacks(int step) {
int i;
@@ -426,9 +425,9 @@
}
if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
- return NSK_FALSE;
+ return false;
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t012/em02t012.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t012/em02t012.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -75,10 +75,10 @@
/* ========================================================================== */
-int checkEvents(int step) {
+bool checkEvents(int step) {
int i;
jvmtiEvent curr;
- int result = NSK_TRUE;
+ bool result = true;
int *currentCounts;
int isExpected = 0;
@@ -94,7 +94,7 @@
default:
NSK_COMPLAIN1("Unexpected step no: %d\n", step);
- return NSK_FALSE;
+ return false;
}
for (i = 0; i < JVMTI_EVENT_COUNT; i++) {
@@ -123,14 +123,14 @@
TranslateEvent(curr),
currentCounts[i],
NUMBER_OF_INVOCATIONS);
- result = NSK_FALSE;
+ result = false;
}
} else {
if (currentCounts[i] < 1) {
NSK_COMPLAIN2("Unexpected events number %7d for %s\n\texpected value must be greater than 1\n",
currentCounts[i],
TranslateEvent(curr));
- result = NSK_FALSE;
+ result = false;
}
}
@@ -140,7 +140,7 @@
NSK_COMPLAIN2("Unexpected event %s was sent %d times\n",
TranslateEvent(curr),
currentCounts[i]);
- result = NSK_FALSE;
+ result = false;
}
}
}
@@ -325,7 +325,7 @@
/* ============================================================================= */
-static int enableEvent(jvmtiEvent event) {
+static bool enableEvent(jvmtiEvent event) {
if (nsk_jvmti_isOptionalEvent(event)
&& (event != JVMTI_EVENT_FRAME_POP)) {
@@ -333,23 +333,23 @@
jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
} else {
if (!NSK_JVMTI_VERIFY(jvmti->SetEventNotificationMode(JVMTI_ENABLE, event, NULL))) {
NSK_COMPLAIN1("Unexpected error enabling %s\n",
TranslateEvent(event));
- return NSK_FALSE;
+ return false;
}
}
- return NSK_TRUE;
+ return true;
}
/**
* Enable or disable tested events.
*/
-static int enableEventList() {
+static bool enableEventList() {
int i, result;
@@ -365,18 +365,17 @@
result = result && enableEvent(event);
}
- if (result == NSK_FALSE) {
+ if (!result) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
-static int
-setCallBacks(int step) {
+static bool setCallBacks(int step) {
int i;
@@ -430,9 +429,9 @@
}
if (!NSK_JVMTI_VERIFY(jvmti->SetEventCallbacks(&eventCallbacks, sizeof(eventCallbacks))))
- return NSK_FALSE;
+ return false;
- return NSK_TRUE;
+ return true;
}
/* ============================================================================= */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS103/hs103t002/hs103t002.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS103/hs103t002/hs103t002.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -117,7 +117,7 @@
return JNI_ERR;
} else {
jvmtiCapabilities caps;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS104/hs104t001/hs104t001.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS104/hs104t001/hs104t001.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -81,7 +81,7 @@
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS104/hs104t002/hs104t002.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS104/hs104t002/hs104t002.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -54,7 +54,7 @@
return JNI_ERR;
} else {
jvmtiCapabilities caps;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS202/hs202t001/hs202t001.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS202/hs202t001/hs202t001.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -151,7 +151,7 @@
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
memset(&caps, 0, sizeof(caps));
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS202/hs202t002/hs202t002.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS202/hs202t002/hs202t002.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -103,7 +103,7 @@
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
memset(&caps, 0, sizeof(caps));
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t001/hs203t001.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t001/hs203t001.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -145,7 +145,7 @@
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t002/hs203t002.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t002/hs203t002.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -146,7 +146,7 @@
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t003/hs203t003.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t003/hs203t003.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -134,7 +134,7 @@
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("#error Agent :: Failed to parse options.\n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t004/hs203t004.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS203/hs203t004/hs203t004.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -151,7 +151,7 @@
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
memset(&caps, 0, sizeof(caps));
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
NSK_DISPLAY0("#error Agent :: Failed to parse options.\n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t001/hs301t001.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t001/hs301t001.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -55,7 +55,7 @@
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options.\n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t002/hs301t002.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t002/hs301t002.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -57,7 +57,7 @@
return JNI_ERR;
} else {
jvmtiCapabilities caps;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf(" Agent:: ## error agent Failed to parse options.\n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t003/hs301t003.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t003/hs301t003.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -75,7 +75,7 @@
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options.\n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t004/hs301t004.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t004/hs301t004.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -76,7 +76,7 @@
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t005/hs301t005.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS301/hs301t005/hs301t005.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -73,7 +73,7 @@
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t001/hs302t001.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t001/hs302t001.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -73,7 +73,7 @@
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t002/hs302t002.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t002/hs302t002.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -76,7 +76,7 @@
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t003/hs302t003.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t003/hs302t003.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -77,7 +77,7 @@
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t004/hs302t004.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t004/hs302t004.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -73,7 +73,7 @@
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t005/hs302t005.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t005/hs302t005.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -75,7 +75,7 @@
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t006/hs302t006.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t006/hs302t006.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -74,7 +74,7 @@
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t007/hs302t007.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t007/hs302t007.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -71,7 +71,7 @@
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t008/hs302t008.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t008/hs302t008.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -74,7 +74,7 @@
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t009/hs302t009.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t009/hs302t009.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -74,7 +74,7 @@
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t010/hs302t010.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t010/hs302t010.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -73,7 +73,7 @@
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t011/hs302t011.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t011/hs302t011.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -74,7 +74,7 @@
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t012/hs302t012.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS302/hs302t012/hs302t012.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -76,7 +76,7 @@
} else {
jvmtiCapabilities caps;
jvmtiEventCallbacks eventCallbacks;
- if (nsk_jvmti_parseOptions(options) == NSK_FALSE) {
+ if (!nsk_jvmti_parseOptions(options)) {
nsk_printf("# error agent Failed to parse options \n");
return JNI_ERR;
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref001/followref001.cpp Fri Aug 02 11:28:58 2019 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/FollowReferences/followref001/followref001.cpp Fri Aug 02 11:24:59 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -101,8 +101,7 @@
/* ============================================================================= */
static int get_reference_index(jvmtiHeapReferenceKind reference_kind,
- const jvmtiHeapReferenceInfo* reference_info)
-{
+ const jvmtiHeapReferenceInfo* reference_info) {
int referrer_index = 0;
switch (reference_kind) {
@@ -132,11 +131,10 @@
/** Initialize objectDescList. */
-static int initObjectDescList(jvmtiEnv* jvmti,
- int chainLength,
- int* objectsCount,
- ObjectDesc** objectDescList)
-{
+static bool initObjectDescList(jvmtiEnv* jvmti,
+ int chainLength,
+ int* objectsCount,
+ ObjectDesc** objectDescList) {
/* root object + reachable and unreachable object chains */
*objectsCount = 1 + 2 * chainLength;
@@ -145,7 +143,7 @@
if (!NSK_JVMTI_VERIFY(jvmti->Allocate((*objectsCount * sizeof(ObjectDesc)),
(unsigned char**) objectDescList))) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
printf(" ... allocated array: 0x%p\n", (void*)objectDescList);
fflush(0);
@@ -166,21 +164,20 @@
(*objectDescList)[chainLength].exp_found = 1;
- return NSK_TRUE;
+ return true;
} /* initObjectDescList */
/** Find and tag classes. */
-static int getAndTagClasses(jvmtiEnv* jvmti,
- JNIEnv* jni,
- jclass* debugeeClass,
- jclass* rootObjectClass,
- jclass* chainObjectClass)
-{
+static bool getAndTagClasses(jvmtiEnv* jvmti,
+ JNIEnv* jni,
+ jclass* debugeeClass,
+ jclass* rootObjectClass,
+ jclass* chainObjectClass) {
if (!NSK_JNI_VERIFY(jni, (*debugeeClass = jni->FindClass(DEBUGEE_CLASS_NAME)) != NULL)) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
printf("\nFound debugee class: 0x%p\n %s\n",
(void*) *debugeeClass, DEBUGEE_CLASS_NAME);
@@ -189,7 +186,7 @@
if (!NSK_JNI_VERIFY(jni, (*rootObjectClass =
jni->FindClass(ROOT_OBJECT_CLASS_NAME)) != NULL)) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
if (!NSK_JVMTI_VERIFY(jvmti->SetTag(*rootObjectClass, ROOT_CLASS_TAG))) {
@@ -205,7 +202,7 @@
if (!NSK_JNI_VERIFY(jni, (*chainObjectClass =
jni->FindClass(CHAIN_OBJECT_CLASS_NAME)) != NULL)) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
if (!NSK_JVMTI_VERIFY(jvmti->SetTag(*chainObjectClass, CHAIN_CLASS_TAG))) {
@@ -216,27 +213,26 @@
CHAIN_OBJECT_CLASS_NAME);
fflush(0);
- return NSK_TRUE;
+ return true;
} /* getAndTagClasses */
/** Obtain chain of tested objects and tag them recursively. */
-static int getFieldsAndObjects(jvmtiEnv* jvmti,
- JNIEnv* jni,
- jclass debugeeClass,
- jclass rootObjectClass,
- jclass chainObjectClass,
- jobject* rootObjectPtr,
- jfieldID* reachableChainField,
- jfieldID* unreachableChainField,
- jfieldID* nextField)
-{
+static bool getFieldsAndObjects(jvmtiEnv* jvmti,
+ JNIEnv* jni,
+ jclass debugeeClass,
+ jclass rootObjectClass,
+ jclass chainObjectClass,
+ jobject* rootObjectPtr,
+ jfieldID* reachableChainField,
+ jfieldID* unreachableChainField,
+ jfieldID* nextField) {
jfieldID rootObjectField = NULL;
if (!NSK_JNI_VERIFY(jni, (rootObjectField =
jni->GetStaticFieldID(debugeeClass, OBJECT_FIELD_NAME, ROOT_OBJECT_CLASS_SIG)) != NULL)) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
printf("\nFound fieldID: 0x%p - \'%s\' static field in debugee class\n",
(void*) rootObjectField, OBJECT_FIELD_NAME);
@@ -245,7 +241,7 @@
if (!NSK_JNI_VERIFY(jni, (*reachableChainField =
jni->GetFieldID(rootObjectClass, REACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
printf("\nFound fieldID: 0x%p - \'%s\' field in root object class\n",
(void*) reachableChainField, REACHABLE_CHAIN_FIELD_NAME);
@@ -254,7 +250,7 @@
if (!NSK_JNI_VERIFY(jni, (*unreachableChainField =
jni->GetFieldID(rootObjectClass, UNREACHABLE_CHAIN_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
printf("\nFound fieldID: 0x%p - \'%s\' field in root object class\n",
@@ -264,7 +260,7 @@
if (!NSK_JNI_VERIFY(jni, (*nextField =
jni->GetFieldID(chainObjectClass, NEXT_FIELD_NAME, CHAIN_OBJECT_CLASS_SIG)) != NULL)) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
printf("\nFound fieldID: 0x%p - \'%s\' field in chain object class\n",
(void*) nextField, NEXT_FIELD_NAME);
@@ -273,24 +269,24 @@
if (!NSK_JNI_VERIFY(jni, (*rootObjectPtr =
jni->GetStaticObjectField(debugeeClass, rootObjectField)) != NULL)) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
printf("\nFound root object: 0x%p\n", (void*) *rootObjectPtr);
fflush(0);
if (!NSK_JNI_VERIFY(jni, (*rootObjectPtr = jni->NewGlobalRef(*rootObjectPtr)) != NULL)) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
printf("Created root object global ref: 0x%p\n", (void*)*rootObjectPtr);
fflush(0);
- return NSK_TRUE;
+ return true;
} /* getFieldsAndObjects */
/** Obtain chain of tested objects and tag them recursively. */
-static int getAndTagChainObjects(
+static bool getAndTagChainObjects(
jvmtiEnv* jvmti,
JNIEnv* jni,
jobject currObj,
@@ -299,13 +295,12 @@
int count,
ObjectDesc objectDescList[],
jlong tag,
- int reachable)
-{
+ bool reachable) {
jobject nextObj = NULL;
jlong objTag = (reachable ? tag : -tag);
if (count <= 0) {
- return NSK_TRUE;
+ return true;
}
count--;
@@ -313,7 +308,7 @@
if (!NSK_JNI_VERIFY(jni, (nextObj = jni->GetObjectField(currObj, refField)) != NULL)) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
objectDescList[count].tag = objTag;
@@ -338,12 +333,12 @@
tag,
reachable)
) {
- return NSK_FALSE;
+ return false;
}
NSK_TRACE(jni->DeleteLocalRef(nextObj));
- return NSK_TRUE;
+ return true;
} /* getAndTagChainObjects */
/** Obtain all tested objects from debugee class and tag them recursively. */
@@ -363,31 +358,31 @@
jfieldID unreachableChainField = NULL;
jfieldID nextField = NULL;
- if (initObjectDescList(jvmti,
- chainLength,
- objectsCount,
- objectDescList) == NSK_FALSE) {
- return NSK_FALSE;
+ if (!initObjectDescList(jvmti,
+ chainLength,
+ objectsCount,
+ objectDescList)) {
+ return false;
}
- if (getAndTagClasses(jvmti,
- jni,
- &debugeeClass,
- &rootObjectClass,
- &chainObjectClass) == NSK_FALSE) {
- return NSK_FALSE;
+ if (!getAndTagClasses(jvmti,
+ jni,
+ &debugeeClass,
+ &rootObjectClass,
+ &chainObjectClass)) {
+ return false;
}
- if (getFieldsAndObjects(jvmti,
- jni,
- debugeeClass,
- rootObjectClass,
- chainObjectClass,
- rootObjectPtr,
- &reachableChainField,
- &unreachableChainField,
- &nextField) == NSK_FALSE) {
- return NSK_FALSE;
+ if (!getFieldsAndObjects(jvmti,
+ jni,
+ debugeeClass,
+ rootObjectClass,
+ chainObjectClass,
+ rootObjectPtr,
+ &reachableChainField,
+ &unreachableChainField,
+ &nextField)) {
+ return false;
}
printf("\nObtain and tag chain objects:\n");
@@ -411,10 +406,10 @@
chainLength,
(*objectDescList) + 1,
CHAIN_OBJECT_TAG,
- NSK_TRUE) /* reachable objects */
+ true) /* reachable objects */
) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
printf(" unreachable objects chain: %d objects\n", chainLength);
@@ -426,22 +421,22 @@
chainLength,
(*objectDescList) + 1 + chainLength,
CHAIN_OBJECT_TAG,
- NSK_FALSE) /* unreachable objects */
+ false) /* unreachable objects */
) {
nsk_jvmti_setFailStatus();
- return NSK_FALSE;
+ return false;
}
- return NSK_TRUE;
+ return true;
} /* getAndTagTestedObjects */
/** Check if tagged objects were iterated. */
-static int checkTestedObjects(jvmtiEnv* jvmti,
- JNIEnv* jni,
- int chainLength,
- ObjectDesc objectDescList[])
+static bool checkTestedObjects(jvmtiEnv* jvmti,
+ JNIEnv* jni,
+ int chainLength,
+ ObjectDesc objectDescList[])
{
- int success = NSK_TRUE;
+ bool success = true;
int i, idx;
printf("Following tagged objects were iterated:\n");
@@ -498,16 +493,16 @@
fflush(0);
}
- return NSK_TRUE;
+ return true;
} /* checkTestedObjects */
/** Release references to the tested objects and free allocated memory. */
-static int releaseTestedObjects(jvmtiEnv* jvmti,
- JNIEnv* jni,
- int chainLength,
- ObjectDesc* objectDescList,
- jobject rootObject)
+static void releaseTestedObjects(jvmtiEnv* jvmti,
+ JNIEnv* jni,
+ int chainLength,
+ ObjectDesc* objectDescList,
+ jobject rootObject)
{
if (rootObject != NULL) {
printf("Release object reference to root tested object: 0x%p\n", rootObject);
@@ -522,7 +517,6 @@
}
fflush(0);
- return NSK_TRUE;
} /* releaseTestedObjects */
@@ -784,10 +778,7 @@
printf(">>> Clean used data\n");
fflush(0);
- if (!NSK_VERIFY(releaseTestedObjects(jvmti, jni, chainLength,
- objectDescList, rootObject))) {
- return;
- }
+ releaseTestedObjects(jvmti, jni, chainLength, objectDescList, rootObject);
printf(">>> Let debugee to finish\n");
fflush(0);