Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Kernel Liteos M
提交
6c1587bf
K
Kernel Liteos M
项目概览
OpenHarmony
/
Kernel Liteos M
大约 1 年 前同步成功
通知
20
Star
28
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel Liteos M
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6c1587bf
编写于
10月 11, 2021
作者:
O
openharmony_ci
提交者:
Gitee
10月 11, 2021
浏览文件
操作
浏览文件
下载
差异文件
!343 fix: gcc编译testsuite编译问题修复
Merge pull request !343 from kenneth/testsuite
上级
fe06d0cb
f7d26b8e
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
25 addition
and
33 deletion
+25
-33
kernel/src/los_init.c
kernel/src/los_init.c
+5
-5
testsuits/include/osTest.h
testsuits/include/osTest.h
+1
-0
testsuits/sample/kernel/hwi/llt_los_hwi_035.c
testsuits/sample/kernel/hwi/llt_los_hwi_035.c
+0
-2
testsuits/sample/kernel/mem/BUILD.gn
testsuits/sample/kernel/mem/BUILD.gn
+0
-6
testsuits/sample/kernel/mem/It_los_mem.h
testsuits/sample/kernel/mem/It_los_mem.h
+4
-1
testsuits/sample/kernel/mem/It_los_mem_010.c
testsuits/sample/kernel/mem/It_los_mem_010.c
+3
-1
testsuits/sample/kernel/mem/It_los_mem_018.c
testsuits/sample/kernel/mem/It_los_mem_018.c
+1
-1
testsuits/sample/kernel/mem/it_los_mem.c
testsuits/sample/kernel/mem/it_los_mem.c
+1
-1
testsuits/sample/kernel/power/It_los_pm_002.c
testsuits/sample/kernel/power/It_los_pm_002.c
+6
-6
testsuits/sample/kernel/power/It_los_pm_003.c
testsuits/sample/kernel/power/It_los_pm_003.c
+1
-0
testsuits/sample/kernel/queue/LLt_los_queue_003.c
testsuits/sample/kernel/queue/LLt_los_queue_003.c
+1
-4
testsuits/sample/kernel/queue/Llt_los_queue_001.c
testsuits/sample/kernel/queue/Llt_los_queue_001.c
+0
-3
testsuits/sample/kernel/swtmr/It_los_swtmr.h
testsuits/sample/kernel/swtmr/It_los_swtmr.h
+0
-1
testsuits/src/iCunit.c
testsuits/src/iCunit.c
+2
-2
未找到文件。
kernel/src/los_init.c
浏览文件 @
6c1587bf
...
...
@@ -203,11 +203,11 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_KernelInit(VOID)
#endif
#if (LOSCFG_TEST == 1)
//
ret = los_TestInit();
//
if (ret != LOS_OK) {
//
PRINT_ERR("los_TestInit error\n");
//
return ret;
//
}
ret
=
los_TestInit
();
if
(
ret
!=
LOS_OK
)
{
PRINT_ERR
(
"los_TestInit error
\n
"
);
return
ret
;
}
#endif
#if (LOSCFG_PLATFORM_EXC == 1)
...
...
testsuits/include/osTest.h
浏览文件 @
6c1587bf
...
...
@@ -337,6 +337,7 @@ extern VOID ItSuiteLosHwi(void);
extern
VOID
ItSuiteLosMem
(
void
);
extern
VOID
ItSuiteLosDynlink
(
void
);
extern
VOID
ItSuite_Los_FatFs
(
void
);
extern
VOID
ItSuiteLosPm
(
void
);
extern
VOID
ItSuite_Cmsis_Lostask
(
void
);
extern
VOID
ItSuite_Cmsis_Lostask_add
(
void
);
...
...
testsuits/sample/kernel/hwi/llt_los_hwi_035.c
浏览文件 @
6c1587bf
...
...
@@ -47,7 +47,6 @@ UINT32 g_testTaskIdHwi = 0xFFFF;
static
UINT32
Testcase
(
VOID
)
{
UINT32
ret
;
UINT32
loop
;
HWI_PRIOR_T
hwiPrio
=
2
;
HWI_MODE_T
mode
=
0
;
HWI_ARG_T
arg
=
0
;
...
...
@@ -67,7 +66,6 @@ static UINT32 Testcase(VOID)
return
LOS_OK
;
EXIT:
LOS_TaskDelete
(
g_testTaskIdHwi
);
TestHwiDelete
(
HWI_NUM_TEST
);
...
...
testsuits/sample/kernel/mem/BUILD.gn
浏览文件 @
6c1587bf
...
...
@@ -62,10 +62,4 @@ static_library("test_mem") {
]
configs += [ "//kernel/liteos_m/testsuits:include" ]
defines = [
"LOS_RECORD_LR_CNT=3",
"LOS_DLNK_NODE_HEAD_SIZE=0",
"MIN_DLNK_POOL_SIZE=0",
]
}
testsuits/sample/kernel/mem/It_los_mem.h
浏览文件 @
6c1587bf
...
...
@@ -46,6 +46,9 @@ extern "C" {
#define OS_MEM_WATERLINE YES
#define LOS_DLNK_NODE_HEAD_SIZE 0
#define MIN_DLNK_POOL_SIZE 0
#ifdef OS_MEM_WATERLINE
#define TEST_MEM_MINIUSE (LOS_DLNK_HEAD_SIZE + LOS_DLNK_NODE_HEAD_SIZE + sizeof(LOS_MEM_POOL_INFO))
#endif
...
...
@@ -84,7 +87,7 @@ struct TestMemNodeHead {
UINT32
magic
;
#endif
#if (LOSCFG_MEM_LEAKCHECK == 1)
UINTPTR
linkReg
[
LOS_RECORD_LR_CNT
];
UINTPTR
linkReg
[
LOS
CFG_MEM
_RECORD_LR_CNT
];
#endif
union
{
struct
TestMemNodeHead
*
prev
;
/* The prev is used for current node points to the previous node */
...
...
testsuits/sample/kernel/mem/It_los_mem_010.c
浏览文件 @
6c1587bf
...
...
@@ -63,8 +63,10 @@ static UINT32 TestCase(VOID)
ICUNIT_GOTO_NOT_EQUAL
(
p0
,
NULL
,
0
,
EXIT
);
d
[
i
]
=
p0
;
}
if
(
!
((
UINT32
)(
UINTPTR
)
g_memPool
<
(
UINT32
)(
UINTPTR
)
d
[
0
]
<
(
UINT32
)(
UINTPTR
)
d
[
1
]
<
(
UINT32
)(
UINTPTR
)
p
[
1
]))
if
(
!
(((
UINT32
)(
UINTPTR
)
g_memPool
<
(
UINT32
)(
UINTPTR
)
d
[
0
])
&&
((
UINT32
)(
UINTPTR
)
d
[
0
]
<
(
UINT32
)(
UINTPTR
)
d
[
1
])
&&
((
UINT32
)(
UINTPTR
)
d
[
1
]
<
(
UINT32
)(
UINTPTR
)
p
[
1
])))
{
ICUNIT_GOTO_EQUAL
(
1
,
0
,
0
,
EXIT
);
}
EXIT:
MemFree
();
...
...
testsuits/sample/kernel/mem/It_los_mem_018.c
浏览文件 @
6c1587bf
...
...
@@ -58,7 +58,7 @@ static UINT32 TestCase(VOID)
f0
=
LOS_MemAlloc
(
g_memPool
,
size
/
4
);
// 4, The reallocated memory size is a quarter of its previous size.
ICUNIT_GOTO_NOT_EQUAL
(
f0
,
NULL
,
f0
,
EXIT
);
if
(
!
((
UINT32
)(
UINTPTR
)
p
[
0
]
<
(
UINT32
)(
UINTPTR
)
f0
<
(
UINT32
)(
UINTPTR
)
p
[
1
]
))
{
if
(
!
((
(
UINT32
)(
UINTPTR
)
p
[
0
]
<
(
UINT32
)(
UINTPTR
)
f0
)
&&
((
UINT32
)(
UINTPTR
)
f0
<
(
UINT32
)(
UINTPTR
)
p
[
1
])
))
{
ICUNIT_GOTO_EQUAL
(
1
,
0
,
0
,
EXIT
);
}
...
...
testsuits/sample/kernel/mem/it_los_mem.c
浏览文件 @
6c1587bf
...
...
@@ -40,7 +40,7 @@ void MemStart(void)
g_testPool
=
LOS_MemAlloc
(
LOSCFG_SYS_HEAP_ADDR
,
TEST_POOL_SIZE
);
if
((
g_memPool
==
NULL
)
||
(
g_testPool
==
NULL
))
{
PRINT_ERR
(
"alloc failed , mem TestCase would be failed!!!!%
x !!! %x
"
,
g_memPool
,
g_testPool
);
PRINT_ERR
(
"alloc failed , mem TestCase would be failed!!!!%
p !!! %p
"
,
g_memPool
,
g_testPool
);
}
}
...
...
testsuits/sample/kernel/power/It_los_pm_002.c
浏览文件 @
6c1587bf
...
...
@@ -31,6 +31,7 @@
#include "osTest.h"
#include "It_los_pm.h"
#include "los_timer.h"
#include "los_sched.h"
#define myprintf // printf
#define TEST_LOOP 5
...
...
@@ -98,7 +99,6 @@ static UINT32 SystemPmEarly(UINT32 mode)
static
VOID
SystemPmLate
(
UINT32
mode
)
{
UINT32
ret
;
LosTaskCB
*
taskCB
=
NULL
;
ICUNIT_ASSERT_EQUAL_VOID
(
mode
,
LOS_SYS_LIGHT_SLEEP
,
mode
);
...
...
@@ -154,12 +154,12 @@ static void TaskSampleEntry2(void)
while
(
1
)
{
if
(
g_testSample2Count
==
TEST_FLAGS
)
{
g_testSample2Count
=
0
;
LOS_PmLockRequest
(
"TaskSampleEntry2"
);
(
VOID
)
LOS_PmLockRequest
(
"TaskSampleEntry2"
);
myprintf
(
"%s request pm lock
\n
"
,
__FUNCTION__
);
}
myprintf
(
"TaskSampleEntry2 running...count: %u
\n\r
"
,
g_testSample2Count
);
LOS_TaskDelay
(
20
);
/* sleep 20 ticks */
(
VOID
)
LOS_TaskDelay
(
20
);
/* sleep 20 ticks */
if
(
g_testSample2Count
<=
TEST_TASK1_LOOP
)
{
/* */
g_testSample2Count
++
;
...
...
@@ -174,7 +174,7 @@ static void TaskSampleEntry2(void)
}
}
LOS_PmLockRelease
(
"TaskSampleEntry2"
);
(
VOID
)
LOS_PmLockRelease
(
"TaskSampleEntry2"
);
myprintf
(
"TaskSampleEntry2 exit
\n
"
);
}
...
...
@@ -184,7 +184,7 @@ static void TaskSampleEntry1(void)
while
(
1
)
{
if
(
g_testSample1Count
==
0
)
{
LOS_PmLockRequest
(
"TaskSampleEntry1"
);
(
VOID
)
LOS_PmLockRequest
(
"TaskSampleEntry1"
);
myprintf
(
"%s request pm lock
\n
"
,
__FUNCTION__
);
}
...
...
@@ -205,7 +205,7 @@ static void TaskSampleEntry1(void)
}
}
LOS_PmLockRelease
(
"TaskSampleEntry1"
);
(
VOID
)
LOS_PmLockRelease
(
"TaskSampleEntry1"
);
myprintf
(
"TaskSampleEntry1 exit
\n
"
);
}
...
...
testsuits/sample/kernel/power/It_los_pm_003.c
浏览文件 @
6c1587bf
...
...
@@ -31,6 +31,7 @@
#include "osTest.h"
#include "It_los_pm.h"
#include "los_timer.h"
#include "los_sched.h"
#define TEST_LOOP 5
static
EVENT_CB_S
g_pmTestEvent
;
...
...
testsuits/sample/kernel/queue/LLt_los_queue_003.c
浏览文件 @
6c1587bf
...
...
@@ -30,11 +30,11 @@
*/
#include "It_los_queue.h"
#include "los_membox.h"
#define LOS_MEMBOX_MAGIC_SIZE 4
static
UINT32
g_uwQueueID122
=
0
;
static
unsigned
char
g_aucMailBoxPool
[
40
+
LOS_MEMBOX_MAGIC_SIZE
]
=
{
0
};
static
VOID
*
g_pMailBox
=
NULL
;
static
BOOL
g_bTaskFinish1
=
FALSE
;
static
BOOL
g_bTaskFinish2
=
FALSE
;
...
...
@@ -61,7 +61,6 @@ EXIT:
static
VOID
StTaskAllocNoWait
(
VOID
)
{
UINT32
ret
;
VOID
*
memBox
=
NULL
;
memBox
=
OsQueueMailAlloc
(
g_uwQueueID122
,
(
VOID
*
)
g_aucMailBoxPool
,
LOS_NO_WAIT
);
...
...
@@ -139,5 +138,3 @@ VOID LltLosQueue003(VOID)
{
TEST_ADD_CASE
(
"LltLosQueue003"
,
Testcase
,
TEST_LOS
,
TEST_QUE
,
TEST_LEVEL1
,
TEST_FUNCTION
);
}
testsuits/sample/kernel/queue/Llt_los_queue_001.c
浏览文件 @
6c1587bf
...
...
@@ -60,10 +60,7 @@ static UINT32 Testcase(VOID)
{
UINT32
ret
;
QUEUE_INFO_S
queueInfo
;
UINT32
i
;
UINT32
queueID
[
LOSCFG_BASE_IPC_QUEUE_LIMIT
+
1
];
CHAR
buff1
[
QUEUE_SHORT_BUFFER_LENGTH
]
=
"UniDSP"
;
CHAR
buff2
[
QUEUE_SHORT_BUFFER_LENGTH
]
=
" "
;
TSK_INIT_PARAM_S
task1
=
{
0
};
task1
.
pfnTaskEntry
=
(
TSK_ENTRY_FUNC
)
TaskF01
;
...
...
testsuits/sample/kernel/swtmr/It_los_swtmr.h
浏览文件 @
6c1587bf
...
...
@@ -55,7 +55,6 @@ extern EVENT_CB_S g_eventCB3;
#define TIMER_LOS_SELF_DELETED 1
extern
UINT32
g_idleTaskID
;
static
UINT32
g_usSwTmrMaxNum
;
static
UINT32
g_swtmrId1
;
static
UINT32
g_swtmrId2
;
...
...
testsuits/src/iCunit.c
浏览文件 @
6c1587bf
...
...
@@ -99,7 +99,7 @@ char *g_strLevel[] = {
"LEVEL0"
,
"LEVEL1"
,
"LEVEL2"
,
"LEVEL3"
};
char
*
g_strType
[]
=
{
"FUNCTI
T
ON"
,
"PRESSURE"
,
"PERFORMANCE"
"FUNCTION"
,
"PRESSURE"
,
"PERFORMANCE"
};
iUINT32
ICunitRunF
()
...
...
@@ -127,7 +127,7 @@ iUINT32 ICunitRunF()
}
else
{
g_failResult
++
;
iCunit_Case_FailedCnt
++
;
PRINTF
(
" [Failed]-%s-%s-%s-%s-%s-[Errline: %d RetCode:0x%x]
\n
"
,
psubCaseArray
->
pcCaseID
,
PRINTF
(
" [Failed]-%s-%s-%s-%s-%s-[Errline: %d RetCode:0x%
l
x]
\n
"
,
psubCaseArray
->
pcCaseID
,
g_strLayer
[
psubCaseArray
->
testcase_layer
],
g_strModule
[
psubCaseArray
->
testcase_module
],
g_strLevel
[
psubCaseArray
->
testcase_level
],
g_strType
[
psubCaseArray
->
testcase_type
],
psubCaseArray
->
errLine
,
psubCaseArray
->
retCode
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录