Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9412363 authored by Tom Cherry's avatar Tom Cherry Committed by Gerrit Code Review
Browse files

Merge changes I5b3ca4f0,I610bed59

* changes:
  liblog: mark tests as require_root: true
  liblog: require root for multi_connect_dgram_socket test
parents 1a342a12 20d4d23f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ cc_defaults {
    ],
    static_libs: ["liblog"],
    isolated: true,
    require_root: true,
}

// Build tests for the device (with .so). Run with:
+4 −0
Original line number Diff line number Diff line
@@ -29,6 +29,10 @@ using android::base::unique_fd;
// 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);