mirror of
https://github.com/openharmony/startup_init_lite.git
synced 2026-07-19 17:07:55 -04:00
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user