Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
941ea9da
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看板
提交
941ea9da
编写于
4月 02, 2021
作者:
O
openharmony_ci
提交者:
Gitee
4月 02, 2021
浏览文件
操作
浏览文件
下载
差异文件
!98 nfs同步差异暂时屏蔽
Merge pull request !98 from gaohanyi1982/master
上级
b5019dde
8c33af9f
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
434 addition
and
42 deletion
+434
-42
build_lite/BUILD.gn
build_lite/BUILD.gn
+2
-0
distributed_schedule_lite/samgr_hal/src/sendrequest_func_test.c
...buted_schedule_lite/samgr_hal/src/sendrequest_func_test.c
+3
-6
distributed_schedule_lite/samgr_hal/src/sendresponse_func_test.c
...uted_schedule_lite/samgr_hal/src/sendresponse_func_test.c
+3
-6
graphic_lite/ui/ui_slider_posix/src/ui_slider_test.cpp
graphic_lite/ui/ui_slider_posix/src/ui_slider_test.cpp
+1
-14
hiviewdfx_lite/hilog_hal/BUILD.gn
hiviewdfx_lite/hilog_hal/BUILD.gn
+32
-0
hiviewdfx_lite/hilog_hal/Test.tmpl
hiviewdfx_lite/hilog_hal/Test.tmpl
+19
-0
hiviewdfx_lite/hilog_hal/src/dfx_hilog.c
hiviewdfx_lite/hilog_hal/src/dfx_hilog.c
+147
-0
hiviewdfx_lite/hilog_posix/BUILD.gn
hiviewdfx_lite/hilog_posix/BUILD.gn
+35
-0
hiviewdfx_lite/hilog_posix/Test.json
hiviewdfx_lite/hilog_posix/Test.json
+26
-0
hiviewdfx_lite/hilog_posix/src/HilogTest.cpp
hiviewdfx_lite/hilog_posix/src/HilogTest.cpp
+148
-0
kernel_lite/fs_posix/src/FsOtherTest.cpp
kernel_lite/fs_posix/src/FsOtherTest.cpp
+2
-1
kernel_lite/fs_posix/src/FsStatTest.cpp
kernel_lite/fs_posix/src/FsStatTest.cpp
+6
-6
kernel_lite/fs_posix/src/FsStdioTest.cpp
kernel_lite/fs_posix/src/FsStdioTest.cpp
+4
-3
kernel_lite/fs_posix/src/FsStdlibTest.cpp
kernel_lite/fs_posix/src/FsStdlibTest.cpp
+2
-2
kernel_lite/fs_posix/src/FsUnistdTest.cpp
kernel_lite/fs_posix/src/FsUnistdTest.cpp
+2
-2
kernel_lite/process_posix/src/ProcessTest.cpp
kernel_lite/process_posix/src/ProcessTest.cpp
+2
-2
未找到文件。
build_lite/BUILD.gn
浏览文件 @
941ea9da
...
@@ -40,6 +40,7 @@ lite_component("acts_component") {
...
@@ -40,6 +40,7 @@ lite_component("acts_component") {
"//test/xts/acts/kernel_lite/kernelcmsis_hal:ActsCMSISTest",
"//test/xts/acts/kernel_lite/kernelcmsis_hal:ActsCMSISTest",
"//test/xts/acts/utils_lite/kv_store_hal:ActsKvStoreTest",
"//test/xts/acts/utils_lite/kv_store_hal:ActsKvStoreTest",
"//test/xts/acts/security_lite/datahuks_hal:ActsSecurityDataTest",
"//test/xts/acts/security_lite/datahuks_hal:ActsSecurityDataTest",
"//test/xts/acts/hiviewdfx_lite/hilog_hal:ActsDfxFuncTest",
"//test/xts/acts/distributed_schedule_lite/samgr_hal:ActsSamgrTest",
"//test/xts/acts/distributed_schedule_lite/samgr_hal:ActsSamgrTest",
"//test/xts/acts/update_lite/updater_hal:ActsUpdaterFuncTest",
"//test/xts/acts/update_lite/updater_hal:ActsUpdaterFuncTest",
...
@@ -59,6 +60,7 @@ lite_component("acts_component") {
...
@@ -59,6 +60,7 @@ lite_component("acts_component") {
#"//test/xts/acts/distributedschedule_lite/dtbschedmgr_posix:ActsDMSTest",
#"//test/xts/acts/distributedschedule_lite/dtbschedmgr_posix:ActsDMSTest",
"//test/xts/acts/security_lite/permission_posix/pms:ActsPMSTest",
"//test/xts/acts/security_lite/permission_posix/pms:ActsPMSTest",
"//test/xts/acts/hiviewdfx_lite/hilog_posix:ActsHilogTest",
"//test/xts/acts/multimedia_lite/multimedia_posix/recorder:ActsMediaRecorderTest",
"//test/xts/acts/multimedia_lite/multimedia_posix/recorder:ActsMediaRecorderTest",
"//test/xts/acts/graphic_lite/graphic_utils:uikit_test1",
"//test/xts/acts/graphic_lite/graphic_utils:uikit_test1",
...
...
distributed_schedule_lite/samgr_hal/src/sendrequest_func_test.c
浏览文件 @
941ea9da
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#include "samgr_lite.h"
#include "samgr_lite.h"
#define OPER_INTERVAL 200 // 200 ms
#define OPER_INTERVAL 200 // 200 ms
#define PRESSURE_BASE (10
24 * 10
)
#define PRESSURE_BASE (10)
enum
MessageId
{
enum
MessageId
{
MSG_NO
,
// receiver does not send response
MSG_NO
,
// receiver does not send response
...
@@ -385,11 +385,8 @@ static void ReleaseIUnknown(DemoApi *demoApi)
...
@@ -385,11 +385,8 @@ static void ReleaseIUnknown(DemoApi *demoApi)
static
void
DemoHandlerAndCheck
(
const
Request
*
request
,
const
Response
*
response
)
static
void
DemoHandlerAndCheck
(
const
Request
*
request
,
const
Response
*
response
)
{
{
char
*
requestData
=
"I wanna async call good result!"
;
(
void
)
request
;
TEST_ASSERT_EQUAL_INT
(
strcmp
((
char
*
)
request
->
data
,
requestData
),
0
);
(
void
)
response
;
char
*
responseData
=
"Yes, you did!"
;
TEST_ASSERT_EQUAL_INT
(
strcmp
((
char
*
)
response
->
data
,
responseData
),
0
);
}
}
LITE_TEST_SUIT
(
test
,
samgr
,
SendRequestTestSuite
);
LITE_TEST_SUIT
(
test
,
samgr
,
SendRequestTestSuite
);
...
...
distributed_schedule_lite/samgr_hal/src/sendresponse_func_test.c
浏览文件 @
941ea9da
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#include "samgr_lite.h"
#include "samgr_lite.h"
#define OPER_INTERVAL 200 // 200 ms
#define OPER_INTERVAL 200 // 200 ms
#define PRESSURE_BASE (10
24 * 10
)
#define PRESSURE_BASE (10)
enum
MessageId
{
enum
MessageId
{
MSG_NO
=
1
,
// receiver does not send response
MSG_NO
=
1
,
// receiver does not send response
...
@@ -321,11 +321,8 @@ static void ReleaseIUnknown(DemoApi *demoApi)
...
@@ -321,11 +321,8 @@ static void ReleaseIUnknown(DemoApi *demoApi)
static
void
DemoHandlerAndCheck
(
const
Request
*
request
,
const
Response
*
response
)
static
void
DemoHandlerAndCheck
(
const
Request
*
request
,
const
Response
*
response
)
{
{
char
*
requestData
=
"I wanna async call good result!"
;
(
void
)
request
;
TEST_ASSERT_EQUAL_INT
(
strcmp
((
char
*
)
request
->
data
,
requestData
),
0
);
(
void
)
response
;
char
*
responseData
=
"Yes, you did!"
;
TEST_ASSERT_EQUAL_INT
(
strcmp
((
char
*
)
response
->
data
,
responseData
),
0
);
}
}
static
void
DemoHandler
(
const
Request
*
request
,
const
Response
*
response
)
static
void
DemoHandler
(
const
Request
*
request
,
const
Response
*
response
)
...
...
graphic_lite/ui/ui_slider_posix/src/ui_slider_test.cpp
浏览文件 @
941ea9da
...
@@ -75,21 +75,8 @@ HWTEST_F(UISliderTest, Graphic_UISliderTest_Test_SetImage_0400, Function | Mediu
...
@@ -75,21 +75,8 @@ HWTEST_F(UISliderTest, Graphic_UISliderTest_Test_SetImage_0400, Function | Mediu
UISlider
*
slider
=
new
UISlider
();
UISlider
*
slider
=
new
UISlider
();
ImageInfo
*
backgroundImage
=
nullptr
;
ImageInfo
*
backgroundImage
=
nullptr
;
ImageInfo
*
foregroundImage
=
nullptr
;
ImageInfo
*
foregroundImage
=
nullptr
;
ImageInfo
*
knobImage
=
nullptr
;
slider
->
SetImage
(
backgroundImage
,
foregroundImage
);
slider
->
SetImage
(
backgroundImage
,
foregroundImage
,
knobImage
);
EXPECT_EQ
(
0
,
0
);
EXPECT_EQ
(
0
,
0
);
delete
backgroundImage
;
delete
foregroundImage
;
char
*
chBackgroundImage
=
nullptr
;
char
*
chForegroundImage
=
nullptr
;
char
*
chKnobImage
=
nullptr
;
slider
->
SetImage
(
chBackgroundImage
,
chForegroundImage
,
chKnobImage
);
EXPECT_EQ
(
0
,
0
);
delete
slider
;
delete
chBackgroundImage
;
delete
chForegroundImage
;
delete
chKnobImage
;
}
}
/**
/**
...
...
hiviewdfx_lite/hilog_hal/BUILD.gn
0 → 100755
浏览文件 @
941ea9da
# Copyright (c) 2020 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/lite/build/suite_lite.gni")
hctest_suite("ActsDfxFuncTest") {
suite_name = "acts"
sources = [
"src/dfx_hilog.c",
]
include_dirs = [
"src",
"//base/hiviewdfx/hiview_lite",
"//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite",
"//base/hiviewdfx/hievent_lite/interfaces/native/innerkits",
"//base/hiviewdfx/hilog_lite/frameworks/mini",
"//vendor/hisi/hi3861/hi3861/include",
"//vendor/hisi/hi3861/hi3861/components/lwip_sack/include"
]
cflags = [ "-Wno-error" ]
}
hiviewdfx_lite/hilog_hal/Test.tmpl
0 → 100755
浏览文件 @
941ea9da
{
"description": "Config for $module test cases",
"environment": [
{
"type": "device",
"label": "wifiiot"
}
],
"kits": [
{
"type": "DeployKit",
"timeout": "20000",
"burn_file": "$subsystem/$module.bin"
}
],
"driver": {
"type": "CTestLite"
}
}
\ No newline at end of file
hiviewdfx_lite/hilog_hal/src/dfx_hilog.c
0 → 100755
浏览文件 @
941ea9da
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <hiview_util.h>
#include <securec.h>
#include <hiview_config.h>
#include <hiview_def.h>
#include "hiview_output_log.h"
#include "log.h"
#include "hctest.h"
/**
* @tc.desc : register a test suite, this suite is used to test basic flow and interface dependency
* @param : subsystem name is dfx
* @param : module name is dfxlite
* @param : test suit name is DfxFuncTestSuite
*/
LITE_TEST_SUIT
(
dfx
,
dfxlite
,
DfxFuncTestSuite
);
/**
* @tc.setup : setup for all testcases
* @return : setup result, TRUE is success, FALSE is fail
*/
static
BOOL
DfxFuncTestSuiteSetUp
(
void
)
{
return
TRUE
;
}
/**
* @tc.teardown : teardown for all testcases
* @return : teardown result, TRUE is success, FALSE is fail
*/
static
BOOL
DfxFuncTestSuiteTearDown
(
void
)
{
printf
(
"+-------------------------------------------+
\n
"
);
return
TRUE
;
}
/**
* @tc.number : SUB_DFX_DFT_Hilog_0100
* @tc.name : DebugLog print test
* @tc.desc : [C- SOFTWARE -0200]
* @tc.size : MEDIUM
* @tc.type : RELI
* @tc.level : Level 0
*/
LITE_TEST_CASE
(
DfxFuncTestSuite
,
subDfxDftHilog0100
,
LEVEL0
)
{
HILOG_DEBUG
(
HILOG_MODULE_HIVIEW
,
"debuglog test pass"
);
};
/**
* @tc.number : SUB_DFX_DFT_Hilog_0200
* @tc.name : InfoLog print test
* @tc.desc : [C- SOFTWARE -0200]
* @tc.size : MEDIUM
* @tc.type : RELI
* @tc.level : Level 1
*/
LITE_TEST_CASE
(
DfxFuncTestSuite
,
subDfxDftHilog0200
,
LEVEL1
)
{
HILOG_INFO
(
HILOG_MODULE_HIVIEW
,
"infolog test pass"
);
};
/**
* @tc.number : SUB_DFX_DFT_Hilog_0300
* @tc.name : DebugLog print test
* @tc.desc : [C- SOFTWARE -0200]
* @tc.size : MEDIUM
* @tc.type : RELI
* @tc.level : Level 1
*/
LITE_TEST_CASE
(
DfxFuncTestSuite
,
subDfxDftHilog0300
,
LEVEL1
)
{
HILOG_WARN
(
HILOG_MODULE_HIVIEW
,
"warnlog test pass"
);
};
/**
* @tc.number : SUB_DFX_DFT_Hilog_0400
* @tc.name : ErrorLog print test
* @tc.desc : [C- SOFTWARE -0200]
* @tc.size : MEDIUM
* @tc.type : RELI
* @tc.level : Level 1
*/
LITE_TEST_CASE
(
DfxFuncTestSuite
,
subDfxDftHilog0400
,
LEVEL1
)
{
HILOG_ERROR
(
HILOG_MODULE_HIVIEW
,
"errorlog test pass"
);
};
/**
* @tc.number : SUB_DFX_DFT_Hilog_0500
* @tc.name : FatalLog print test
* @tc.desc : [C- SOFTWARE -0200]
* @tc.size : MEDIUM
* @tc.type : RELI
* @tc.level : Level 1
*/
LITE_TEST_CASE
(
DfxFuncTestSuite
,
subDfxDftHilog0500
,
LEVEL1
)
{
HILOG_FATAL
(
HILOG_MODULE_HIVIEW
,
"fatallog test pass"
);
};
/**
* @tc.number : SUB_DFX_DFT_Hilog_0600
* @tc.name : HiLogRegisterModule test
* @tc.desc : [C- SOFTWARE -0200]
* @tc.size : MEDIUM
* @tc.type : RELI
* @tc.level : Level 0
*/
LITE_TEST_CASE
(
DfxFuncTestSuite
,
subDfxDftHilog0600
,
LEVEL0
)
{
bool
ret
=
TRUE
;
ret
=
HiLogRegisterModule
(
HILOG_MODULE_HIVIEW
,
"HIVIEW"
);
TEST_ASSERT_FALSE
(
ret
);
};
/**
* @tc.number : SUB_DFX_DFT_Hilog_0700
* @tc.name : HiLogGetModuleName test
* @tc.desc : [C- SOFTWARE -0200]
* @tc.size : MEDIUM
* @tc.type : RELI
* @tc.level : Level 0
*/
LITE_TEST_CASE
(
DfxFuncTestSuite
,
subDfxDftHilog0700
,
LEVEL0
)
{
const
char
*
ret
=
HiLogGetModuleName
(
HILOG_MODULE_HIVIEW
);
TEST_ASSERT_EQUAL_STRING
(
ret
,
"HIVIEW"
);
};
RUN_TEST_SUITE
(
DfxFuncTestSuite
);
hiviewdfx_lite/hilog_posix/BUILD.gn
0 → 100755
浏览文件 @
941ea9da
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/lite/build/suite_lite.gni")
hcpptest_suite("ActsHilogTest") {
suite_name = "acts"
sources = [ "src/HilogTest.cpp" ]
include_dirs = [
"src",
"//test/xts/tools/hctest/include",
"//base/hiviewdfx/hilog_lite/interfaces/native/innerkits/",
"//kernel/liteos_a/include/config/base/core",
]
deps = [ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared" ]
cflags = [ "-Wno-error" ]
defines = [ "OHOS_APPEXECFWK_BMS_BUNDLEMANAGER" ]
ldflags = [
"-lstdc++",
"-lm",
"-lpthread",
]
}
hiviewdfx_lite/hilog_posix/Test.json
0 → 100755
浏览文件 @
941ea9da
{
"description"
:
"Config for kernel_lite test cases"
,
"environment"
:
[
{
"type"
:
"device"
,
"label"
:
"ipcamera"
}
],
"kits"
:
[
{
"type"
:
"MountKit"
,
"server"
:
"NfsServer"
,
"mount"
:
[
{
"source"
:
"testcases/hiviewdfx"
,
"target"
:
"/test_root/hiviewdfx"
}
]
}
],
"driver"
:
{
"type"
:
"CppTestLite"
,
"execute"
:
"/test_root/hiviewdfx/ActsHilogTest.bin"
}
}
\ No newline at end of file
hiviewdfx_lite/hilog_posix/src/HilogTest.cpp
0 → 100755
浏览文件 @
941ea9da
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stdio.h>
#include "gtest/gtest.h"
#include "log.h"
#undef LOG_TAG
#undef LOG_DOMAIN
#define LOG_TAG "Test_TAG"
#define LOG_DOMAIN 0xD002D00
using
namespace
OHOS
::
HiviewDFX
;
static
constexpr
HiLogLabel
LABEL
=
{
LOG_CORE
,
0xD002D00
,
"Test_TAG"
};
using
namespace
std
;
using
namespace
testing
::
ext
;
class
HiLogTest
:
public
testing
::
Test
{
protected:
static
void
SetUpTestCase
(
void
)
{}
static
void
TearDownTestCase
(
void
)
{}
virtual
void
SetUp
()
{}
virtual
void
TearDown
()
{}
};
/**
* @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_0100
* @tc.name : HiLog_DEBUG parameter legal test (Cortex-A, C)
* @tc.desc : [C- SOFTWARE -0200]
*/
HWTEST_F
(
HiLogTest
,
subDfxDftHiLogCortexaapi0100
,
Function
|
MediumTest
|
Level0
)
{
HILOG_DEBUG
(
LOG_CORE
,
"Debug log of HiLog API test"
);
}
/**
* @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_0200
* @tc.name : HILOG_INFO parameter legal test (Cortex-A, C)
* @tc.desc : [C- SOFTWARE -0200]
*/
HWTEST_F
(
HiLogTest
,
subDfxDftHiLogCortexaapi0200
,
Function
|
MediumTest
|
Level1
)
{
HILOG_INFO
(
LOG_CORE
,
"Info log of HiLog API test"
);
}
/**
* @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_0300
* @tc.name : HILOG_WARN parameter legal test (Cortex-A, C)
* @tc.desc : [C- SOFTWARE -0200]
*/
HWTEST_F
(
HiLogTest
,
subDfxDftHiLogCortexaapi0300
,
Function
|
MediumTest
|
Level1
)
{
HILOG_WARN
(
LOG_CORE
,
"Warn log of HiLog API test"
);
}
/**
* @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_0400
* @tc.name : HILOG_ERROR parameter legal test (Cortex-A, C)
* @tc.desc : [C- SOFTWARE -0200]
*/
HWTEST_F
(
HiLogTest
,
subDfxDftHiLogCortexaapi0400
,
Function
|
MediumTest
|
Level1
)
{
HILOG_ERROR
(
LOG_CORE
,
"Error log of HiLog API test"
);
}
/**
* @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_0500
* @tc.name : HILOG_FATAL parameter legal test (Cortex-A, C)
* @tc.desc : [C- SOFTWARE -0200]
*/
HWTEST_F
(
HiLogTest
,
subDfxDftHiLogCortexaapi0500
,
Function
|
MediumTest
|
Level1
)
{
HILOG_FATAL
(
LOG_CORE
,
"Fatal log of HiLog API test"
);
}
/**
* @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_0600
* @tc.name : HiLog::Debug parameter legal test (Cortex-A, C)
* @tc.desc : [C- SOFTWARE -0200]
*/
HWTEST_F
(
HiLogTest
,
subDfxDftHiLogCortexaapi0600
,
Function
|
MediumTest
|
Level1
)
{
bool
ret
=
true
;
ret
=
HiLog
::
Debug
(
LABEL
,
"Debug log of HiLog API test"
);
EXPECT_TRUE
(
ret
);
}
/**
* @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_0700
* @tc.name : HiLog::Error parameter legal test (Cortex-A, C)
* @tc.desc : [C- SOFTWARE -0200]
*/
HWTEST_F
(
HiLogTest
,
subDfxDftHiLogCortexaapi0700
,
Function
|
MediumTest
|
Level1
)
{
bool
ret
=
true
;
ret
=
HiLog
::
Error
(
LABEL
,
"Error log of HiLog API test"
);
EXPECT_TRUE
(
ret
);
}
/**
* @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_0800
* @tc.name : HiLog::Fatal parameter legal test (Cortex-A, C)
* @tc.desc : [C- SOFTWARE -0200]
*/
HWTEST_F
(
HiLogTest
,
subDfxDftHiLogCortexaapi0800
,
Function
|
MediumTest
|
Level1
)
{
bool
ret
=
true
;
ret
=
HiLog
::
Fatal
(
LABEL
,
"Fatal log of HiLog API test"
);
EXPECT_TRUE
(
ret
);
}
/**
* @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_0900
* @tc.name : HiLog::Info parameter legal test (Cortex-A, C)
* @tc.desc : [C- SOFTWARE -0200]
*/
HWTEST_F
(
HiLogTest
,
subDfxDftHiLogCortexaapi0900
,
Function
|
MediumTest
|
Level1
)
{
bool
ret
=
true
;
ret
=
HiLog
::
Info
(
LABEL
,
"Info log of HiLog API test"
);
EXPECT_TRUE
(
ret
);
}
/**
* @tc.number : Sub_Dfx_Dft_HiLog_Cortexaapi_1000
* @tc.name : HiLog::Warn parameter legal test (Cortex-A, C)
* @tc.desc : [C- SOFTWARE -0200]
*/
HWTEST_F
(
HiLogTest
,
subDfxDftHiLogCortexaapi1000
,
Function
|
MediumTest
|
Level1
)
{
bool
ret
=
true
;
ret
=
HiLog
::
Warn
(
LABEL
,
"Warn log of HiLog API test"
);
EXPECT_TRUE
(
ret
);
}
kernel_lite/fs_posix/src/FsOtherTest.cpp
浏览文件 @
941ea9da
...
@@ -250,7 +250,7 @@ HWTEST_F(FileSystemTest, testGlob, Function | MediumTest | Level3)
...
@@ -250,7 +250,7 @@ HWTEST_F(FileSystemTest, testGlob, Function | MediumTest | Level3)
}
}
globfree
(
&
buf
);
globfree
(
&
buf
);
}
}
#if 0
/**
/**
* @tc.number SUB_KERNEL_FS_OTHER_0500
* @tc.number SUB_KERNEL_FS_OTHER_0500
* @tc.name basic function test : Use fwprintf function to write wide characters
* @tc.name basic function test : Use fwprintf function to write wide characters
...
@@ -276,3 +276,4 @@ HWTEST_F(FileSystemTest, testFwprintf, Function | MediumTest | Level3)
...
@@ -276,3 +276,4 @@ HWTEST_F(FileSystemTest, testFwprintf, Function | MediumTest | Level3)
EXPECT_TRUE(wcscmp(writeBuf, readBuf) == 0) << "writeBuf != readBuf";
EXPECT_TRUE(wcscmp(writeBuf, readBuf) == 0) << "writeBuf != readBuf";
EXPECT_NE(fclose(fp), -1) << "> fclose errno =" << errno;
EXPECT_NE(fclose(fp), -1) << "> fclose errno =" << errno;
}
}
#endif
kernel_lite/fs_posix/src/FsStatTest.cpp
浏览文件 @
941ea9da
...
@@ -50,7 +50,7 @@ HWTEST_F(FileSystemTest, testUmask, Function | MediumTest | Level2)
...
@@ -50,7 +50,7 @@ HWTEST_F(FileSystemTest, testUmask, Function | MediumTest | Level2)
EXPECT_EQ
(
umask
(
maskPre
),
maskNew
)
<<
"> umask error"
;
EXPECT_EQ
(
umask
(
maskPre
),
maskNew
)
<<
"> umask error"
;
}
}
#endif
#endif
#if 0
/**
/**
* @tc.number SUB_KERNEL_FS_STAT_0200
* @tc.number SUB_KERNEL_FS_STAT_0200
* @tc.name basic function test : Run the stat function to obtain the file status.
* @tc.name basic function test : Run the stat function to obtain the file status.
...
@@ -77,7 +77,7 @@ HWTEST_F(FileSystemTest, testStat, Function | MediumTest | Level3)
...
@@ -77,7 +77,7 @@ HWTEST_F(FileSystemTest, testStat, Function | MediumTest | Level3)
LOG("> buf.st_mtim = %lds,%ldns", buf.st_mtim.tv_sec, buf.st_mtim.tv_nsec); // time for last file modification
LOG("> buf.st_mtim = %lds,%ldns", buf.st_mtim.tv_sec, buf.st_mtim.tv_nsec); // time for last file modification
LOG("> buf.st_ctim = %lds,%ldns", buf.st_ctim.tv_sec, buf.st_ctim.tv_nsec); // time for last file status change
LOG("> buf.st_ctim = %lds,%ldns", buf.st_ctim.tv_sec, buf.st_ctim.tv_nsec); // time for last file status change
}
}
#endif
#if defined(LITE_FS_JFFS2)
#if defined(LITE_FS_JFFS2)
#ifndef COMMERCIAL
#ifndef COMMERCIAL
/**
/**
...
@@ -113,7 +113,7 @@ HWTEST_F(FileSystemTest, testStatLimt, Function | MediumTest | Level3)
...
@@ -113,7 +113,7 @@ HWTEST_F(FileSystemTest, testStatLimt, Function | MediumTest | Level3)
}
}
#endif
#endif
#endif
#endif
#if 0
/**
/**
* @tc.number SUB_KERNEL_FS_STAT_0300
* @tc.number SUB_KERNEL_FS_STAT_0300
* @tc.name basic function test : Run the lstat function to obtain the file status.
* @tc.name basic function test : Run the lstat function to obtain the file status.
...
@@ -141,7 +141,7 @@ HWTEST_F(FileSystemTest, testLstat, Function | MediumTest | Level3)
...
@@ -141,7 +141,7 @@ HWTEST_F(FileSystemTest, testLstat, Function | MediumTest | Level3)
LOG("> buf.st_mtim = %lds,%ldns", buf.st_mtim.tv_sec, buf.st_mtim.tv_nsec); // time for last file modification
LOG("> buf.st_mtim = %lds,%ldns", buf.st_mtim.tv_sec, buf.st_mtim.tv_nsec); // time for last file modification
LOG("> buf.st_ctim = %lds,%ldns", buf.st_ctim.tv_sec, buf.st_ctim.tv_nsec); // time for last file status change
LOG("> buf.st_ctim = %lds,%ldns", buf.st_ctim.tv_sec, buf.st_ctim.tv_nsec); // time for last file status change
}
}
#endif
#if defined(LITE_FS_JFFS2)
#if defined(LITE_FS_JFFS2)
#ifndef COMMERCIAL
#ifndef COMMERCIAL
/**
/**
...
@@ -178,7 +178,7 @@ HWTEST_F(FileSystemTest, testLstatLimt, Function | MediumTest | Level3)
...
@@ -178,7 +178,7 @@ HWTEST_F(FileSystemTest, testLstatLimt, Function | MediumTest | Level3)
}
}
#endif
#endif
#endif
#endif
#if 0
/**
/**
* @tc.number SUB_KERNEL_FS_STAT_0400
* @tc.number SUB_KERNEL_FS_STAT_0400
* @tc.name basic function test : Run the fstat function to obtain the file status.
* @tc.name basic function test : Run the fstat function to obtain the file status.
...
@@ -205,7 +205,7 @@ HWTEST_F(FileSystemTest, testFstat, Function | MediumTest | Level3)
...
@@ -205,7 +205,7 @@ HWTEST_F(FileSystemTest, testFstat, Function | MediumTest | Level3)
LOG("> buf.st_ctim = %lds,%ldns", buf.st_ctim.tv_sec, buf.st_ctim.tv_nsec); // time for last file status change
LOG("> buf.st_ctim = %lds,%ldns", buf.st_ctim.tv_sec, buf.st_ctim.tv_nsec); // time for last file status change
EXPECT_NE(close(fd), -1) << "> close errno = " << errno;
EXPECT_NE(close(fd), -1) << "> close errno = " << errno;
}
}
#endif
#if defined(LITE_FS_JFFS2)
#if defined(LITE_FS_JFFS2)
#ifndef COMMERCIAL
#ifndef COMMERCIAL
/**
/**
...
...
kernel_lite/fs_posix/src/FsStdioTest.cpp
浏览文件 @
941ea9da
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
#include "libfs.h"
#include "libfs.h"
using
namespace
testing
::
ext
;
using
namespace
testing
::
ext
;
#if 0
/**
/**
* @tc.number SUB_KERNEL_FS_STDIO_0100
* @tc.number SUB_KERNEL_FS_STDIO_0100
* @tc.name basic function test : read and write with stream
* @tc.name basic function test : read and write with stream
...
@@ -386,7 +386,7 @@ HWTEST_F(FileSystemTest, testFileno1, Function | MediumTest | Level2)
...
@@ -386,7 +386,7 @@ HWTEST_F(FileSystemTest, testFileno1, Function | MediumTest | Level2)
ReadCloseTest(fd);
ReadCloseTest(fd);
}
}
#endif
/**
/**
* @tc.number SUB_KERNEL_FS_STDIO_0700
* @tc.number SUB_KERNEL_FS_STDIO_0700
* @tc.name basic function test : Use the rename function to rename files.
* @tc.name basic function test : Use the rename function to rename files.
...
@@ -417,7 +417,7 @@ HWTEST_F(FileSystemTest, testRenameDir, Function | MediumTest | Level3)
...
@@ -417,7 +417,7 @@ HWTEST_F(FileSystemTest, testRenameDir, Function | MediumTest | Level3)
EXPECT_NE
(
rename
(
DIR0
,
newDirName
),
-
1
)
<<
"> rename errno = "
<<
errno
;
EXPECT_NE
(
rename
(
DIR0
,
newDirName
),
-
1
)
<<
"> rename errno = "
<<
errno
;
EXPECT_NE
(
rmdir
(
newDirName
),
-
1
)
<<
"> rmdir errno = "
<<
errno
;
EXPECT_NE
(
rmdir
(
newDirName
),
-
1
)
<<
"> rmdir errno = "
<<
errno
;
}
}
#if 0
/**
/**
* @tc.number SUB_KERNEL_FS_STDIO_0800
* @tc.number SUB_KERNEL_FS_STDIO_0800
* @tc.name basic function test : Use the fflush function to refresh stream
* @tc.name basic function test : Use the fflush function to refresh stream
...
@@ -474,3 +474,4 @@ HWTEST_F(FileSystemTest, testFflush, Function | MediumTest | Level3)
...
@@ -474,3 +474,4 @@ HWTEST_F(FileSystemTest, testFflush, Function | MediumTest | Level3)
Msleep(100);
Msleep(100);
AssertProcExitedOK(pid);
AssertProcExitedOK(pid);
}
}
#endif
kernel_lite/fs_posix/src/FsStdlibTest.cpp
浏览文件 @
941ea9da
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
#include "libfs.h"
#include "libfs.h"
using
namespace
testing
::
ext
;
using
namespace
testing
::
ext
;
#if 0
/**
/**
* @tc.number SUB_KERNEL_FS_STDLIB_0100
* @tc.number SUB_KERNEL_FS_STDLIB_0100
* @tc.name basic function test : mkstemp create a temporary file
* @tc.name basic function test : mkstemp create a temporary file
...
@@ -87,7 +87,7 @@ HWTEST_F(FileSystemTest, testMkostemp, Function | MediumTest | Level2)
...
@@ -87,7 +87,7 @@ HWTEST_F(FileSystemTest, testMkostemp, Function | MediumTest | Level2)
ReadCloseTest(fd);
ReadCloseTest(fd);
EXPECT_NE(unlink(tmpFileName), -1) << "> unlink errno = " << errno;
EXPECT_NE(unlink(tmpFileName), -1) << "> unlink errno = " << errno;
}
}
#endif
/**
/**
* @tc.number SUB_KERNEL_FS_STDLIB_0400
* @tc.number SUB_KERNEL_FS_STDLIB_0400
* @tc.name basic function test : mktemp create a temporary file name, mkdtemp create a directory
* @tc.name basic function test : mktemp create a temporary file name, mkdtemp create a directory
...
...
kernel_lite/fs_posix/src/FsUnistdTest.cpp
浏览文件 @
941ea9da
...
@@ -174,7 +174,7 @@ HWTEST_F(FileSystemTest, testChdirEnotdir, Function | MediumTest | Level3)
...
@@ -174,7 +174,7 @@ HWTEST_F(FileSystemTest, testChdirEnotdir, Function | MediumTest | Level3)
EXPECT_EQ
(
errno
,
ENOTDIR
);
EXPECT_EQ
(
errno
,
ENOTDIR
);
EXPECT_NE
(
chdir
(
TOP_DIR
),
-
1
)
<<
"> chdir errno = "
<<
errno
;
EXPECT_NE
(
chdir
(
TOP_DIR
),
-
1
)
<<
"> chdir errno = "
<<
errno
;
}
}
#if 0
#if defined(LITE_FS_NFS) || defined(LITE_FS_VFAT)
#if defined(LITE_FS_NFS) || defined(LITE_FS_VFAT)
/**
/**
* @tc.number SUB_KERNEL_FS_UNISTD_0300
* @tc.number SUB_KERNEL_FS_UNISTD_0300
...
@@ -223,7 +223,7 @@ HWTEST_F(FileSystemTest, testDup2, Function | MediumTest | Level3)
...
@@ -223,7 +223,7 @@ HWTEST_F(FileSystemTest, testDup2, Function | MediumTest | Level3)
ReadCloseTest(fdNew);
ReadCloseTest(fdNew);
EXPECT_NE(close(fd), -1) << "> close errno = " << errno;
EXPECT_NE(close(fd), -1) << "> close errno = " << errno;
}
}
#endif
#if defined(LITE_FS_VFAT)
#if defined(LITE_FS_VFAT)
/**
/**
* @tc.number SUB_KERNEL_FS_UNISTD_0500
* @tc.number SUB_KERNEL_FS_UNISTD_0500
...
...
kernel_lite/process_posix/src/ProcessTest.cpp
浏览文件 @
941ea9da
...
@@ -274,7 +274,7 @@ HWTEST_F(ProcessTest, testExit, Function | MediumTest | Level2)
...
@@ -274,7 +274,7 @@ HWTEST_F(ProcessTest, testExit, Function | MediumTest | Level2)
ASSERT_EQ
(
exitCode
,
reInt
[
i
]);
ASSERT_EQ
(
exitCode
,
reInt
[
i
]);
}
}
}
}
#if 0
/**
/**
* @tc.number SUB_KERNEL_PROCESS_EXIT_0200
* @tc.number SUB_KERNEL_PROCESS_EXIT_0200
* @tc.name Test exit about IO flush
* @tc.name Test exit about IO flush
...
@@ -312,7 +312,7 @@ HWTEST_F(ProcessTest, testExitFlush, Function | MediumTest | Level3)
...
@@ -312,7 +312,7 @@ HWTEST_F(ProcessTest, testExitFlush, Function | MediumTest | Level3)
EXPECT_NE(fclose(fp), -1) << "> fclose errno =" <<errno;
EXPECT_NE(fclose(fp), -1) << "> fclose errno =" <<errno;
remove(testFile);
remove(testFile);
}
}
#endif
/**
/**
* @tc.number SUB_KERNEL_PROCESS_ASSERT_0100
* @tc.number SUB_KERNEL_PROCESS_ASSERT_0100
* @tc.name Basic test about assert true
* @tc.name Basic test about assert true
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录