Fix e6c84f82b87576a57d1fa1c7e8c289d3d4fa7ab1
authorJakob Johnson <johnsonjakob99@gmail.com>
Mon, 21 Mar 2022 21:19:11 +0000 (14:19 -0700)
committerJakob Johnson <johnsonjakob99@gmail.com>
Mon, 21 Mar 2022 21:35:14 +0000 (14:35 -0700)
Failed buildbot: https://lab.llvm.org/buildbot/#/builders/68/builds/29250

Use toString() to consume the Error

lldb/unittests/Process/Linux/PerfTests.cpp

index f8467d7..3a1c08c 100644 (file)
@@ -61,7 +61,7 @@ TEST(Perf, TscConversion) {
 
   // Skip the test if the conversion parameters aren't available.
   if (!params)
-    GTEST_SKIP() << params.takeError();
+    GTEST_SKIP() << toString(params.takeError());
 
   Expected<uint64_t> tsc_before_sleep = readTsc();
   sleep(SLEEP_SECS);
@@ -69,9 +69,9 @@ TEST(Perf, TscConversion) {
 
   // Skip the test if we are unable to read the TSC value.
   if (!tsc_before_sleep)
-    GTEST_SKIP() << tsc_before_sleep.takeError();
+    GTEST_SKIP() << toString(tsc_before_sleep.takeError());
   if (!tsc_after_sleep)
-    GTEST_SKIP() << tsc_after_sleep.takeError();
+    GTEST_SKIP() << toString(tsc_after_sleep.takeError());
 
   std::chrono::nanoseconds converted_tsc_diff =
       params->ToWallTime(*tsc_after_sleep) -