Don't use folly::shellify in StaticTracepointTest
authorChristopher Dykes <cdykes@fb.com>
Sun, 4 Jun 2017 03:10:38 +0000 (20:10 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sun, 4 Jun 2017 03:19:43 +0000 (20:19 -0700)
Summary: It's deprecated, so use the non-deprecated form instead.

Reviewed By: yfeldblum

Differential Revision: D5179133

fbshipit-source-id: 91440bc3768ee68d2aada2299fbfbcdd852f946c

folly/tracing/test/StaticTracepointTest.cpp

index 710c565c7fb386e447e465613a17be552358854b..d6b76ec8a7b0c26d5743326d75c0212974817a37 100644 (file)
@@ -26,7 +26,6 @@
 #include <folly/Conv.h>
 #include <folly/Format.h>
 #include <folly/Random.h>
-#include <folly/Shell.h>
 #include <folly/String.h>
 #include <folly/Subprocess.h>
 #include <folly/portability/GTest.h>
@@ -92,14 +91,14 @@ static std::string getExe() {
 }
 
 static std::string getNoteRawContent(const std::string& fileName) {
-  auto args = folly::shellify(
-      "objdump --{} --{}={} {}",
-      "full-content",
-      "section",
-      ".note." + kUSDTSubsectionName,
-      fileName);
-  auto subProc =
-      folly::Subprocess(args, folly::Subprocess::Options().pipeStdout());
+  auto subProc = folly::Subprocess(
+      std::vector<std::string>{
+          "objdump",
+          "--full-content",
+          "--section=.note." + kUSDTSubsectionName,
+          fileName,
+      },
+      folly::Subprocess::Options().pipeStdout().usePath());
   auto output = subProc.communicate();
   auto retCode = subProc.wait();
   CHECK(retCode.exited());