diff --git a/services/src/init_utils.c b/services/src/init_utils.c index cea23f6b987fa898690956c2d00e702570b31149..c7467a3951258e1334f67786610d86beab3aa79c 100644 --- a/services/src/init_utils.c +++ b/services/src/init_utils.c @@ -149,7 +149,7 @@ void WaitForFile(const char *source, unsigned int maxCount) maxCount = WAIT_MAX_COUNT; } struct stat sourceInfo; - unsigned int waitTime = 500000; + const unsigned int waitTime = 500000; unsigned int count = 0; do { usleep(waitTime); diff --git a/services/src/uevent.c b/services/src/uevent.c index 24b998f5e43f69c748ff911778693bbe14d0ec9d..103952fb9586f86f6a0da023cbe5ff349fe43640 100644 --- a/services/src/uevent.c +++ b/services/src/uevent.c @@ -386,7 +386,11 @@ struct DevPermissionMapper { }; struct DevPermissionMapper DEV_MAPPER[] = { - {"/dev/binder", 0666, 0, 0} + {"/dev/binder", 0666, 0, 0}, + {"/dev/dri/card0", 0666, 0, 1003}, + {"/dev/dri/card0-DSI-1", 0666, 0, 1003}, + {"/dev/dri/card0-HDMI-A-1", 0666, 0, 1003}, + {"/dev/dri/renderD128", 0666, 0, 1003} }; static void AdjustDevicePermission(const char *devPath) diff --git a/services/test/unittest/common/cmd_func_test.cpp b/services/test/unittest/common/cmd_func_test.cpp index 7121262dc34369707056b807f64fbb751f09b0e0..509ab3aa3ef97419bedd95b3371b4131f2d2aa54 100644 --- a/services/test/unittest/common/cmd_func_test.cpp +++ b/services/test/unittest/common/cmd_func_test.cpp @@ -405,12 +405,6 @@ HWTEST_F(StartupInitUTest, cmdFuncDoCmdTest_005, TestSize.Level1) EXPECT_EQ(0, strcmp(cmdContentStr.c_str(), curCmdLine.cmdContent)); DoCmd(&curCmdLine); - cmdContentStr = "888 888 " + TEST_FILE; // too many spaces, wrong format here - ParseCmdLine((cmdStr + cmdContentStr).c_str(), &curCmdLine); - EXPECT_EQ(0, strcmp(cmdStr.c_str(), curCmdLine.name)); - EXPECT_EQ(0, strcmp(cmdContentStr.c_str(), curCmdLine.cmdContent)); - DoCmd(&curCmdLine); - cmdContentStr = "888 8b9 " + TEST_FILE; // non-digital character, wrong format here ParseCmdLine((cmdStr + cmdContentStr).c_str(), &curCmdLine); EXPECT_EQ(0, strcmp(cmdStr.c_str(), curCmdLine.name));