bneradt commented on code in PR #13518:
URL: https://github.com/apache/trafficserver/pull/13518#discussion_r3738563370


##########
src/api/InkAPITest.cc:
##########
@@ -1579,17 +1579,21 @@ 
REGRESSION_TEST(SDK_API_TSPortDescriptor)(RegressionTest *test, int /* atype ATS
   TSContDataSet(server_cont, params);
   TSContDataSet(client_cont, params);
 
-  port = TSPortDescriptorParse(nullptr);
-  if (port) {
-    SDK_RPRINT(test, "TSPortDescriptorParse", "NULL port descriptor", TC_FAIL, 
"TSPortDescriptorParse(NULL) returned %s", port);
+  if (TSPortDescriptorParse(nullptr, &port) != TS_ERROR) {
+    SDK_RPRINT(test, "TSPortDescriptorParse", "NULL port descriptor", TC_FAIL, 
"TSPortDescriptorParse(NULL) returned TS_SUCCESS");
     *pstatus = REGRESSION_TEST_FAILED;
     return;
   }
 
   snprintf(desc, sizeof(desc), "%u", params->port);
-  port = TSPortDescriptorParse(desc);
+  if (TSPortDescriptorParse(desc, &port) != TS_SUCCESS) {
+    SDK_RPRINT(test, "TSPortDescriptorParse", "Basic port descriptor", 
TC_FAIL, "TSPortDescriptorParse(%s) returned TS_ERROR",
+               desc);
+    *pstatus = REGRESSION_TEST_FAILED;
+    return;
+  }
 
-  if (TSPortDescriptorAccept(port, server_cont) == TS_ERROR) {
+  if (TSPortDescriptorAccept(&port, server_cont) == TS_ERROR) {
     SDK_RPRINT(test, "TSPortDescriptorParse", "Basic port descriptor", 
TC_FAIL, "TSPortDescriptorParse(%s) returned TS_ERROR",
                desc);

Review Comment:
   Corrected the regression diagnostic to reference TSPortDescriptorAccept.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to