Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
communication_ipc
提交
9fac7b90
C
communication_ipc
项目概览
OpenHarmony
/
communication_ipc
12 个月 前同步成功
通知
20
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
communication_ipc
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9fac7b90
编写于
1月 07, 2022
作者:
X
XiYuhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
open trace testcase
Signed-off-by:
N
XiYuhao
<
xiyuhao@huawei.com
>
上级
a944546e
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
30 addition
and
20 deletion
+30
-20
ipc/native/test/unittest/common/BUILD.gn
ipc/native/test/unittest/common/BUILD.gn
+30
-0
services/dbinder/test/distributedtest/include/dbinder_test_service.h
...inder/test/distributedtest/include/dbinder_test_service.h
+0
-2
services/dbinder/test/distributedtest/include/dbinder_test_service_skeleton.h
...t/distributedtest/include/dbinder_test_service_skeleton.h
+0
-8
services/dbinder/test/distributedtest/src/dbinder_distributed_test.cpp
...der/test/distributedtest/src/dbinder_distributed_test.cpp
+0
-2
services/dbinder/test/distributedtest/src/dbinder_test_service.cpp
...dbinder/test/distributedtest/src/dbinder_test_service.cpp
+0
-2
services/dbinder/test/distributedtest/src/dbinder_test_service_skeleton.cpp
...est/distributedtest/src/dbinder_test_service_skeleton.cpp
+0
-6
未找到文件。
ipc/native/test/unittest/common/BUILD.gn
浏览文件 @
9fac7b90
...
@@ -69,11 +69,41 @@ ohos_unittest("IPCFileDescOpsTest") {
...
@@ -69,11 +69,41 @@ ohos_unittest("IPCFileDescOpsTest") {
"//foundation/communication/ipc/test/resource/ipc/ohos_test.xml"
"//foundation/communication/ipc/test/resource/ipc/ohos_test.xml"
}
}
ohos_unittest("IPCHiTraceUnitTest") {
module_out_path = MODULE_OUTPUT_PATH
include_dirs = [ "//utils/system/safwk/native/include" ]
sources = [ "ipc_hitrace_unittest.cpp" ]
configs = [
"$SUBSYSTEM_DIR:ipc_util_config",
"$IPC_TEST_ROOT:ipc_test_config",
]
deps = [
"$IPC_TEST_ROOT/auxiliary/native:TestAssistance",
"//third_party/googletest:gtest_main",
"//utils/native/base:utils",
]
external_deps = [
"hitrace_native:libhitrace",
"hiviewdfx_hilog_native:libhilog",
"ipc:ipc_core",
"samgr_standard:samgr_proxy",
]
resource_config_file =
"//foundation/communication/ipc/test/resource/ipc/ohos_test.xml"
}
###############################################################################
###############################################################################
group("unittest") {
group("unittest") {
testonly = true
testonly = true
deps = [
deps = [
":IPCFileDescOpsTest",
":IPCFileDescOpsTest",
":IPCHiTraceUnitTest",
":IPCNativeUnitTest",
":IPCNativeUnitTest",
]
]
}
}
...
...
services/dbinder/test/distributedtest/include/dbinder_test_service.h
浏览文件 @
9fac7b90
...
@@ -37,9 +37,7 @@ public:
...
@@ -37,9 +37,7 @@ public:
int
TransOversizedPkt
(
const
std
::
string
&
dataStr
,
std
::
string
&
repStr
)
override
;
int
TransOversizedPkt
(
const
std
::
string
&
dataStr
,
std
::
string
&
repStr
)
override
;
int
ProxyTransRawData
(
int
length
)
override
;
int
ProxyTransRawData
(
int
length
)
override
;
int
StubTransRawData
(
int
length
)
override
;
int
StubTransRawData
(
int
length
)
override
;
#ifndef CONFIG_STANDARD_SYSTEM
int
GetChildId
(
uint64_t
&
rep
)
override
;
int
GetChildId
(
uint64_t
&
rep
)
override
;
#endif
sptr
<
IRemoteObject
>
GetRemoteObject
(
int
type
)
override
;
sptr
<
IRemoteObject
>
GetRemoteObject
(
int
type
)
override
;
int
FlushAsyncCommands
(
int
count
,
int
length
)
override
;
int
FlushAsyncCommands
(
int
count
,
int
length
)
override
;
int
GetRemoteDecTimes
()
override
;
int
GetRemoteDecTimes
()
override
;
...
...
services/dbinder/test/distributedtest/include/dbinder_test_service_skeleton.h
浏览文件 @
9fac7b90
...
@@ -23,9 +23,7 @@
...
@@ -23,9 +23,7 @@
#include "iremote_proxy.h"
#include "iremote_proxy.h"
#include "hilog/log.h"
#include "hilog/log.h"
#include "log_tags.h"
#include "log_tags.h"
#ifndef CONFIG_STANDARD_SYSTEM
#include "hitrace/trace.h"
#include "hitrace/trace.h"
#endif
namespace
OHOS
{
namespace
OHOS
{
class
IDBinderTestService
:
public
IRemoteBroker
{
class
IDBinderTestService
:
public
IRemoteBroker
{
...
@@ -74,9 +72,7 @@ public:
...
@@ -74,9 +72,7 @@ public:
virtual
int
TransOversizedPkt
(
const
std
::
string
&
dataStr
,
std
::
string
&
repStr
)
=
0
;
virtual
int
TransOversizedPkt
(
const
std
::
string
&
dataStr
,
std
::
string
&
repStr
)
=
0
;
virtual
int
ProxyTransRawData
(
int
lengths
)
=
0
;
virtual
int
ProxyTransRawData
(
int
lengths
)
=
0
;
virtual
int
StubTransRawData
(
int
length
)
=
0
;
virtual
int
StubTransRawData
(
int
length
)
=
0
;
#ifndef CONFIG_STANDARD_SYSTEM
virtual
int
GetChildId
(
uint64_t
&
rep
)
=
0
;
virtual
int
GetChildId
(
uint64_t
&
rep
)
=
0
;
#endif
virtual
int
FlushAsyncCommands
(
int
count
,
int
length
)
=
0
;
virtual
int
FlushAsyncCommands
(
int
count
,
int
length
)
=
0
;
virtual
sptr
<
IRemoteObject
>
GetRemoteObject
(
int
type
)
=
0
;
virtual
sptr
<
IRemoteObject
>
GetRemoteObject
(
int
type
)
=
0
;
virtual
int
GetRemoteDecTimes
()
=
0
;
virtual
int
GetRemoteDecTimes
()
=
0
;
...
@@ -108,9 +104,7 @@ private:
...
@@ -108,9 +104,7 @@ private:
int
OnReceivedStubObject
(
MessageParcel
&
data
,
MessageParcel
&
reply
);
int
OnReceivedStubObject
(
MessageParcel
&
data
,
MessageParcel
&
reply
);
int
OnReceivedOversizedPkt
(
MessageParcel
&
data
,
MessageParcel
&
reply
);
int
OnReceivedOversizedPkt
(
MessageParcel
&
data
,
MessageParcel
&
reply
);
int
OnReceivedRawData
(
MessageParcel
&
data
,
MessageParcel
&
reply
);
int
OnReceivedRawData
(
MessageParcel
&
data
,
MessageParcel
&
reply
);
#ifndef CONFIG_STANDARD_SYSTEM
int
OnGetChildId
(
MessageParcel
&
data
,
MessageParcel
&
reply
);
int
OnGetChildId
(
MessageParcel
&
data
,
MessageParcel
&
reply
);
#endif
int
OnSentRawData
(
MessageParcel
&
data
,
MessageParcel
&
reply
);
int
OnSentRawData
(
MessageParcel
&
data
,
MessageParcel
&
reply
);
int
OnReceivedGetStubObject
(
MessageParcel
&
data
,
MessageParcel
&
reply
);
int
OnReceivedGetStubObject
(
MessageParcel
&
data
,
MessageParcel
&
reply
);
int
OnReceivedGetDecTimes
(
MessageParcel
&
data
,
MessageParcel
&
reply
);
int
OnReceivedGetDecTimes
(
MessageParcel
&
data
,
MessageParcel
&
reply
);
...
@@ -137,9 +131,7 @@ public:
...
@@ -137,9 +131,7 @@ public:
int
TransOversizedPkt
(
const
std
::
string
&
dataStr
,
std
::
string
&
repStr
)
override
;
int
TransOversizedPkt
(
const
std
::
string
&
dataStr
,
std
::
string
&
repStr
)
override
;
int
ProxyTransRawData
(
int
length
)
override
;
int
ProxyTransRawData
(
int
length
)
override
;
int
StubTransRawData
(
int
length
)
override
;
int
StubTransRawData
(
int
length
)
override
;
#ifndef CONFIG_STANDARD_SYSTEM
int
GetChildId
(
uint64_t
&
rep
)
override
;
int
GetChildId
(
uint64_t
&
rep
)
override
;
#endif
sptr
<
IRemoteObject
>
GetRemoteObject
(
int
type
)
override
;
sptr
<
IRemoteObject
>
GetRemoteObject
(
int
type
)
override
;
int
GetRemoteDecTimes
()
override
;
int
GetRemoteDecTimes
()
override
;
void
ClearRemoteDecTimes
()
override
;
void
ClearRemoteDecTimes
()
override
;
...
...
services/dbinder/test/distributedtest/src/dbinder_distributed_test.cpp
浏览文件 @
9fac7b90
...
@@ -1083,7 +1083,6 @@ HWTEST_F(DbinderTest, DbinderRemoteCall023, TestSize.Level3)
...
@@ -1083,7 +1083,6 @@ HWTEST_F(DbinderTest, DbinderRemoteCall023, TestSize.Level3)
SetCurrentTestCase
(
DBINDER_TEST_INIT
);
SetCurrentTestCase
(
DBINDER_TEST_INIT
);
}
}
#ifndef CONFIG_STANDARD_SYSTEM
/*
/*
* @tc.name: DbinderRemoteCall024
* @tc.name: DbinderRemoteCall024
* @tc.desc: trace test
* @tc.desc: trace test
...
@@ -1117,7 +1116,6 @@ HWTEST_F(DbinderTest, DbinderRemoteCall024, TestSize.Level3)
...
@@ -1117,7 +1116,6 @@ HWTEST_F(DbinderTest, DbinderRemoteCall024, TestSize.Level3)
SetCurrentTestCase
(
DBINDER_TEST_INIT
);
SetCurrentTestCase
(
DBINDER_TEST_INIT
);
}
}
#endif
/*
/*
* @tc.name: DbinderRemoteCall025
* @tc.name: DbinderRemoteCall025
...
...
services/dbinder/test/distributedtest/src/dbinder_test_service.cpp
浏览文件 @
9fac7b90
...
@@ -156,13 +156,11 @@ int DBinderTestService::StubTransRawData(int length)
...
@@ -156,13 +156,11 @@ int DBinderTestService::StubTransRawData(int length)
return
0
;
return
0
;
}
}
#ifndef CONFIG_STANDARD_SYSTEM
int
DBinderTestService
::
GetChildId
(
uint64_t
&
rep
)
int
DBinderTestService
::
GetChildId
(
uint64_t
&
rep
)
{
{
DBINDER_LOGI
(
"enter %{public}s"
,
__func__
);
DBINDER_LOGI
(
"enter %{public}s"
,
__func__
);
return
0
;
return
0
;
}
}
#endif
int
DBinderTestService
::
FlushAsyncCommands
(
int
count
,
int
length
)
int
DBinderTestService
::
FlushAsyncCommands
(
int
count
,
int
length
)
{
{
...
...
services/dbinder/test/distributedtest/src/dbinder_test_service_skeleton.cpp
浏览文件 @
9fac7b90
...
@@ -60,7 +60,6 @@ int DBinderTestServiceProxy::ReverseInt(int data, int &rep)
...
@@ -60,7 +60,6 @@ int DBinderTestServiceProxy::ReverseInt(int data, int &rep)
return
error
;
return
error
;
}
}
#ifndef CONFIG_STANDARD_SYSTEM
int
DBinderTestServiceProxy
::
GetChildId
(
uint64_t
&
rep
)
int
DBinderTestServiceProxy
::
GetChildId
(
uint64_t
&
rep
)
{
{
int
error
;
int
error
;
...
@@ -72,7 +71,6 @@ int DBinderTestServiceProxy::GetChildId(uint64_t &rep)
...
@@ -72,7 +71,6 @@ int DBinderTestServiceProxy::GetChildId(uint64_t &rep)
DBINDER_LOGE
(
"rep = %{public}"
PRIu64
", error = %{public}d"
,
rep
,
error
);
DBINDER_LOGE
(
"rep = %{public}"
PRIu64
", error = %{public}d"
,
rep
,
error
);
return
error
;
return
error
;
}
}
#endif
int
DBinderTestServiceProxy
::
TransProxyObject
(
int
data
,
sptr
<
IRemoteObject
>
&
transObject
,
int
operation
,
int
&
rep
,
int
DBinderTestServiceProxy
::
TransProxyObject
(
int
data
,
sptr
<
IRemoteObject
>
&
transObject
,
int
operation
,
int
&
rep
,
int
&
withdrawRes
)
int
&
withdrawRes
)
...
@@ -461,11 +459,9 @@ int DBinderTestServiceStub::OnRemoteRequest(uint32_t code, MessageParcel &data,
...
@@ -461,11 +459,9 @@ int DBinderTestServiceStub::OnRemoteRequest(uint32_t code, MessageParcel &data,
case
RECEIVE_RAW_DATA
:
{
case
RECEIVE_RAW_DATA
:
{
return
OnSentRawData
(
data
,
reply
);
return
OnSentRawData
(
data
,
reply
);
}
}
#ifndef CONFIG_STANDARD_SYSTEM
case
TRANS_TRACE_ID
:
{
case
TRANS_TRACE_ID
:
{
return
OnGetChildId
(
data
,
reply
);
return
OnGetChildId
(
data
,
reply
);
}
}
#endif
case
GET_REMOTE_STUB_OBJECT
:
{
case
GET_REMOTE_STUB_OBJECT
:
{
return
OnReceivedGetStubObject
(
data
,
reply
);
return
OnReceivedGetStubObject
(
data
,
reply
);
}
}
...
@@ -501,7 +497,6 @@ int DBinderTestServiceStub::OnReverseInt(MessageParcel &data, MessageParcel &rep
...
@@ -501,7 +497,6 @@ int DBinderTestServiceStub::OnReverseInt(MessageParcel &data, MessageParcel &rep
return
ret
;
return
ret
;
}
}
#ifndef CONFIG_STANDARD_SYSTEM
int
DBinderTestServiceStub
::
OnGetChildId
(
MessageParcel
&
data
,
MessageParcel
&
reply
)
int
DBinderTestServiceStub
::
OnGetChildId
(
MessageParcel
&
data
,
MessageParcel
&
reply
)
{
{
uint64_t
reqData
=
HiTrace
::
GetId
().
GetChainId
();
uint64_t
reqData
=
HiTrace
::
GetId
().
GetChainId
();
...
@@ -527,7 +522,6 @@ int DBinderTestServiceStub::OnGetChildId(MessageParcel &data, MessageParcel &rep
...
@@ -527,7 +522,6 @@ int DBinderTestServiceStub::OnGetChildId(MessageParcel &data, MessageParcel &rep
IPCSkeleton
::
GetLocalDeviceID
().
c_str
(),
IPCSkeleton
::
IsLocalCalling
());
IPCSkeleton
::
GetLocalDeviceID
().
c_str
(),
IPCSkeleton
::
IsLocalCalling
());
return
ERR_NONE
;
return
ERR_NONE
;
}
}
#endif
int
DBinderTestServiceStub
::
OnReverseIntDelay
(
MessageParcel
&
data
,
MessageParcel
&
reply
)
int
DBinderTestServiceStub
::
OnReverseIntDelay
(
MessageParcel
&
data
,
MessageParcel
&
reply
)
{
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录