Annotate trace packets with a trusted producer uid

This patch adds a trusted uid field to the trace packet message, which
identifies the POSIX user account which submitted the associated trace
data to the tracing service. The field is created by the service in a
way that makes it unspoofable. Later we will also include a mapping
from package names to uids in the trace.

Bug: 69964495,73283884
Change-Id: I8fdacdd00ab8efd5d5bca7d4b164dd3c4c7f0741
diff --git a/src/tracing/core/trace_writer_impl_unittest.cc b/src/tracing/core/trace_writer_impl_unittest.cc
index a1a042f..3fe5b47 100644
--- a/src/tracing/core/trace_writer_impl_unittest.cc
+++ b/src/tracing/core/trace_writer_impl_unittest.cc
@@ -23,6 +23,7 @@
 #include "src/tracing/core/shared_memory_arbiter_impl.h"
 #include "src/tracing/test/aligned_buffer_test.h"
 
+#include "perfetto/trace/test_event.pbzero.h"
 #include "perfetto/trace/trace_packet.pbzero.h"
 
 namespace perfetto {
@@ -63,7 +64,7 @@
     auto packet = writer->NewTracePacket();
     char str[16];
     sprintf(str, "foobar %zu", i);
-    packet->set_test(str);
+    packet->set_for_testing()->set_str(str);
   }
 
   // Destroying the TraceWriteImpl should cause the last packet to be finalized