Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
2cc4a976
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
1 年多 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
2cc4a976
编写于
7月 07, 2023
作者:
O
openharmony_ci
提交者:
Gitee
7月 07, 2023
浏览文件
操作
浏览文件
下载
差异文件
!2090 修改编译告警
Merge pull request !2090 from cheng_jinsong/master
上级
3e4150be
80a2ad37
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
19 addition
and
24 deletion
+19
-24
services/loopevent/loop/le_epoll.c
services/loopevent/loop/le_epoll.c
+1
-2
services/modules/init_eng/init_eng.c
services/modules/init_eng/init_eng.c
+0
-1
services/utils/init_utils.c
services/utils/init_utils.c
+7
-6
test/fuzztest/DoFormat_fuzzer/DoFormat_fuzzer.cpp
test/fuzztest/DoFormat_fuzzer/DoFormat_fuzzer.cpp
+0
-2
test/fuzztest/GetMountStatusForMountPoint_fuzzer/GetMountStatusForMountPoint_fuzzer.cpp
...rMountPoint_fuzzer/GetMountStatusForMountPoint_fuzzer.cpp
+0
-1
test/fuzztest/IsSupportedFilesystem_fuzzer/IsSupportedFilesystem_fuzzer.cpp
...pportedFilesystem_fuzzer/IsSupportedFilesystem_fuzzer.cpp
+0
-1
test/fuzztest/LoadFscryptPolicy_fuzzer/LoadFscryptPolicy_fuzzer.cpp
...est/LoadFscryptPolicy_fuzzer/LoadFscryptPolicy_fuzzer.cpp
+0
-1
test/unittest/deviceinfo/DeviceInfoUnittest.cpp
test/unittest/deviceinfo/DeviceInfoUnittest.cpp
+1
-1
test/unittest/loopevent/loopserver_unittest.cpp
test/unittest/loopevent/loopserver_unittest.cpp
+9
-7
test/unittest/param/param_shell_unittest.cpp
test/unittest/param/param_shell_unittest.cpp
+0
-1
test/unittest/param/param_stub.h
test/unittest/param/param_stub.h
+1
-1
未找到文件。
services/loopevent/loop/le_epoll.c
浏览文件 @
2cc4a976
...
...
@@ -16,7 +16,6 @@
#include <errno.h>
#include "le_epoll.h"
#include "le_utils.h"
static
int
IsValid_
(
const
EventEpoll
*
loop
)
{
...
...
@@ -139,4 +138,4 @@ LE_STATUS CreateEpollLoop(EventLoop **loop, uint32_t maxevents, uint32_t timeout
epoll
->
loop
.
addEvent
=
AddEvent_
;
epoll
->
loop
.
modEvent
=
ModEvent_
;
return
LE_SUCCESS
;
}
\ No newline at end of file
}
services/modules/init_eng/init_eng.c
浏览文件 @
2cc4a976
...
...
@@ -72,7 +72,6 @@ ENG_STATIC void BuildMountCmd(char *buffer, size_t len, const char *mp, const ch
{
int
ret
=
snprintf_s
(
buffer
,
len
,
len
-
1
,
"%s %s %s ro barrier=1"
,
fstype
,
dev
,
mp
);
if
(
ret
==
-
1
)
{
*
buffer
=
'\0'
;
}
...
...
services/utils/init_utils.c
浏览文件 @
2cc4a976
...
...
@@ -206,6 +206,7 @@ int IterateNameValuePairs(const char *src, void (*iterator)(const NAME_VALUE_PAI
{
int
cnt
=
0
;
const
char
*
seperator
;
const
char
*
tmp
=
src
;
NAME_VALUE_PAIR
nv
;
if
((
src
==
NULL
)
||
(
iterator
==
NULL
))
{
return
-
1
;
...
...
@@ -213,15 +214,15 @@ int IterateNameValuePairs(const char *src, void (*iterator)(const NAME_VALUE_PAI
do
{
// Find space seperator
nv
.
name
=
src
;
seperator
=
strchr
(
src
,
' '
);
nv
.
name
=
tmp
;
seperator
=
strchr
(
tmp
,
' '
);
if
(
seperator
==
NULL
)
{
// Last nv
nv
.
valueEnd
=
src
+
strlen
(
src
);
src
=
NULL
;
nv
.
valueEnd
=
tmp
+
strlen
(
tmp
);
tmp
=
NULL
;
}
else
{
nv
.
valueEnd
=
seperator
;
src
=
seperator
+
1
;
tmp
=
seperator
+
1
;
}
// Find equal seperator
...
...
@@ -239,7 +240,7 @@ int IterateNameValuePairs(const char *src, void (*iterator)(const NAME_VALUE_PAI
iterator
(
&
nv
,
context
);
cnt
+=
1
;
}
while
(
src
!=
NULL
);
}
while
(
tmp
!=
NULL
);
return
cnt
;
}
...
...
test/fuzztest/DoFormat_fuzzer/DoFormat_fuzzer.cpp
浏览文件 @
2cc4a976
...
...
@@ -13,8 +13,6 @@
* limitations under the License.
*/
#include "DoFormat_fuzzer.h"
#include <iostream>
#include <string>
#include "fs_manager/fs_manager.h"
...
...
test/fuzztest/GetMountStatusForMountPoint_fuzzer/GetMountStatusForMountPoint_fuzzer.cpp
浏览文件 @
2cc4a976
...
...
@@ -14,7 +14,6 @@
*/
#include "GetMountStatusForMountPoint_fuzzer.h"
#include <iostream>
#include <string>
#include "fs_manager/fs_manager.h"
...
...
test/fuzztest/IsSupportedFilesystem_fuzzer/IsSupportedFilesystem_fuzzer.cpp
浏览文件 @
2cc4a976
...
...
@@ -14,7 +14,6 @@
*/
#include "IsSupportedFilesystem_fuzzer.h"
#include <iostream>
#include <string>
#include "fs_manager/fs_manager.h"
...
...
test/fuzztest/LoadFscryptPolicy_fuzzer/LoadFscryptPolicy_fuzzer.cpp
浏览文件 @
2cc4a976
...
...
@@ -14,7 +14,6 @@
*/
#include "LoadFscryptPolicy_fuzzer.h"
#include <iostream>
#include "fs_manager/fs_manager.h"
namespace
OHOS
{
...
...
test/unittest/deviceinfo/DeviceInfoUnittest.cpp
浏览文件 @
2cc4a976
...
...
@@ -36,7 +36,7 @@ using namespace testing::ext;
using
namespace
std
;
using
namespace
OHOS
;
int
g_tokenType
=
OHOS
::
Security
::
AccessToken
::
TOKEN_HAP
;
static
int
g_tokenType
=
OHOS
::
Security
::
AccessToken
::
TOKEN_HAP
;
int
g_tokenVerifyResult
=
0
;
namespace
OHOS
{
namespace
Security
{
...
...
test/unittest/loopevent/loopserver_unittest.cpp
浏览文件 @
2cc4a976
...
...
@@ -16,6 +16,7 @@
#include <gtest/gtest.h>
#include <thread>
#include <sys/eventfd.h>
#include <cstdarg>
#include "begetctl.h"
#include "cJSON.h"
...
...
@@ -62,7 +63,8 @@ static void DecodeMessage(const char *buffer, size_t nread, uint32_t &cmd)
return
;
}
static
void
SendMessage
(
const
LoopHandle
loopHandle
,
const
TaskHandle
taskHandle
,
const
char
*
message
,
...)
template
<
typename
...
Args
>
static
void
SendMessage
(
const
LoopHandle
loopHandle
,
const
TaskHandle
taskHandle
,
const
char
*
message
,
Args
...
args
)
{
uint32_t
bufferSize
=
1024
;
// 1024 buffer size
BufferHandle
handle
=
LE_CreateBuffer
(
loopHandle
,
bufferSize
);
...
...
@@ -96,21 +98,21 @@ static void TestOnReceiveRequest(const TaskHandle task, const uint8_t *buffer, u
if
(
buffer
==
nullptr
)
{
return
;
}
printf
(
"Server receive message %s
\n
"
,
reinterpret
_cast
<
const
char
*>
(
buffer
));
printf
(
"Server receive message %s
\n
"
,
static
_cast
<
const
char
*>
(
buffer
));
uint32_t
cmd
=
0
;
DecodeMessage
(
reinterpret
_cast
<
const
char
*>
(
buffer
),
nread
,
cmd
);
SendMessage
(
g_loopServer_
,
task
,
reinterpret
_cast
<
const
char
*>
(
buffer
));
DecodeMessage
(
static
_cast
<
const
char
*>
(
buffer
),
nread
,
cmd
);
SendMessage
(
g_loopServer_
,
task
,
static
_cast
<
const
char
*>
(
buffer
));
}
static
void
TestClientOnReceiveRequest
(
const
TaskHandle
task
,
const
uint8_t
*
buffer
,
uint32_t
nread
)
{
printf
(
"Client receive message %s
\n
"
,
reinterpret
_cast
<
const
char
*>
(
buffer
));
printf
(
"Client receive message %s
\n
"
,
static
_cast
<
const
char
*>
(
buffer
));
EXPECT_NE
(
buffer
,
nullptr
);
if
(
buffer
==
nullptr
)
{
return
;
}
uint32_t
cmd
=
0
;
DecodeMessage
(
reinterpret
_cast
<
const
char
*>
(
buffer
),
nread
,
cmd
);
DecodeMessage
(
static
_cast
<
const
char
*>
(
buffer
),
nread
,
cmd
);
if
(
cmd
==
5
||
cmd
==
2
)
{
// 2 5 close server
LE_StopLoop
(
g_loopClient_
);
}
...
...
@@ -130,7 +132,7 @@ static void TestSendMessageComplete(const TaskHandle taskHandle, BufferHandle ha
uint32_t
bufferSize
=
1024
;
// 1024 buffer size
char
*
buffer
=
(
char
*
)
LE_GetBufferInfo
(
handle
,
nullptr
,
&
bufferSize
);
uint32_t
cmd
=
0
;
DecodeMessage
(
reinterpret
_cast
<
const
char
*>
(
buffer
),
bufferSize
,
cmd
);
DecodeMessage
(
static
_cast
<
const
char
*>
(
buffer
),
bufferSize
,
cmd
);
if
(
cmd
==
5
)
{
// 5 close server
LE_StopLoop
(
g_loopServer_
);
}
...
...
test/unittest/param/param_shell_unittest.cpp
浏览文件 @
2cc4a976
...
...
@@ -213,6 +213,5 @@ HWTEST_F(ParamShellUnitTest, TestParamShellcmd2, TestSize.Level1)
BShellEnvLoop
(
nullptr
);
BShellEnvErrString
(
GetShellHandle
(),
1
);
BShellEnvOutputResult
(
GetShellHandle
(),
1
);
}
}
// namespace init_ut
test/unittest/param/param_stub.h
浏览文件 @
2cc4a976
...
...
@@ -76,4 +76,4 @@ ParamLabelIndex *TestGetParamLabelIndex(const char *name);
}
#endif
#endif
#endif // PARAM_TEST_STUB_
\ No newline at end of file
#endif // PARAM_TEST_STUB_
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录