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

Commit f22c0f80 authored by Mark Salyzyn's avatar Mark Salyzyn Committed by android-build-merger
Browse files

Merge "liblog: test: enoent requires userdebug or eng to run" am: c408e770

am: 6c919e72

Change-Id: Ie987570623b8bb0a5e5597a5102c29350d56282a
parents 942b4efa 6c919e72
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
#endif
#include <gtest/gtest.h>
#include <log/log_event_list.h>
#include <log/log_properties.h>
#include <log/log_transport.h>
#include <log/logprint.h>
#include <private/android_filesystem_config.h>
@@ -1786,6 +1787,12 @@ TEST(liblog, enoent) {
        stderr,
        "WARNING: test conditions request being run as root and not AID=%d\n",
        getuid());
    if (!__android_log_is_debuggable()) {
      fprintf(
          stderr,
          "WARNING: can not run test on a \"user\" build, bypassing test\n");
      return;
    }
  }

  system((getuid() == AID_ROOT) ? "stop logd" : "su 0 stop logd");