[ 
https://issues.apache.org/jira/browse/GEODE-9405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17371804#comment-17371804
 ] 

ASF GitHub Bot commented on GEODE-9405:
---------------------------------------

pivotal-jbarrett commented on a change in pull request #826:
URL: https://github.com/apache/geode-native/pull/826#discussion_r661123304



##########
File path: cppcache/integration-test/CMakeLists.txt
##########
@@ -205,7 +205,7 @@ set_tests_properties(
     testThinClientPoolAttrTest
     testThinClientPoolLocator
     testThinClientPoolRedundancy
-    testThinClientSecurityAuthentication
+    #testThinClientSecurityAuthentication

Review comment:
       Delete?

##########
File path: cppcache/integration-test/testThinClientSecurityAuthentication.cpp
##########
@@ -138,7 +140,7 @@ DUNIT_TASK_DEFINITION(LOCATORSERVER, CreateServer1)
         printf("Input to server cmd is -->  %s",
                cmdServerAuthenticator.c_str());
         CacheHelper::initServer(
-            1, nullptr, locHostPort,
+            1, "cacheserver_notify_subscription.xml", locHostPort,

Review comment:
       Wouldn't this change the intent of the test now that it starts with a 
cache xml file?

##########
File path: cppcache/integration-test/testThinClientSecurityAuthentication.cpp
##########
@@ -138,7 +140,7 @@ DUNIT_TASK_DEFINITION(LOCATORSERVER, CreateServer1)
         printf("Input to server cmd is -->  %s",
                cmdServerAuthenticator.c_str());
         CacheHelper::initServer(
-            1, nullptr, locHostPort,
+            1, "cacheserver_notify_subscription.xml", locHostPort,
             const_cast<char *>(cmdServerAuthenticator.c_str()));

Review comment:
       This should be fixed too. Really bad to be taking stripping the `const` 
off here. The funny thing is the method takes a `const`. The method should 
really be change to take a `const std::string&`. I know this might feel out of 
scope but it's right there!

##########
File path: cppcache/integration-test/testThinClientSecurityAuthorization.cpp
##########
@@ -54,13 +54,15 @@ const std::string locHostPort =
 std::shared_ptr<CredentialGenerator> credentialGeneratorHandler;
 
 std::string getXmlPath() {
-  char xmlPath[1000] = {'\0'};
-  const char *path = std::getenv("TESTSRC");
-  ASSERT(path != nullptr,
+  std::string path = std::string(std::getenv("TESTSRC"));

Review comment:
       Use `auto` on the lefthand side whenever you can. Almost all the new 
code should be corrected to use auto for all these local variables.

##########
File path: cppcache/integration-test/ThinClientSecurityHelper.hpp
##########
@@ -59,13 +59,15 @@ const char* regionNamesAuth[] = {"DistRegionAck"};
 std::shared_ptr<CredentialGenerator> credentialGeneratorHandler;
 
 std::string getXmlPath() {
-  char xmlPath[1000] = {'\0'};
-  const char* path = std::getenv("TESTSRC");
-  ASSERT(path != nullptr,
+  std::string path = std::string(std::getenv("TESTSRC"));
+
+  int indexOfCppcache = path.find("cppcache");

Review comment:
       We use boost::filesystem elsewhere so using it here to make file path 
operations safe would be nice.




-- 
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: notifications-unsubscr...@geode.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Build fails on rhel-8 release
> -----------------------------
>
>                 Key: GEODE-9405
>                 URL: https://issues.apache.org/jira/browse/GEODE-9405
>             Project: Geode
>          Issue Type: Bug
>          Components: native client
>            Reporter: Michael Martell
>            Priority: Major
>              Labels: pull-request-available
>
> Looks like a recent gcc compiler change on rhel-8 is causing build failures 
> in the CI.
> Looks to be related to unsafe use of strncpy in a few of our legacy C++ tests.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to