Merge "init: Add task_profiles init command"
diff --git a/liblog/tests/Android.bp b/liblog/tests/Android.bp
index 50800c5..2a6424b 100644
--- a/liblog/tests/Android.bp
+++ b/liblog/tests/Android.bp
@@ -72,6 +72,7 @@
     ],
     static_libs: ["liblog"],
     isolated: true,
+    require_root: true,
 }
 
 // Build tests for the device (with .so). Run with:
diff --git a/liblog/tests/logd_writer_test.cpp b/liblog/tests/logd_writer_test.cpp
index c856720..b8e4726 100644
--- a/liblog/tests/logd_writer_test.cpp
+++ b/liblog/tests/logd_writer_test.cpp
@@ -29,6 +29,10 @@
 // socket.  This tests for that behavior.
 TEST(liblog, multi_connect_dgram_socket) {
 #ifdef __ANDROID__
+  if (getuid() != 0) {
+    GTEST_SKIP() << "Skipping test, must be run as root.";
+    return;
+  }
   auto temp_dir = TemporaryDir();
   auto socket_path = StringPrintf("%s/test_socket", temp_dir.path);