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

Commit 3f081d64 authored by Andreas Gampe's avatar Andreas Gampe Committed by android-build-merger
Browse files

Merge "Installd: Add selinux check"

am: f4d39e21

Change-Id: I75e5206e373173de41f5d9183977a25b411d3964
parents 35f1cdcc f4d39e21
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
@@ -143,6 +143,20 @@ static const char kDexFile[] =
    "AAAACADojmFLPcugSwoBAAAUAgAACwAYAAAAAAAAAAAAoIEAAAAAY2xhc3Nlcy5kZXhVVAUAA/Ns"
    "AAAACADojmFLPcugSwoBAAAUAgAACwAYAAAAAAAAAAAAoIEAAAAAY2xhc3Nlcy5kZXhVVAUAA/Ns"
    "+ll1eAsAAQQj5QIABIgTAABQSwUGAAAAAAEAAQBRAAAATwEAAAAA";
    "+ll1eAsAAQQj5QIABIgTAABQSwUGAAAAAAEAAQBRAAAATwEAAAAA";


class DexoptTestEnvTest : public testing::Test {
};

TEST_F(DexoptTestEnvTest, CheckSelinux) {
    ASSERT_EQ(1, is_selinux_enabled());

    // Crude cutout for virtual devices.
#if !defined(__i386__) && !defined(__x86_64__)
    constexpr bool kIsX86 = false;
#else
    constexpr bool kIsX86 = true;
#endif
    ASSERT_TRUE(1 == security_getenforce() || kIsX86);
}


class DexoptTest : public testing::Test {
class DexoptTest : public testing::Test {
protected:
protected: