diff --git a/init/init_test.cpp b/init/init_test.cpp index 305bf95e2..0fc3ffcf2 100644 --- a/init/init_test.cpp +++ b/init/init_test.cpp @@ -204,6 +204,10 @@ TEST(init, StartConsole) { GTEST_SKIP() << "Must run on userdebug/eng builds. b/262090304"; return; } + if (getuid() != 0) { + GTEST_SKIP() << "Must be run as root."; + return; + } std::string init_script = R"init( service console /system/bin/sh class core