Require root for StartConsole Test

This test requires root to run. Skip if not root.

Bug: 270052268
Test: CtsInitTestCases init#StartConsole
Change-Id: I8b54acf97cda4bc2cfa15d0e34c678ec2b13f83e
This commit is contained in:
Daniel Rosenberg 2023-04-07 13:02:42 -07:00
parent 22387708fc
commit b8baa8dd34

View file

@ -201,6 +201,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