Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
a9f242fe
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
a9f242fe
编写于
5月 11, 2022
作者:
O
openharmony_ci
提交者:
Gitee
5月 11, 2022
浏览文件
操作
浏览文件
下载
差异文件
!3157 ipc切换
Merge pull request !3157 from liubb_0516/weekly_20220510
上级
c1860be5
188b9067
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
28 addition
and
28 deletion
+28
-28
aafwk_lite/ability_posix/BUILD.gn
aafwk_lite/ability_posix/BUILD.gn
+1
-1
aafwk_lite/ability_posix/src/AbilityMgrTest.cpp
aafwk_lite/ability_posix/src/AbilityMgrTest.cpp
+11
-9
aafwk_lite/ability_posix/src/AbilityMgrTest2.cpp
aafwk_lite/ability_posix/src/AbilityMgrTest2.cpp
+4
-4
appexecfwk_lite/appexecfwk_posix/BUILD.gn
appexecfwk_lite/appexecfwk_posix/BUILD.gn
+1
-1
distributed_schedule_lite/distributed_schedule_posix/BUILD.gn
...ributed_schedule_lite/distributed_schedule_posix/BUILD.gn
+1
-1
distributed_schedule_lite/system_ability_manager_posix/BUILD.gn
...buted_schedule_lite/system_ability_manager_posix/BUILD.gn
+2
-3
distributed_schedule_lite/system_ability_manager_posix/src/LiteIPCClientTest.cpp
...te/system_ability_manager_posix/src/LiteIPCClientTest.cpp
+5
-6
distributed_schedule_lite/system_ability_manager_posix/src/LiteIPCFeatureTest.cpp
...e/system_ability_manager_posix/src/LiteIPCFeatureTest.cpp
+1
-1
distributed_schedule_lite/system_ability_manager_posix/src/LiteIPCServiceTest.cpp
...e/system_ability_manager_posix/src/LiteIPCServiceTest.cpp
+2
-2
未找到文件。
aafwk_lite/ability_posix/BUILD.gn
浏览文件 @
a9f242fe
...
@@ -26,7 +26,7 @@ hcpptest_suite("ActsAbilityMgrTest") {
...
@@ -26,7 +26,7 @@ hcpptest_suite("ActsAbilityMgrTest") {
"${aafwk_lite_path}/frameworks/ability_lite:aafwk_abilitykit_lite",
"${aafwk_lite_path}/frameworks/ability_lite:aafwk_abilitykit_lite",
"${appexecfwk_lite_path}/frameworks/bundle_lite:bundle",
"${appexecfwk_lite_path}/frameworks/bundle_lite:bundle",
"//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
"//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
"//foundation/communication/ipc
_lite:liteipc_adapter
",
"//foundation/communication/ipc
/interfaces/innerkits/c/ipc:ipc_single
",
"//foundation/distributedschedule/samgr_lite/samgr:samgr",
"//foundation/distributedschedule/samgr_lite/samgr:samgr",
"//utils/native/lite/kv_store:kv_store",
"//utils/native/lite/kv_store:kv_store",
]
]
...
...
aafwk_lite/ability_posix/src/AbilityMgrTest.cpp
浏览文件 @
a9f242fe
...
@@ -85,22 +85,24 @@ static void OnAbilityConnectDone(ElementName *elementName, SvcIdentity *serviceS
...
@@ -85,22 +85,24 @@ static void OnAbilityConnectDone(ElementName *elementName, SvcIdentity *serviceS
printf
(
"ipc callback success
\n
"
);
printf
(
"ipc callback success
\n
"
);
// push data
// push data
IpcIo
request
;
IpcIo
request
;
char
data
[
IPC_IO_DATA_MAX
];
char
data
[
MAX_IO_SIZE
];
IpcIoInit
(
&
request
,
data
,
IPC_IO_DATA_MAX
,
0
);
IpcIoInit
(
&
request
,
data
,
MAX_IO_SIZE
,
0
);
int32_t
data1
=
10
;
int32_t
data1
=
10
;
int32_t
data2
=
6
;
int32_t
data2
=
6
;
IpcIoPush
Int32
(
&
request
,
data1
);
Write
Int32
(
&
request
,
data1
);
IpcIoPush
Int32
(
&
request
,
data2
);
Write
Int32
(
&
request
,
data2
);
// send and getReply
// send and getReply
IpcIo
reply
=
{
nullptr
};
IpcIo
reply
=
{
nullptr
};
uintptr_t
ptr
=
0
;
uintptr_t
ptr
=
0
;
Transact
(
NULL
,
*
serviceSid
,
0
,
&
request
,
&
reply
,
LITEIPC_FLAG_DEFAULT
,
&
ptr
);
MessageOption
option
;
g_errorCode
=
IpcIoPopInt32
(
&
reply
);
MessageOptionInit
(
&
option
);
SendRequest
(
*
serviceSid
,
0
,
&
request
,
&
reply
,
option
,
&
ptr
);
ReadInt32
(
&
reply
,
&
g_errorCode
);
if
(
g_errorCode
!=
0
)
{
if
(
g_errorCode
!=
0
)
{
printf
(
"execute add method, result is %d
\n
"
,
g_errorCode
);
printf
(
"execute add method, result is %d
\n
"
,
g_errorCode
);
}
}
if
(
ptr
!=
0
)
{
if
(
ptr
!=
0
)
{
FreeBuffer
(
nullptr
,
reinterpret_cast
<
void
*>
(
ptr
));
FreeBuffer
(
reinterpret_cast
<
void
*>
(
ptr
));
}
}
sem_post
(
&
g_sem
);
sem_post
(
&
g_sem
);
}
}
...
@@ -709,10 +711,10 @@ HWTEST_F(AbilityMgrTest, testDisConnectAbilityIllegal, Function | MediumTest | L
...
@@ -709,10 +711,10 @@ HWTEST_F(AbilityMgrTest, testDisConnectAbilityIllegal, Function | MediumTest | L
ts
.
tv_sec
+=
WAIT_TIMEOUT
;
ts
.
tv_sec
+=
WAIT_TIMEOUT
;
sem_timedwait
(
&
g_sem
,
&
ts
);
sem_timedwait
(
&
g_sem
,
&
ts
);
printf
(
"sem exit
\n
"
);
printf
(
"sem exit
\n
"
);
printf
(
"ret
is of connect is %d
\n
"
,
g_errorCode
);
printf
(
"ret
of connect is %d
\n
"
,
result
);
EXPECT_EQ
(
result
,
0
);
EXPECT_EQ
(
result
,
0
);
g_errorCode
=
DisconnectAbility
(
nullptr
);
g_errorCode
=
DisconnectAbility
(
nullptr
);
int
expect
=
-
10
;
int
expect
=
-
2
;
EXPECT_EQ
(
g_errorCode
,
expect
);
EXPECT_EQ
(
g_errorCode
,
expect
);
printf
(
"ret of disconnect is %d
\n
"
,
g_errorCode
);
printf
(
"ret of disconnect is %d
\n
"
,
g_errorCode
);
ClearElement
(
&
element
);
ClearElement
(
&
element
);
...
...
aafwk_lite/ability_posix/src/AbilityMgrTest2.cpp
浏览文件 @
a9f242fe
...
@@ -89,13 +89,13 @@ static void OnAbilityConnectDone(ElementName *elementName, SvcIdentity *serviceS
...
@@ -89,13 +89,13 @@ static void OnAbilityConnectDone(ElementName *elementName, SvcIdentity *serviceS
IpcIoInit
(
&
request
,
data
,
IPC_IO_DATA_MAX
,
0
);
IpcIoInit
(
&
request
,
data
,
IPC_IO_DATA_MAX
,
0
);
int32_t
data1
=
10
;
int32_t
data1
=
10
;
int32_t
data2
=
6
;
int32_t
data2
=
6
;
IpcIoPush
Int32
(
&
request
,
data1
);
Wreit
Int32
(
&
request
,
data1
);
IpcIoPush
Int32
(
&
request
,
data2
);
Write
Int32
(
&
request
,
data2
);
// send and getReply
// send and getReply
IpcIo
reply
=
{
nullptr
};
IpcIo
reply
=
{
nullptr
};
uintptr_t
ptr
=
0
;
uintptr_t
ptr
=
0
;
Transact
(
NULL
,
*
serviceSid
,
0
,
&
request
,
&
reply
,
LITEIPC_FLAG_DEFAULT
,
&
ptr
);
SendRequest
(
*
serviceSid
,
0
,
&
request
,
&
reply
,
LITEIPC_FLAG_DEFAULT
,
&
ptr
);
g_errorCode
=
IpcIoPopInt32
(
&
reply
);
ReadInt32
(
&
reply
,
&
g_errorCode
);
if
(
g_errorCode
!=
0
)
{
if
(
g_errorCode
!=
0
)
{
printf
(
"execute add method, result is %d
\n
"
,
g_errorCode
);
printf
(
"execute add method, result is %d
\n
"
,
g_errorCode
);
}
}
...
...
appexecfwk_lite/appexecfwk_posix/BUILD.gn
浏览文件 @
a9f242fe
...
@@ -36,7 +36,7 @@ hcpptest_suite("ActsBundleMgrTest") {
...
@@ -36,7 +36,7 @@ hcpptest_suite("ActsBundleMgrTest") {
deps = [
deps = [
"${appexecfwk_lite_path}/frameworks/bundle_lite:bundle",
"${appexecfwk_lite_path}/frameworks/bundle_lite:bundle",
"//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
"//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
"//foundation/communication/ipc
_lite:liteipc_adapter
",
"//foundation/communication/ipc
/interfaces/innerkits/c/ipc:ipc_single
",
"//foundation/distributedschedule/samgr_lite/samgr:samgr",
"//foundation/distributedschedule/samgr_lite/samgr:samgr",
]
]
...
...
distributed_schedule_lite/distributed_schedule_posix/BUILD.gn
浏览文件 @
a9f242fe
...
@@ -27,7 +27,7 @@ hcpptest_suite("ActsDMSTest") {
...
@@ -27,7 +27,7 @@ hcpptest_suite("ActsDMSTest") {
"src/utils",
"src/utils",
"//utils/native/lite/include",
"//utils/native/lite/include",
"//third_party/bounds_checking_function/include",
"//third_party/bounds_checking_function/include",
"//foundation/communication/ipc
_lite/interfaces/kits
",
"//foundation/communication/ipc
/interfaces/innerkits/c/ipc/include
",
"//foundation/distributedschedule/samgr_lite/interfaces/kits/registry",
"//foundation/distributedschedule/samgr_lite/interfaces/kits/registry",
"//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr",
"//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr",
"//foundation/distributedschedule/dmsfwk_lite/include",
"//foundation/distributedschedule/dmsfwk_lite/include",
...
...
distributed_schedule_lite/system_ability_manager_posix/BUILD.gn
浏览文件 @
a9f242fe
...
@@ -47,8 +47,7 @@ hcpptest_suite("ActsSamgrTest") {
...
@@ -47,8 +47,7 @@ hcpptest_suite("ActsSamgrTest") {
"src/FeatureApiTest.cpp",
"src/FeatureApiTest.cpp",
"src/FeatureTest.cpp",
"src/FeatureTest.cpp",
"src/IUnknownTest.cpp",
"src/IUnknownTest.cpp",
"src/LiteIPCClientTest.cpp",
# "src/LiteIPCClientTest.cpp",
"src/LiteIPCFeatureTest.cpp",
"src/LiteIPCFeatureTest.cpp",
"src/LiteIPCServiceTest.cpp",
"src/LiteIPCServiceTest.cpp",
"src/SendRequestTest.cpp",
"src/SendRequestTest.cpp",
...
@@ -76,7 +75,7 @@ hcpptest_suite("ActsSamgrTest") {
...
@@ -76,7 +75,7 @@ hcpptest_suite("ActsSamgrTest") {
]
]
deps = [
deps = [
"//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
"//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
"//foundation/communication/ipc
_lite:liteipc_adapter
",
"//foundation/communication/ipc
/interfaces/innerkits/c/ipc:ipc_single
",
"//foundation/distributedschedule/samgr_lite/communication/broadcast:broadcast",
"//foundation/distributedschedule/samgr_lite/communication/broadcast:broadcast",
"//foundation/distributedschedule/samgr_lite/samgr:samgr",
"//foundation/distributedschedule/samgr_lite/samgr:samgr",
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/bounds_checking_function:libsec_shared",
...
...
distributed_schedule_lite/system_ability_manager_posix/src/LiteIPCClientTest.cpp
浏览文件 @
a9f242fe
...
@@ -22,7 +22,6 @@
...
@@ -22,7 +22,6 @@
using
namespace
testing
::
ext
;
using
namespace
testing
::
ext
;
static
const
int
MAX_IO_SIZE
=
8192
;
static
const
int
NORMAL_IO_SIZE
=
250
;
static
const
int
NORMAL_IO_SIZE
=
250
;
static
IClientProxy
*
GetRemoteIUnknown
(
const
char
*
serviceName
,
const
char
*
featureName
)
static
IClientProxy
*
GetRemoteIUnknown
(
const
char
*
serviceName
,
const
char
*
featureName
)
...
@@ -48,7 +47,7 @@ static int CurrentCallback(IOwner owner, int code, IpcIo *reply)
...
@@ -48,7 +47,7 @@ static int CurrentCallback(IOwner owner, int code, IpcIo *reply)
{
{
printf
(
"[hcpptest]CurrentCallback run
\n
"
);
printf
(
"[hcpptest]CurrentCallback run
\n
"
);
size_t
len
=
0
;
size_t
len
=
0
;
char
*
response
=
(
char
*
)
IpcIoPop
String
(
reply
,
&
len
);
char
*
response
=
(
char
*
)
Read
String
(
reply
,
&
len
);
printf
(
"[hcpptest]response %s
\n
"
,
response
);
printf
(
"[hcpptest]response %s
\n
"
,
response
);
return
0
;
return
0
;
}
}
...
@@ -130,7 +129,7 @@ HWTEST_F(LiteIPCClientTest, testIPCClient0040, Function | MediumTest | Level1)
...
@@ -130,7 +129,7 @@ HWTEST_F(LiteIPCClientTest, testIPCClient0040, Function | MediumTest | Level1)
char
data
[
NORMAL_IO_SIZE
];
char
data
[
NORMAL_IO_SIZE
];
IpcIoInit
(
&
request
,
data
,
sizeof
(
data
),
0
);
IpcIoInit
(
&
request
,
data
,
sizeof
(
data
),
0
);
char
*
buff
=
(
char
*
)
"test xxxx"
;
char
*
buff
=
(
char
*
)
"test xxxx"
;
IpcIoPush
String
(
&
request
,
buff
);
Write
String
(
&
request
,
buff
);
char
data2
[
NORMAL_IO_SIZE
];
char
data2
[
NORMAL_IO_SIZE
];
int
funcId
=
0
;
int
funcId
=
0
;
...
@@ -173,7 +172,7 @@ HWTEST_F(LiteIPCClientTest, testIPCClient0060, Function | MediumTest | Level2)
...
@@ -173,7 +172,7 @@ HWTEST_F(LiteIPCClientTest, testIPCClient0060, Function | MediumTest | Level2)
char
data
[
NORMAL_IO_SIZE
];
char
data
[
NORMAL_IO_SIZE
];
IpcIoInit
(
&
request
,
data
,
sizeof
(
data
),
0
);
IpcIoInit
(
&
request
,
data
,
sizeof
(
data
),
0
);
char
*
buff
=
(
char
*
)
"test xxxx"
;
char
*
buff
=
(
char
*
)
"test xxxx"
;
IpcIoPush
String
(
&
request
,
buff
);
Write
String
(
&
request
,
buff
);
int
funcId
=
0
;
int
funcId
=
0
;
int
result
=
remoteApi
->
Invoke
(
remoteApi
,
funcId
,
&
request
,
nullptr
,
nullptr
);
int
result
=
remoteApi
->
Invoke
(
remoteApi
,
funcId
,
&
request
,
nullptr
,
nullptr
);
...
@@ -197,13 +196,13 @@ HWTEST_F(LiteIPCClientTest, testIPCClient0070, Function | MediumTest | Level2)
...
@@ -197,13 +196,13 @@ HWTEST_F(LiteIPCClientTest, testIPCClient0070, Function | MediumTest | Level2)
char
data
[
MAX_IO_SIZE
+
1
];
char
data
[
MAX_IO_SIZE
+
1
];
IpcIoInit
(
&
request
,
data
,
sizeof
(
data
),
0
);
IpcIoInit
(
&
request
,
data
,
sizeof
(
data
),
0
);
char
*
buff
=
(
char
*
)
"test xxxx"
;
char
*
buff
=
(
char
*
)
"test xxxx"
;
IpcIoPush
String
(
&
request
,
buff
);
Write
String
(
&
request
,
buff
);
char
data2
[
NORMAL_IO_SIZE
];
char
data2
[
NORMAL_IO_SIZE
];
int
funcId
=
0
;
int
funcId
=
0
;
int
result
=
remoteApi
->
Invoke
(
remoteApi
,
funcId
,
&
request
,
data2
,
CurrentCallback
);
int
result
=
remoteApi
->
Invoke
(
remoteApi
,
funcId
,
&
request
,
data2
,
CurrentCallback
);
printf
(
"[hcpptest]result is: %d
\n
"
,
result
);
printf
(
"[hcpptest]result is: %d
\n
"
,
result
);
ASSERT_EQ
(
result
,
EC_
FAILURE
);
ASSERT_EQ
(
result
,
EC_
INVALID
);
ReleaseIUnknown
((
IUnknown
*
)
remoteApi
);
ReleaseIUnknown
((
IUnknown
*
)
remoteApi
);
};
};
...
...
distributed_schedule_lite/system_ability_manager_posix/src/LiteIPCFeatureTest.cpp
浏览文件 @
a9f242fe
...
@@ -130,7 +130,7 @@ static int32 Invoke(IServerProxy *iProxy, int funcId, void *origin, IpcIo *req,
...
@@ -130,7 +130,7 @@ static int32 Invoke(IServerProxy *iProxy, int funcId, void *origin, IpcIo *req,
{
{
printf
(
"[hcpptest][TID:0x%lx]Feature Remote Invoke is called! <%p, %d, %p, %p, %p>"
,
printf
(
"[hcpptest][TID:0x%lx]Feature Remote Invoke is called! <%p, %d, %p, %p, %p>"
,
pthread_self
(),
iProxy
,
funcId
,
origin
,
req
,
reply
);
pthread_self
(),
iProxy
,
funcId
,
origin
,
req
,
reply
);
IpcIoPush
Bool
(
reply
,
TRUE
);
Write
Bool
(
reply
,
TRUE
);
return
EC_SUCCESS
;
return
EC_SUCCESS
;
}
}
...
...
distributed_schedule_lite/system_ability_manager_posix/src/LiteIPCServiceTest.cpp
浏览文件 @
a9f242fe
...
@@ -79,7 +79,7 @@ static int32 Invoke(IServerProxy *iProxy, int funcId, void *origin, IpcIo *req,
...
@@ -79,7 +79,7 @@ static int32 Invoke(IServerProxy *iProxy, int funcId, void *origin, IpcIo *req,
pthread_self
(),
iProxy
,
funcId
,
origin
,
req
,
reply
);
pthread_self
(),
iProxy
,
funcId
,
origin
,
req
,
reply
);
size_t
len
=
0
;
size_t
len
=
0
;
char
*
requestStr
=
(
char
*
)
IpcIoPop
String
(
req
,
&
len
);
char
*
requestStr
=
(
char
*
)
Read
String
(
req
,
&
len
);
if
(
requestStr
!=
nullptr
)
{
if
(
requestStr
!=
nullptr
)
{
printf
(
"[hcpptest]requestStr is %s"
,
requestStr
);
printf
(
"[hcpptest]requestStr is %s"
,
requestStr
);
}
else
{
}
else
{
...
@@ -91,7 +91,7 @@ static int32 Invoke(IServerProxy *iProxy, int funcId, void *origin, IpcIo *req,
...
@@ -91,7 +91,7 @@ static int32 Invoke(IServerProxy *iProxy, int funcId, void *origin, IpcIo *req,
defaultApi
->
SyncCall
((
IUnknown
*
)
iProxy
);
defaultApi
->
SyncCall
((
IUnknown
*
)
iProxy
);
}
}
IpcIoPush
String
(
reply
,
"Yes, you did!"
);
Write
String
(
reply
,
"Yes, you did!"
);
return
EC_SUCCESS
;
return
EC_SUCCESS
;
}
}
static
DemoService
g_service
=
{
static
DemoService
g_service
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录