levy5307 commented on code in PR #1169:
URL: https://github.com/apache/incubator-pegasus/pull/1169#discussion_r978465581
##########
src/test/function_test/utils/utils.h:
##########
@@ -201,3 +202,15 @@ inline void compare(const T &expect, const U &actual)
ASSERT_NO_FATAL_FAILURE(compare(it1->second, it2->second, it1->first));
}
}
+
+inline void run_cmd(const std::string &cmd, std::string *output = nullptr)
+{
+ std::stringstream ss;
+ int ret = dsn::utils::pipe_execute(cmd.c_str(), ss);
Review Comment:
In my opinion, it's better to reduce the usage of raw pointer. Using
std::string instead is a better choice.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]