[Lldb-commits] [lldb] dae2faf - Fix TraceGDBRemotePacketsTest

Walter Erquinigo via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 16 11:53:19 PDT 2022


Author: Walter Erquinigo
Date: 2022-06-16T11:53:13-07:00
New Revision: dae2fafe056c83a802c1f1a1baa3cd48416c06f7

URL: https://github.com/llvm/llvm-project/commit/dae2fafe056c83a802c1f1a1baa3cd48416c06f7
DIFF: https://github.com/llvm/llvm-project/commit/dae2fafe056c83a802c1f1a1baa3cd48416c06f7.diff

LOG: Fix TraceGDBRemotePacketsTest

This test broke, but the fix is simple.

Added: 
    

Modified: 
    lldb/unittests/Utility/TraceGDBRemotePacketsTest.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/unittests/Utility/TraceGDBRemotePacketsTest.cpp b/lldb/unittests/Utility/TraceGDBRemotePacketsTest.cpp
index 47f55181ca38a..06063aa32ded2 100644
--- a/lldb/unittests/Utility/TraceGDBRemotePacketsTest.cpp
+++ b/lldb/unittests/Utility/TraceGDBRemotePacketsTest.cpp
@@ -38,7 +38,7 @@ TEST(TraceGDBRemotePacketsTest, IntelPTGetStateResponse) {
 
   // Create TraceIntelPTGetStateResponse.
   TraceIntelPTGetStateResponse response;
-  response.tsc_perf_zero_conversion = LinuxPerfZeroTscConversion{test_time_mult, test_time_shift, test_time_zero};
+  response.tsc_perf_zero_conversion = LinuxPerfZeroTscConversion{test_time_mult, test_time_shift, {test_time_zero}};
 
   // Serialize then deserialize.
   Expected<TraceIntelPTGetStateResponse> deserialized_response =
@@ -56,9 +56,9 @@ TEST(TraceGDBRemotePacketsTest, IntelPTGetStateResponse) {
   const uint64_t EXPECTED_NANOS = 9223372039007304983u;
 
   uint64_t pre_serialization_conversion =
-      response.tsc_perf_zero_conversion->ToNanos(TSC).count();
+      response.tsc_perf_zero_conversion->ToNanos(TSC);
   uint64_t post_serialization_conversion =
-      deserialized_response->tsc_perf_zero_conversion->ToNanos(TSC).count();
+      deserialized_response->tsc_perf_zero_conversion->ToNanos(TSC);
 
   // Check equality:
   // Ensure that both the TraceGetStateResponse and TraceIntelPTGetStateResponse


        


More information about the lldb-commits mailing list