summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--liblog/tests/liblog_test.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/liblog/tests/liblog_test.cpp b/liblog/tests/liblog_test.cpp
index ec32da076..71f74abb1 100644
--- a/liblog/tests/liblog_test.cpp
+++ b/liblog/tests/liblog_test.cpp
@@ -36,6 +36,7 @@
36#endif 36#endif
37#include <gtest/gtest.h> 37#include <gtest/gtest.h>
38#include <log/log_event_list.h> 38#include <log/log_event_list.h>
39#include <log/log_properties.h>
39#include <log/log_transport.h> 40#include <log/log_transport.h>
40#include <log/logprint.h> 41#include <log/logprint.h>
41#include <private/android_filesystem_config.h> 42#include <private/android_filesystem_config.h>
@@ -1786,6 +1787,12 @@ TEST(liblog, enoent) {
1786 stderr, 1787 stderr,
1787 "WARNING: test conditions request being run as root and not AID=%d\n", 1788 "WARNING: test conditions request being run as root and not AID=%d\n",
1788 getuid()); 1789 getuid());
1790 if (!__android_log_is_debuggable()) {
1791 fprintf(
1792 stderr,
1793 "WARNING: can not run test on a \"user\" build, bypassing test\n");
1794 return;
1795 }
1789 } 1796 }
1790 1797
1791 system((getuid() == AID_ROOT) ? "stop logd" : "su 0 stop logd"); 1798 system((getuid() == AID_ROOT) ? "stop logd" : "su 0 stop logd");