Greg Solovyev has posted comments on this change. ( http://gerrit.cloudera.org:8080/12474 )
Change subject: KUDU-1900: add loopback check and test ...................................................................... Patch Set 6: (11 comments) http://gerrit.cloudera.org:8080/#/c/12474/2/src/kudu/integration-tests/security-itest.cc File src/kudu/integration-tests/security-itest.cc: http://gerrit.cloudera.org:8080/#/c/12474/2/src/kudu/integration-tests/security-itest.cc@376 PS2, Line 376: public SecurityITest, > external Done http://gerrit.cloudera.org:8080/#/c/12474/2/src/kudu/integration-tests/security-itest.cc@378 PS2, Line 378: }; > The initialization isn't necessary; getifaddrs() is going to overwrite 'ifa Done http://gerrit.cloudera.org:8080/#/c/12474/2/src/kudu/integration-tests/security-itest.cc@380 PS2, Line 380: INSTANTIATE_TEST_CASE_P(, AuthTokenIssuingTest, ::testing::ValuesIn( > Would be cleaner if this could early-out rather than introduce a new nested Done http://gerrit.cloudera.org:8080/#/c/12474/2/src/kudu/integration-tests/security-itest.cc@382 PS2, Line 382: // The following 3 test cases cover passing authn token over an > Wrap, too long. Done http://gerrit.cloudera.org:8080/#/c/12474/2/src/kudu/integration-tests/security-itest.cc@383 PS2, Line 383: // encrypted loopback connection. > Use C++-style casts here (static_cast or reinterpret_cast). Done http://gerrit.cloudera.org:8080/#/c/12474/2/src/kudu/integration-tests/security-itest.cc@388 PS2, Line 388: > Probably clearer as: Done http://gerrit.cloudera.org:8080/#/c/12474/2/src/kudu/integration-tests/security-itest.cc@392 PS2, Line 392: { BindMode::LOOPBACK, AUTH_DISABLED, RPC_ENCRYPTION_DISABLED, > Use RAII principles: set up a SCOPED_CLEANUP that calls freeifaddrs() when Done http://gerrit.cloudera.org:8080/#/c/12474/6/src/kudu/integration-tests/security-itest.cc File src/kudu/integration-tests/security-itest.cc: http://gerrit.cloudera.org:8080/#/c/12474/6/src/kudu/integration-tests/security-itest.cc@325 PS6, Line 325: bool assignIPToClient(bool external) { > Should use full camel-case: AssignIPToClient. Done http://gerrit.cloudera.org:8080/#/c/12474/6/src/kudu/integration-tests/security-itest.cc@337 PS6, Line 337: if (GetLocalNetworks(&local_networks).ok()) { > In the context of a test, I think we should hard stop if we encounter an un I think, effectively, this is a hard stop to the current test case. If GetLocalNetworks fails, this function returns FALSE and the caller will issue a warning and move on to the next test case. http://gerrit.cloudera.org:8080/#/c/12474/6/src/kudu/integration-tests/security-itest.cc@342 PS6, Line 342: char s[INET_ADDRSTRLEN]; : inet_ntop(AF_INET, &addr, s, INET_ADDRSTRLEN); > Could you encapsulate this into a new function inside Network? Seems like N I wasn't sure if creating new members inside Network is warranted until there is at least one non-test use case for them and until there is at least more than one use case for them. In other words, wouldn't this be premature optimization? http://gerrit.cloudera.org:8080/#/c/12474/6/src/kudu/integration-tests/security-itest.cc@463 PS6, Line 463: > Nit: extra space here. Done -- To view, visit http://gerrit.cloudera.org:8080/12474 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I3483a9729ddeeb7901e3738532a45b49e713208f Gerrit-Change-Number: 12474 Gerrit-PatchSet: 6 Gerrit-Owner: Greg Solovyev <gsolov...@cloudera.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Greg Solovyev <gsolov...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Comment-Date: Fri, 15 Feb 2019 00:35:28 +0000 Gerrit-HasComments: Yes