Compare commits
42 Commits
weekly_202
...
weekly_202
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da2429a003 | ||
|
|
3b9e83c6b2 | ||
|
|
b35d3d952b | ||
|
|
74e20c6f83 | ||
|
|
24a0b3ca70 | ||
|
|
bcb4dea119 | ||
|
|
333045d11f | ||
|
|
04d5405d3f | ||
|
|
7028f96f9c | ||
|
|
f34362730a | ||
|
|
bc1a352935 | ||
|
|
39391d12e4 | ||
|
|
41b73359a4 | ||
|
|
6babf78a8d | ||
|
|
18d07a809a | ||
|
|
6d2dbdf0e8 | ||
|
|
ee9d5daeca | ||
|
|
556c10121b | ||
|
|
6c6fddb9a3 | ||
|
|
fe69c9dd65 | ||
|
|
2374c01bb9 | ||
|
|
66278102ca | ||
|
|
ecdd47f0c5 | ||
|
|
7dbae99194 | ||
|
|
81784f1c6b | ||
|
|
20693c9424 | ||
|
|
5fa299b4aa | ||
|
|
b02c64dc42 | ||
|
|
c5a39437f7 | ||
|
|
f211029b12 | ||
|
|
36d55955ef | ||
|
|
12f6c5d628 | ||
|
|
17309e232a | ||
|
|
af1afcec6a | ||
|
|
9cef4da850 | ||
|
|
d058b640e2 | ||
|
|
4431b587f8 | ||
|
|
809db71acc | ||
|
|
b1a7711e15 | ||
|
|
3e83ce79c2 | ||
|
|
2cadd65301 | ||
|
|
f038492dbc |
238
CHANGELOG.md
238
CHANGELOG.md
@@ -4,26 +4,26 @@
|
||||
### Bug Fixes
|
||||
|
||||
* c-sky等芯片架构的BUILD.gn优化 ([3311d73](https://gitee.com/openharmony/kernel_liteos_m/commits/3311d73406b68d289b6f715a099e90f62c86abd1)), closes [#I4D129](https://gitee.com/openharmony/kernel_liteos_m/issues/I4D129)
|
||||
* change the sensitive words ([8e2248c](https://gitee.com/openharmony/kernel_liteos_m/commits/8e2248c062aaca2444cc1001873fe8e8d8cdd3c6)), closes [#I4K7](https://gitee.com/openharmony/kernel_liteos_m/issues/I4K7)
|
||||
* cortex-m55栈优化 ([59e9c6e](https://gitee.com/openharmony/kernel_liteos_m/commits/59e9c6ed73caeeed56081a768198eccc7448df6c)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* csky等新增模块的HalTickStart函数定义和实现不一致 ([07ab6a5](https://gitee.com/openharmony/kernel_liteos_m/commits/07ab6a5b77c6955f6093beeab976bdc1b32d1db9)), closes [#I4D1](https://gitee.com/openharmony/kernel_liteos_m/issues/I4D1)
|
||||
* change the sensitive words ([8e2248c](https://gitee.com/openharmony/kernel_liteos_m/commits/8e2248c062aaca2444cc1001873fe8e8d8cdd3c6)), closes [#I4K7LL](https://gitee.com/openharmony/kernel_liteos_m/issues/I4K7LL)
|
||||
* cortex-m55栈优化 ([59e9c6e](https://gitee.com/openharmony/kernel_liteos_m/commits/59e9c6ed73caeeed56081a768198eccc7448df6c)), closes [#I4SQIQ](https://gitee.com/openharmony/kernel_liteos_m/issues/I4SQIQ)
|
||||
* csky等新增模块的HalTickStart函数定义和实现不一致 ([07ab6a5](https://gitee.com/openharmony/kernel_liteos_m/commits/07ab6a5b77c6955f6093beeab976bdc1b32d1db9)), closes [#I4D1HY](https://gitee.com/openharmony/kernel_liteos_m/issues/I4D1HY)
|
||||
* FD_SETSIZE compatible newlibc ([82c6d5f](https://gitee.com/openharmony/kernel_liteos_m/commits/82c6d5f17478fb47ea5977a32fb76d783ee3e815))
|
||||
* fix compile warning saying dereference void * pointer ([29126a9](https://gitee.com/openharmony/kernel_liteos_m/commits/29126a98fe7a8f75695910bdf8fa1ccc6ff67288))
|
||||
* gcc编译testsuite编译问题修复 ([f7d26b8](https://gitee.com/openharmony/kernel_liteos_m/commits/f7d26b8e12fb1ba4bebe6c0fc9ca9e392537419f)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* gcc编译testsuite编译问题修复 ([f7d26b8](https://gitee.com/openharmony/kernel_liteos_m/commits/f7d26b8e12fb1ba4bebe6c0fc9ca9e392537419f)), closes [#I4DAOU](https://gitee.com/openharmony/kernel_liteos_m/issues/I4DAOU)
|
||||
* Kconfig中打开littlefs选项默认关联打开LOSCFG_SUPPORT_LITTLEFS宏 ([b2bcab3](https://gitee.com/openharmony/kernel_liteos_m/commits/b2bcab3a5bd794c86dd4d93b1b5aeca2d097289b)), closes [#I4ENQ1](https://gitee.com/openharmony/kernel_liteos_m/issues/I4ENQ1)
|
||||
* kernel接口融合,添加/修改kernel函数 ([cee9714](https://gitee.com/openharmony/kernel_liteos_m/commits/cee9714a90f2660a0b4455f4f5a2fc42870a6aa5))
|
||||
* L0 pthread_cond_timedwait接口实现存在的几个问题 ([2219c32](https://gitee.com/openharmony/kernel_liteos_m/commits/2219c32784071b6c37ea57185382e3228ed4b0a7)), closes [#I4N9P8](https://gitee.com/openharmony/kernel_liteos_m/issues/I4N9P8)
|
||||
* liteos_kernel_only=true编译内核报错 ([adc2105](https://gitee.com/openharmony/kernel_liteos_m/commits/adc21052b2b9b55de9fc493cf74645f470edf9b5)), closes [#I4O204](https://gitee.com/openharmony/kernel_liteos_m/issues/I4O204)
|
||||
* los_exc.S中_ExcInMsp主栈中异常处理函数中异常返回类型错误 ([c51df7a](https://gitee.com/openharmony/kernel_liteos_m/commits/c51df7a94c1f21803db25f46a73a7fb291588eda)), closes [#I4EJI4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4EJI4)
|
||||
* los_interrupt.c存在未使用的参数编译出错 ([5af4c2e](https://gitee.com/openharmony/kernel_liteos_m/commits/5af4c2e2139cabe49049283f7a4280460bbf353a)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* LOS_Panic接口中增加需要增加LOS_BackTrace(),方便定位主动异常位置 ([f51d675](https://gitee.com/openharmony/kernel_liteos_m/commits/f51d675fee217e0ad519f2fa79f70b033f313dce)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* los_trace.h接口注释错误修正 ([693468e](https://gitee.com/openharmony/kernel_liteos_m/commits/693468e5274af310721f5962602a915d701a7bf0)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* m4核在任务中异常时backtrace使用的是MSP所在的栈,而不是PSP所在的栈 ([3e8aea2](https://gitee.com/openharmony/kernel_liteos_m/commits/3e8aea224e481322efef9397e4aafc3450a09d28)), closes [#I4D7](https://gitee.com/openharmony/kernel_liteos_m/issues/I4D7)
|
||||
* M核posix接口fs模块用例完善 ([ee380fb](https://gitee.com/openharmony/kernel_liteos_m/commits/ee380fb9be45ef033979ec3b8875d980b7f13198)), closes [#I4L7](https://gitee.com/openharmony/kernel_liteos_m/issues/I4L7)
|
||||
* los_interrupt.c存在未使用的参数编译出错 ([5af4c2e](https://gitee.com/openharmony/kernel_liteos_m/commits/5af4c2e2139cabe49049283f7a4280460bbf353a)), closes [#I4SJPZ](https://gitee.com/openharmony/kernel_liteos_m/issues/I4SJPZ)
|
||||
* LOS_Panic接口中增加需要增加LOS_BackTrace(),方便定位主动异常位置 ([f51d675](https://gitee.com/openharmony/kernel_liteos_m/commits/f51d675fee217e0ad519f2fa79f70b033f313dce)), closes [#I4IGGY](https://gitee.com/openharmony/kernel_liteos_m/issues/I4IGGY)
|
||||
* los_trace.h接口注释错误修正 ([693468e](https://gitee.com/openharmony/kernel_liteos_m/commits/693468e5274af310721f5962602a915d701a7bf0)), closes #I4CYPZ
|
||||
* m4核在任务中异常时backtrace使用的是MSP所在的栈,而不是PSP所在的栈 ([3e8aea2](https://gitee.com/openharmony/kernel_liteos_m/commits/3e8aea224e481322efef9397e4aafc3450a09d28)), closes [#I4D7GE](https://gitee.com/openharmony/kernel_liteos_m/issues/I4D7GE)
|
||||
* M核posix接口fs模块用例完善 ([ee380fb](https://gitee.com/openharmony/kernel_liteos_m/commits/ee380fb9be45ef033979ec3b8875d980b7f13198)), closes [#I4L7BF](https://gitee.com/openharmony/kernel_liteos_m/issues/I4L7BF)
|
||||
* optimize default configuration ([b2e3849](https://gitee.com/openharmony/kernel_liteos_m/commits/b2e3849bfbd470981602b0dc02f47bffb38bfe11)), closes [#I4FSC9](https://gitee.com/openharmony/kernel_liteos_m/issues/I4FSC9)
|
||||
* OsGetAllTskInfo调用和异常时无任务回调函数地址 ([1c605a3](https://gitee.com/openharmony/kernel_liteos_m/commits/1c605a338ad2317aeb464bdac85df5b9a79c99fd)), closes [#I4MG2](https://gitee.com/openharmony/kernel_liteos_m/issues/I4MG2)
|
||||
* pm codex告警清零 ([9666380](https://gitee.com/openharmony/kernel_liteos_m/commits/96663805ecfd3248e33b4deb877c8d55cc4e8eec)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* pm模块解冻线程时存在删除空链表且时间片频繁唤醒系统 ([9f185b5](https://gitee.com/openharmony/kernel_liteos_m/commits/9f185b5b52ed9506a4913f233c9ddfe45452ec05)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* OsGetAllTskInfo调用和异常时无任务回调函数地址 ([1c605a3](https://gitee.com/openharmony/kernel_liteos_m/commits/1c605a338ad2317aeb464bdac85df5b9a79c99fd)), closes [#I4MG2T](https://gitee.com/openharmony/kernel_liteos_m/issues/I4MG2T)
|
||||
* pm codex告警清零 ([9666380](https://gitee.com/openharmony/kernel_liteos_m/commits/96663805ecfd3248e33b4deb877c8d55cc4e8eec)), closes [#I4OWPE](https://gitee.com/openharmony/kernel_liteos_m/issues/I4OWPE)
|
||||
* pm模块解冻线程时存在删除空链表且时间片频繁唤醒系统 ([9f185b5](https://gitee.com/openharmony/kernel_liteos_m/commits/9f185b5b52ed9506a4913f233c9ddfe45452ec05)), closes [#I4AKUS](https://gitee.com/openharmony/kernel_liteos_m/issues/I4AKUS)
|
||||
* **posix unittest:** posix unittest 融合 ([ad6f249](https://gitee.com/openharmony/kernel_liteos_m/commits/ad6f249d1ea878f06864d79bdbed772b21eeac49))
|
||||
* **posix:** posix兼容回退 ([207efc1](https://gitee.com/openharmony/kernel_liteos_m/commits/207efc15b859fe18d8b1dac2a3da9d7a5831aa6e))
|
||||
* **posix:** posix接口融合,接口规范兼容性修改 ([e0b1275](https://gitee.com/openharmony/kernel_liteos_m/commits/e0b12758da4a25e42110ba32da25b6d18ebed8ef))
|
||||
@@ -31,67 +31,67 @@
|
||||
* posix线程和LOS_TaskCreate任务不兼容,补齐接口防护,防止访问野指针 ([60805e1](https://gitee.com/openharmony/kernel_liteos_m/commits/60805e1a7c3736db86695ed86cd03cfaab70a427))
|
||||
* pr模板补充说明 ([7b86f69](https://gitee.com/openharmony/kernel_liteos_m/commits/7b86f69cc0ccd5512b69fd3a1181b3440747ddb2))
|
||||
* ReadMe中无对动态加载模块待加载的共享库的限制说明。 ([f86b971](https://gitee.com/openharmony/kernel_liteos_m/commits/f86b97180f97903bb2def271b7b11fc1ae1bf9bb)), closes [#I4ICK8](https://gitee.com/openharmony/kernel_liteos_m/issues/I4ICK8)
|
||||
* shell 输入不识别命令时内存泄漏 ([0245b1a](https://gitee.com/openharmony/kernel_liteos_m/commits/0245b1a7b24fd36d23f9602d0755b274581a84ce)), closes [#I4UR9](https://gitee.com/openharmony/kernel_liteos_m/issues/I4UR9)
|
||||
* **shell:** cat针对大文件无法工作 ([d518bad](https://gitee.com/openharmony/kernel_liteos_m/commits/d518bad0dc7dd9e3fbb45423a7db5cb8c1c922dc)), closes [#I4J4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4J4)
|
||||
* shell模块task命令踩内存问题修改 ([6ffd55d](https://gitee.com/openharmony/kernel_liteos_m/commits/6ffd55dcd07ce17b693a97bb678668f763480e4d)), closes [#I4A70](https://gitee.com/openharmony/kernel_liteos_m/issues/I4A70)
|
||||
* shell 输入不识别命令时内存泄漏 ([0245b1a](https://gitee.com/openharmony/kernel_liteos_m/commits/0245b1a7b24fd36d23f9602d0755b274581a84ce)), closes [#I4UR9P](https://gitee.com/openharmony/kernel_liteos_m/issues/I4UR9P)
|
||||
* **shell:** cat针对大文件无法工作 ([d518bad](https://gitee.com/openharmony/kernel_liteos_m/commits/d518bad0dc7dd9e3fbb45423a7db5cb8c1c922dc)), closes [#I4J4TK](https://gitee.com/openharmony/kernel_liteos_m/issues/I4J4TK)
|
||||
* shell模块task命令踩内存问题修改 ([6ffd55d](https://gitee.com/openharmony/kernel_liteos_m/commits/6ffd55dcd07ce17b693a97bb678668f763480e4d)), closes [#I4A70V](https://gitee.com/openharmony/kernel_liteos_m/issues/I4A70V)
|
||||
* switch inet_addr to a function ([b30e913](https://gitee.com/openharmony/kernel_liteos_m/commits/b30e9139d5502acab8c36ae9a56d4cd640786c44)), closes [#I4G4I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4G4I4)
|
||||
* **testsuites:** cpup和测试套解耦 ([692651f](https://gitee.com/openharmony/kernel_liteos_m/commits/692651fe40f668f19b479186e52fea34d092b458))
|
||||
* tick timer时钟频率赋值修改为运行时赋值 ([ae02afc](https://gitee.com/openharmony/kernel_liteos_m/commits/ae02afc8504f64ff6bc09828f55e9602bcbcae56)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* tick中断处理时,无挂起任务时应更新当前运行任务的时间片, 并触发一次调度 ([ea12d40](https://gitee.com/openharmony/kernel_liteos_m/commits/ea12d40caf1301b4a7b6d60a2c599ceff4746c90)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* tick timer时钟频率赋值修改为运行时赋值 ([ae02afc](https://gitee.com/openharmony/kernel_liteos_m/commits/ae02afc8504f64ff6bc09828f55e9602bcbcae56)), closes [#I4PGUR](https://gitee.com/openharmony/kernel_liteos_m/issues/I4PGUR)
|
||||
* tick中断处理时,无挂起任务时应更新当前运行任务的时间片, 并触发一次调度 ([ea12d40](https://gitee.com/openharmony/kernel_liteos_m/commits/ea12d40caf1301b4a7b6d60a2c599ceff4746c90)), closes [#I4LRZG](https://gitee.com/openharmony/kernel_liteos_m/issues/I4LRZG)
|
||||
* **time_func_test_01.c:** 修复testTimes测试单板配置LOSCFG_BASE_CORE_TICK_PER_SECOND = 1000的问题 ([5c982f1](https://gitee.com/openharmony/kernel_liteos_m/commits/5c982f1087f95174f2836c72648eab58adf37fd7))
|
||||
* 中断向量表对齐大小支持可配置 ([cf9c838](https://gitee.com/openharmony/kernel_liteos_m/commits/cf9c8387e3785d994aacf948b7c1b61324a3dd63)), closes [#I4M20](https://gitee.com/openharmony/kernel_liteos_m/issues/I4M20)
|
||||
* 中断向量表对齐大小支持可配置 ([cf9c838](https://gitee.com/openharmony/kernel_liteos_m/commits/cf9c8387e3785d994aacf948b7c1b61324a3dd63)), closes [#I4M20E](https://gitee.com/openharmony/kernel_liteos_m/issues/I4M20E)
|
||||
* 优化trace buffer初始化,删除swtmr 桩中的无效参数 ([afbc9a5](https://gitee.com/openharmony/kernel_liteos_m/commits/afbc9a593b61461072556cb5531d90b30ce2e394)), closes [#I4DPR7](https://gitee.com/openharmony/kernel_liteos_m/issues/I4DPR7)
|
||||
* 优化低功耗流程 ([c6600d9](https://gitee.com/openharmony/kernel_liteos_m/commits/c6600d9dddb666f397ba659d47d64f334691af6b)), closes [#I46](https://gitee.com/openharmony/kernel_liteos_m/issues/I46)
|
||||
* 修复arch目录调整影响到的target目录下的文件 ([d5725b2](https://gitee.com/openharmony/kernel_liteos_m/commits/d5725b22644da8ab3e719169230303e44c7d8750)), closes [#I4JM7](https://gitee.com/openharmony/kernel_liteos_m/issues/I4JM7)
|
||||
* 修复cortex-m系列系统提供的timer在低频下时间不准的问题 ([3e569ba](https://gitee.com/openharmony/kernel_liteos_m/commits/3e569bac587d90dcd21aff7d8ec53216dfbb8f1c)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* 修复hook层LOS_HOOK_TYPE_SEM_PEND的runningTask入参可能为空 ([3fd22ac](https://gitee.com/openharmony/kernel_liteos_m/commits/3fd22ac2b0b4c690669a659246aba099fd4311ec)), closes [#I4BU4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4BU4)
|
||||
* 修复irqNum = HwiNumGet()编译错误的问题 ([16e87d7](https://gitee.com/openharmony/kernel_liteos_m/commits/16e87d78d89bec7d85c076fc738ed4ad0614b865)), closes [#I4S81](https://gitee.com/openharmony/kernel_liteos_m/issues/I4S81)
|
||||
* 修复Kconfig信息错误 ([bb04582](https://gitee.com/openharmony/kernel_liteos_m/commits/bb045829104211522cd12a7273d5853400c1ea26)), closes [#I4MZ1](https://gitee.com/openharmony/kernel_liteos_m/issues/I4MZ1)
|
||||
* 修复L0_Emulator 门禁高概率失败的问题 ([7ad2f62](https://gitee.com/openharmony/kernel_liteos_m/commits/7ad2f62a03481a3919fef1f1e46e4c9677b1e65c)), closes [#I4NB0](https://gitee.com/openharmony/kernel_liteos_m/issues/I4NB0)
|
||||
* 优化低功耗流程 ([c6600d9](https://gitee.com/openharmony/kernel_liteos_m/commits/c6600d9dddb666f397ba659d47d64f334691af6b)), closes [#I46VXK](https://gitee.com/openharmony/kernel_liteos_m/issues/I46VXK)
|
||||
* 修复arch目录调整影响到的target目录下的文件 ([d5725b2](https://gitee.com/openharmony/kernel_liteos_m/commits/d5725b22644da8ab3e719169230303e44c7d8750)), closes [#I4JM7Z](https://gitee.com/openharmony/kernel_liteos_m/issues/I4JM7Z)
|
||||
* 修复cortex-m系列系统提供的timer在低频下时间不准的问题 ([3e569ba](https://gitee.com/openharmony/kernel_liteos_m/commits/3e569bac587d90dcd21aff7d8ec53216dfbb8f1c)), closes [#I4HBGR](https://gitee.com/openharmony/kernel_liteos_m/issues/I4HBGR)
|
||||
* 修复hook层LOS_HOOK_TYPE_SEM_PEND的runningTask入参可能为空 ([3fd22ac](https://gitee.com/openharmony/kernel_liteos_m/commits/3fd22ac2b0b4c690669a659246aba099fd4311ec)), closes [#I4BU4P](https://gitee.com/openharmony/kernel_liteos_m/issues/I4BU4P)
|
||||
* 修复irqNum = HwiNumGet()编译错误的问题 ([16e87d7](https://gitee.com/openharmony/kernel_liteos_m/commits/16e87d78d89bec7d85c076fc738ed4ad0614b865)), closes [#I4S81B](https://gitee.com/openharmony/kernel_liteos_m/issues/I4S81B)
|
||||
* 修复Kconfig信息错误 ([bb04582](https://gitee.com/openharmony/kernel_liteos_m/commits/bb045829104211522cd12a7273d5853400c1ea26)), closes [#I4MZ1F](https://gitee.com/openharmony/kernel_liteos_m/issues/I4MZ1F)
|
||||
* 修复L0_Emulator 门禁高概率失败的问题 ([7ad2f62](https://gitee.com/openharmony/kernel_liteos_m/commits/7ad2f62a03481a3919fef1f1e46e4c9677b1e65c)), closes [#I4NB0N](https://gitee.com/openharmony/kernel_liteos_m/issues/I4NB0N)
|
||||
* 修复liteos-m在iar环境下的编译问题 ([4c4784e](https://gitee.com/openharmony/kernel_liteos_m/commits/4c4784e33d7944e7850009be192375aaa6e2b125)), closes [#I4Q5Q5](https://gitee.com/openharmony/kernel_liteos_m/issues/I4Q5Q5)
|
||||
* 修复los_interrupt.c文件中HalHwiInit函数里未使能未对齐异常问题 ([d32e25f](https://gitee.com/openharmony/kernel_liteos_m/commits/d32e25f3ae8e8e5ec24effa98dc8f0b3ba94d0c1)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* 修复los_interrupt.c文件中HalHwiInit函数里未使能未对齐异常问题 ([d32e25f](https://gitee.com/openharmony/kernel_liteos_m/commits/d32e25f3ae8e8e5ec24effa98dc8f0b3ba94d0c1)), closes [#I4EJGR](https://gitee.com/openharmony/kernel_liteos_m/issues/I4EJGR)
|
||||
* 修复newlib缺省PTHREAD_KEYS_MAX 问题 ([65f04bf](https://gitee.com/openharmony/kernel_liteos_m/commits/65f04bf093376a478e9585dadfc1238158cc3641)), closes [#I4OX47](https://gitee.com/openharmony/kernel_liteos_m/issues/I4OX47)
|
||||
* 修复OsQueueMailFree提早释放内存的问题 ([ec88d16](https://gitee.com/openharmony/kernel_liteos_m/commits/ec88d1628937b3def6dd613246116f6bfa4141eb))
|
||||
* 修复pm编译告警导致内核编译失败 ([18b0524](https://gitee.com/openharmony/kernel_liteos_m/commits/18b052458e1cea113df7a6bb4798a6d5e1eb751e)), closes [#I49](https://gitee.com/openharmony/kernel_liteos_m/issues/I49)
|
||||
* 修复pthread 编译告警 ([cc57f81](https://gitee.com/openharmony/kernel_liteos_m/commits/cc57f81ab85a5eb9bb4be9bd7d2863978996bcf3)), closes [#I4U16](https://gitee.com/openharmony/kernel_liteos_m/issues/I4U16)
|
||||
* 修复pthread_create相关问题 ([cd949dd](https://gitee.com/openharmony/kernel_liteos_m/commits/cd949ddae0aa4e7291b0b7f6ba83c2034cdf1301)), closes [#I4P78](https://gitee.com/openharmony/kernel_liteos_m/issues/I4P78)
|
||||
* 修复pthread_create行为与posix不一致问题 ([2b1e5a7](https://gitee.com/openharmony/kernel_liteos_m/commits/2b1e5a7a130fbca1b86a787b54f474e183541d6d)), closes [#I49W9](https://gitee.com/openharmony/kernel_liteos_m/issues/I49W9)
|
||||
* 修复readme中文档链接错误 ([8ee70a0](https://gitee.com/openharmony/kernel_liteos_m/commits/8ee70a0f8f856da29139a36ba6f8589201cdb109)), closes [#I4FD5](https://gitee.com/openharmony/kernel_liteos_m/issues/I4FD5)
|
||||
* 修复risc-v异常时,异常信息混乱且backtrace无法输出的问题 ([0fb49d4](https://gitee.com/openharmony/kernel_liteos_m/commits/0fb49d4422245e83c2435468eb7f2690f2e2c6e4)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* 修复pm编译告警导致内核编译失败 ([18b0524](https://gitee.com/openharmony/kernel_liteos_m/commits/18b052458e1cea113df7a6bb4798a6d5e1eb751e)), closes [#I49MIN](https://gitee.com/openharmony/kernel_liteos_m/issues/I49MIN)
|
||||
* 修复pthread 编译告警 ([cc57f81](https://gitee.com/openharmony/kernel_liteos_m/commits/cc57f81ab85a5eb9bb4be9bd7d2863978996bcf3)), closes [#I4U16U](https://gitee.com/openharmony/kernel_liteos_m/issues/I4U16U)
|
||||
* 修复pthread_create相关问题 ([cd949dd](https://gitee.com/openharmony/kernel_liteos_m/commits/cd949ddae0aa4e7291b0b7f6ba83c2034cdf1301)), closes [#I4P78J](https://gitee.com/openharmony/kernel_liteos_m/issues/I4P78J)
|
||||
* 修复pthread_create行为与posix不一致问题 ([2b1e5a7](https://gitee.com/openharmony/kernel_liteos_m/commits/2b1e5a7a130fbca1b86a787b54f474e183541d6d)), closes [#I49W9F](https://gitee.com/openharmony/kernel_liteos_m/issues/I49W9F)
|
||||
* 修复readme中文档链接错误 ([8ee70a0](https://gitee.com/openharmony/kernel_liteos_m/commits/8ee70a0f8f856da29139a36ba6f8589201cdb109)), closes [#I4FD5G](https://gitee.com/openharmony/kernel_liteos_m/issues/I4FD5G)
|
||||
* 修复risc-v异常时,异常信息混乱且backtrace无法输出的问题 ([0fb49d4](https://gitee.com/openharmony/kernel_liteos_m/commits/0fb49d4422245e83c2435468eb7f2690f2e2c6e4)), closes #I4BPHX
|
||||
* 修复shcmd.h需要用宏包起来的问题 ([a7a8a62](https://gitee.com/openharmony/kernel_liteos_m/commits/a7a8a62bcb7398b4194b37f62098da9cb1ce717e)), closes [#I45FU2](https://gitee.com/openharmony/kernel_liteos_m/issues/I45FU2)
|
||||
* 修复shell 模块存在大量的编译告警及codeCheck。 ([e0d8b53](https://gitee.com/openharmony/kernel_liteos_m/commits/e0d8b5328f53dcef9427a34e8b0462250bb6a40f)), closes [#I48V2](https://gitee.com/openharmony/kernel_liteos_m/issues/I48V2)
|
||||
* 修复shell 模块存在大量的编译告警及codeCheck。 ([e0d8b53](https://gitee.com/openharmony/kernel_liteos_m/commits/e0d8b5328f53dcef9427a34e8b0462250bb6a40f)), closes [#I48V2J](https://gitee.com/openharmony/kernel_liteos_m/issues/I48V2J)
|
||||
* 修复任务栈对齐问题及补充posix和cmsis测试用例 ([ed863e9](https://gitee.com/openharmony/kernel_liteos_m/commits/ed863e90dd9aceb5d3b6d92b0a94703101b83f80))
|
||||
* 修复公版gcc编译内核,调用calloc崩溃 ([8d0ced2](https://gitee.com/openharmony/kernel_liteos_m/commits/8d0ced206951f35d5caab61969344b0ab259e5fb)), closes [#I4OFG6](https://gitee.com/openharmony/kernel_liteos_m/issues/I4OFG6)
|
||||
* 修复未使用的参数和类型比较编译报错问题 ([21b46e8](https://gitee.com/openharmony/kernel_liteos_m/commits/21b46e82f31030703d052369701f4d6d736a4a86))
|
||||
* 修复调度时间最大值不一致问题 ([9f393bc](https://gitee.com/openharmony/kernel_liteos_m/commits/9f393bcc6df592efb6940e9864ff93e932ae59ad))
|
||||
* 修正liteos-m内核README不准确信息 ([0e067b2](https://gitee.com/openharmony/kernel_liteos_m/commits/0e067b239354c28e16b05489274b33051d002508)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* 修正liteos-m内核README不准确信息 ([0e067b2](https://gitee.com/openharmony/kernel_liteos_m/commits/0e067b239354c28e16b05489274b33051d002508)), closes [#I4PLWP](https://gitee.com/openharmony/kernel_liteos_m/issues/I4PLWP)
|
||||
* 修正部分编码风格问题 ([91903a3](https://gitee.com/openharmony/kernel_liteos_m/commits/91903a37165ef364750916104be4f7dfd1d8f9a6)), closes [#I4K8M7](https://gitee.com/openharmony/kernel_liteos_m/issues/I4K8M7)
|
||||
* 内核ERR打印,线程信息,不方便问题定位。 ([232fec2](https://gitee.com/openharmony/kernel_liteos_m/commits/232fec27ac8cd2f46b5a2f5cfbe4677d0e287314)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* 内核ERR打印,线程信息,不方便问题定位。 ([232fec2](https://gitee.com/openharmony/kernel_liteos_m/commits/232fec27ac8cd2f46b5a2f5cfbe4677d0e287314)), closes #I4DAKM
|
||||
* 内源检视问题修复 ([c24363b](https://gitee.com/openharmony/kernel_liteos_m/commits/c24363bc50364b0be1fba3b993a83c6936fc3d08))
|
||||
* 删除C文件中无用的__cplusplus ([7fe3aad](https://gitee.com/openharmony/kernel_liteos_m/commits/7fe3aaddf56b300ffcb2b186ae01ed64bef1c069)), closes [#I4D0](https://gitee.com/openharmony/kernel_liteos_m/issues/I4D0)
|
||||
* 删除OsMemboxExcInfoGetSub内存调测方法中多余的赋值语句。 ([94db0fe](https://gitee.com/openharmony/kernel_liteos_m/commits/94db0fe7a30edaa10786101f1ef662987a27734a)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* 去掉没有使用的入参consoleid。 ([a627953](https://gitee.com/openharmony/kernel_liteos_m/commits/a62795304da31e13021ea2c675d124afd2594102)), closes [#I43](https://gitee.com/openharmony/kernel_liteos_m/issues/I43)
|
||||
* 删除C文件中无用的__cplusplus ([7fe3aad](https://gitee.com/openharmony/kernel_liteos_m/commits/7fe3aaddf56b300ffcb2b186ae01ed64bef1c069)), closes [#I4D0YK](https://gitee.com/openharmony/kernel_liteos_m/issues/I4D0YK)
|
||||
* 删除OsMemboxExcInfoGetSub内存调测方法中多余的赋值语句。 ([94db0fe](https://gitee.com/openharmony/kernel_liteos_m/commits/94db0fe7a30edaa10786101f1ef662987a27734a)), closes [#I4CFNX](https://gitee.com/openharmony/kernel_liteos_m/issues/I4CFNX)
|
||||
* 去掉没有使用的入参consoleid。 ([a627953](https://gitee.com/openharmony/kernel_liteos_m/commits/a62795304da31e13021ea2c675d124afd2594102)), closes [#I43CVE](https://gitee.com/openharmony/kernel_liteos_m/issues/I43CVE)
|
||||
* 去掉编译选项-fno-short-enums ([b542aab](https://gitee.com/openharmony/kernel_liteos_m/commits/b542aab09dd92397f8c1305ac656ef14a012b5f8)), closes [#I4JY32](https://gitee.com/openharmony/kernel_liteos_m/issues/I4JY32)
|
||||
* 取消cpu进入低功耗前开中断操作 ([bd39e9e](https://gitee.com/openharmony/kernel_liteos_m/commits/bd39e9e6d67310222c363e132141bb7fee1213f1)), closes [#I4KDP8](https://gitee.com/openharmony/kernel_liteos_m/issues/I4KDP8)
|
||||
* 告警修复 ([7d2fd01](https://gitee.com/openharmony/kernel_liteos_m/commits/7d2fd01c2d7d6d4c653a307a1419bc094f5332f0))
|
||||
* 告警修复 ([2d7bf3b](https://gitee.com/openharmony/kernel_liteos_m/commits/2d7bf3b7d8ea84961e802c366899aca891f38377))
|
||||
* 在头文件中补充LOSCFG_MEM_FREE_BY_TASKID函数的声明 ([ad18026](https://gitee.com/openharmony/kernel_liteos_m/commits/ad18026a59fc2853c9580e040f959f9f42082640)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* 在头文件中补充LOSCFG_MEM_FREE_BY_TASKID函数的声明 ([ad18026](https://gitee.com/openharmony/kernel_liteos_m/commits/ad18026a59fc2853c9580e040f959f9f42082640)), closes [#I4JBOV](https://gitee.com/openharmony/kernel_liteos_m/issues/I4JBOV)
|
||||
* 将curl依赖的函数新增至newlib库 ([bd04d9f](https://gitee.com/openharmony/kernel_liteos_m/commits/bd04d9f29a0b77445a71378f88b01ffdae24554f)), closes [#I4RG71](https://gitee.com/openharmony/kernel_liteos_m/issues/I4RG71)
|
||||
* 将未定义小写"true","false"改为"TRUE","FALSE"。 ([9819eb5](https://gitee.com/openharmony/kernel_liteos_m/commits/9819eb567636adf1774de9fd6039d274bee8f69b)), closes [#I43D20](https://gitee.com/openharmony/kernel_liteos_m/issues/I43D20)
|
||||
* 当前仓代码编译告警的问题 ([194ac58](https://gitee.com/openharmony/kernel_liteos_m/commits/194ac5898d1e2ffaa17f6dca405614b73da6f8bb)), closes [#I4N50](https://gitee.com/openharmony/kernel_liteos_m/issues/I4N50)
|
||||
* 支持硬浮点编译 ([988fd85](https://gitee.com/openharmony/kernel_liteos_m/commits/988fd85fae454a0d9fe01ef1c921b4f3667d5ac8)), closes [#I48](https://gitee.com/openharmony/kernel_liteos_m/issues/I48)
|
||||
* 测试用例任务栈的宏定义重复定义,导致在osTest.h中修改不生效 ([ce6cf68](https://gitee.com/openharmony/kernel_liteos_m/commits/ce6cf6879f4564393765a24c4d65448e0fddc3eb)), closes [#I4BA5](https://gitee.com/openharmony/kernel_liteos_m/issues/I4BA5)
|
||||
* 添加L0 测试门禁 ([5c168fc](https://gitee.com/openharmony/kernel_liteos_m/commits/5c168fc3e0d08dd4a8924696e17a498eb444fa70)), closes [#I4C5R4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4C5R4)
|
||||
* 添加newlib对ipv6的支持 ([f7400fb](https://gitee.com/openharmony/kernel_liteos_m/commits/f7400fbcb275cbb3b75f1aef2af1459b794432de)), closes [#I4M1](https://gitee.com/openharmony/kernel_liteos_m/issues/I4M1)
|
||||
* 添加文件版权头等信息 ([cf4e017](https://gitee.com/openharmony/kernel_liteos_m/commits/cf4e017970f8a3113bc8b6028d75775f747512c6)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* 清除因g_tm变量没有使用引入的编译告警 ([9689522](https://gitee.com/openharmony/kernel_liteos_m/commits/9689522a8e08b79244ad339dc24074843b99d33b)), closes [#I4LW3](https://gitee.com/openharmony/kernel_liteos_m/issues/I4LW3)
|
||||
* 移除los_arch_interrupt.h文件中冗余声明的函数VOID OsExcInit(VOID) ([136952f](https://gitee.com/openharmony/kernel_liteos_m/commits/136952f193fe97cfd6a88932e71811e12edfa7a5)), closes [#I4D9](https://gitee.com/openharmony/kernel_liteos_m/issues/I4D9)
|
||||
* 当前仓代码编译告警的问题 ([194ac58](https://gitee.com/openharmony/kernel_liteos_m/commits/194ac5898d1e2ffaa17f6dca405614b73da6f8bb)), closes #I4N50W
|
||||
* 支持硬浮点编译 ([988fd85](https://gitee.com/openharmony/kernel_liteos_m/commits/988fd85fae454a0d9fe01ef1c921b4f3667d5ac8)), closes [#I48KJP](https://gitee.com/openharmony/kernel_liteos_m/issues/I48KJP)
|
||||
* 测试用例任务栈的宏定义重复定义,导致在osTest.h中修改不生效 ([ce6cf68](https://gitee.com/openharmony/kernel_liteos_m/commits/ce6cf6879f4564393765a24c4d65448e0fddc3eb))
|
||||
* 添加L0 测试门禁 ([5c168fc](https://gitee.com/openharmony/kernel_liteos_m/commits/5c168fc3e0d08dd4a8924696e17a498eb444fa70)), closes #I4C5R4
|
||||
* 添加newlib对ipv6的支持 ([f7400fb](https://gitee.com/openharmony/kernel_liteos_m/commits/f7400fbcb275cbb3b75f1aef2af1459b794432de)), closes [#I4M1DB](https://gitee.com/openharmony/kernel_liteos_m/issues/I4M1DB)
|
||||
* 添加文件版权头等信息 ([cf4e017](https://gitee.com/openharmony/kernel_liteos_m/commits/cf4e017970f8a3113bc8b6028d75775f747512c6)), closes [#I4BXBH](https://gitee.com/openharmony/kernel_liteos_m/issues/I4BXBH)
|
||||
* 清除因g_tm变量没有使用引入的编译告警 ([9689522](https://gitee.com/openharmony/kernel_liteos_m/commits/9689522a8e08b79244ad339dc24074843b99d33b)), closes [#I4LW3H](https://gitee.com/openharmony/kernel_liteos_m/issues/I4LW3H)
|
||||
* 移除los_arch_interrupt.h文件中冗余声明的函数VOID OsExcInit(VOID) ([136952f](https://gitee.com/openharmony/kernel_liteos_m/commits/136952f193fe97cfd6a88932e71811e12edfa7a5)), closes [#I4D9OO](https://gitee.com/openharmony/kernel_liteos_m/issues/I4D9OO)
|
||||
* 补充net相关头文件 ([93f616b](https://gitee.com/openharmony/kernel_liteos_m/commits/93f616b64e961013be5c5267e50d58a40b5cc6c9))
|
||||
* 解决gmtime和localtime接口由于g_tm全局变量导致的竞态问题 ([1454b76](https://gitee.com/openharmony/kernel_liteos_m/commits/1454b76482d42e78c1904028de55d82261e5ecaa)), closes [#I4LW3](https://gitee.com/openharmony/kernel_liteos_m/issues/I4LW3)
|
||||
* 解决gmtime和localtime接口由于g_tm全局变量导致的竞态问题 ([1454b76](https://gitee.com/openharmony/kernel_liteos_m/commits/1454b76482d42e78c1904028de55d82261e5ecaa)), closes [#I4LW3H](https://gitee.com/openharmony/kernel_liteos_m/issues/I4LW3H)
|
||||
* 解决los_pm.c:743:19: warning 编译告警 ([0c72c8b](https://gitee.com/openharmony/kernel_liteos_m/commits/0c72c8bf94b053ff90bbf2019006c52adf1eb8df)), closes [#I4D4L8](https://gitee.com/openharmony/kernel_liteos_m/issues/I4D4L8)
|
||||
* 解决定时器超时但还在队列中无法删除的问题 ([ecce17e](https://gitee.com/openharmony/kernel_liteos_m/commits/ecce17ea4878c7bdf7d7de9a6848e6bf871563de)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* 解决定时器超时但还在队列中无法删除的问题 ([ecce17e](https://gitee.com/openharmony/kernel_liteos_m/commits/ecce17ea4878c7bdf7d7de9a6848e6bf871563de)), closes [#I4LFVD](https://gitee.com/openharmony/kernel_liteos_m/issues/I4LFVD)
|
||||
* 解除net对cmsis的依赖,net属于内核模块,不应该依赖内核对外接口 ([9982624](https://gitee.com/openharmony/kernel_liteos_m/commits/99826240d979c3aa820ab2aace62e3338978e6d1))
|
||||
* 调度中将pm相关的部分用LOSCFG_KERNEL_PM包含 ([d7c0059](https://gitee.com/openharmony/kernel_liteos_m/commits/d7c0059dc4fcca3f85d2cad1012353892ce28021)), closes [#I4L00](https://gitee.com/openharmony/kernel_liteos_m/issues/I4L00)
|
||||
* 调度中将pm相关的部分用LOSCFG_KERNEL_PM包含 ([d7c0059](https://gitee.com/openharmony/kernel_liteos_m/commits/d7c0059dc4fcca3f85d2cad1012353892ce28021)), closes [#I4L00F](https://gitee.com/openharmony/kernel_liteos_m/issues/I4L00F)
|
||||
* 调用LOS_TaskDetach操作已退出的joinable的任务时,未正确回收该任务 ([49c93b3](https://gitee.com/openharmony/kernel_liteos_m/commits/49c93b37c5e215612bbeb4619e73c809f9eb1cac)), closes [#I4DZL7](https://gitee.com/openharmony/kernel_liteos_m/issues/I4DZL7)
|
||||
* 针对pr是否同步至release分支,增加原因说明规则 ([1ee543d](https://gitee.com/openharmony/kernel_liteos_m/commits/1ee543d5d31524d543ffb297b121224dedf8602f))
|
||||
* 队列相关的API实现中,参数的校验不完全,导致程序异常 ([eef7c80](https://gitee.com/openharmony/kernel_liteos_m/commits/eef7c80a725d68af254ae55091bd36f978cf4284))
|
||||
@@ -101,30 +101,30 @@
|
||||
|
||||
* adapt net ([8594ee4](https://gitee.com/openharmony/kernel_liteos_m/commits/8594ee469ad2d40a363e5d77f94f292ab3cb8c21))
|
||||
* add option for ioctl ([5e8ac4b](https://gitee.com/openharmony/kernel_liteos_m/commits/5e8ac4b8883f64bbffa5bb3f063a601112058396)), closes [#I4I3W5](https://gitee.com/openharmony/kernel_liteos_m/issues/I4I3W5)
|
||||
* add option SIOCGIFBRDADDR for ioctl ([33ee492](https://gitee.com/openharmony/kernel_liteos_m/commits/33ee49295329e3c394d1cc7b16f77a23ac2255a8)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* add option SIOCGIFBRDADDR for ioctl ([33ee492](https://gitee.com/openharmony/kernel_liteos_m/commits/33ee49295329e3c394d1cc7b16f77a23ac2255a8)), closes [#I4EGNG](https://gitee.com/openharmony/kernel_liteos_m/issues/I4EGNG)
|
||||
* added assembly atomic interface ([1513f50](https://gitee.com/openharmony/kernel_liteos_m/commits/1513f50a474d1227a83fb655ad18c19cd792f235))
|
||||
* backtrace for arm9 ([03de7f3](https://gitee.com/openharmony/kernel_liteos_m/commits/03de7f37450a8821ea05e60e94a5d1dd359c4f99)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* backtrace for arm9 ([03de7f3](https://gitee.com/openharmony/kernel_liteos_m/commits/03de7f37450a8821ea05e60e94a5d1dd359c4f99)), closes [#I4BMLG](https://gitee.com/openharmony/kernel_liteos_m/issues/I4BMLG)
|
||||
* Board 和 SoC分离,编译适配 ([3f1c04d](https://gitee.com/openharmony/kernel_liteos_m/commits/3f1c04dd57bca0379ce37162d9d824801e7d880f))
|
||||
* **build:** add module_group and comment out arch_cflags ([e5636f7](https://gitee.com/openharmony/kernel_liteos_m/commits/e5636f7acaf7e8b7d14dc07930b2a16c86e63c85))
|
||||
* **build:** support Kconfig ([7e67343](https://gitee.com/openharmony/kernel_liteos_m/commits/7e673430dc42c55b3a0a6d955ba8fea21d6d58ea))
|
||||
* **cmsis:** support max_count for osSemaphoreNew ([d478152](https://gitee.com/openharmony/kernel_liteos_m/commits/d478152762013975551e1af154df42987596c9a6))
|
||||
* cortex-m55支持psplimit ([db7d641](https://gitee.com/openharmony/kernel_liteos_m/commits/db7d641c223db8ab25501d79c2a6331f743d830b)), closes [#I4T7R3](https://gitee.com/openharmony/kernel_liteos_m/issues/I4T7R3)
|
||||
* littlefs最大打开文件个数修改为可通过menuconfig配置 ([9bc9f3a](https://gitee.com/openharmony/kernel_liteos_m/commits/9bc9f3aa53be7bf392d3da09adcb184dec8e3da2))
|
||||
* newlib支持pthread_equal ([ce5357e](https://gitee.com/openharmony/kernel_liteos_m/commits/ce5357eee1daf1c1b3a3aa7bdeaef0cc5a8901bf)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* provide read write for socket by #define ([d044eda](https://gitee.com/openharmony/kernel_liteos_m/commits/d044eda3c3640ae135ef528739d0c9609f40c822)), closes [#I4H8](https://gitee.com/openharmony/kernel_liteos_m/issues/I4H8)
|
||||
* synchronizing arch api ([04bf3a6](https://gitee.com/openharmony/kernel_liteos_m/commits/04bf3a682f149482d8ebdbb9ff96d6889edb487a)), closes [#I4N7](https://gitee.com/openharmony/kernel_liteos_m/issues/I4N7)
|
||||
* newlib支持pthread_equal ([ce5357e](https://gitee.com/openharmony/kernel_liteos_m/commits/ce5357eee1daf1c1b3a3aa7bdeaef0cc5a8901bf)), closes [#I4QERS](https://gitee.com/openharmony/kernel_liteos_m/issues/I4QERS)
|
||||
* provide read write for socket by #define ([d044eda](https://gitee.com/openharmony/kernel_liteos_m/commits/d044eda3c3640ae135ef528739d0c9609f40c822)), closes [#I4H8TL](https://gitee.com/openharmony/kernel_liteos_m/issues/I4H8TL)
|
||||
* synchronizing arch api ([04bf3a6](https://gitee.com/openharmony/kernel_liteos_m/commits/04bf3a682f149482d8ebdbb9ff96d6889edb487a)), closes [#I4N7XV](https://gitee.com/openharmony/kernel_liteos_m/issues/I4N7XV)
|
||||
* synchronous los_hwicreate interface ([6c68ada](https://gitee.com/openharmony/kernel_liteos_m/commits/6c68adad4db7f6112990764eafe6a3bd5f8759a5))
|
||||
* 低内存资源回收low memory killer ([ab886d8](https://gitee.com/openharmony/kernel_liteos_m/commits/ab886d848ab809942c11d0e408b8ff76c41b92b2)), closes [#I4ID0](https://gitee.com/openharmony/kernel_liteos_m/issues/I4ID0)
|
||||
* 低功耗支持冻结线程等需求 ([9b5739a](https://gitee.com/openharmony/kernel_liteos_m/commits/9b5739ab11ae7a89d35ba6f54fc62137ddc6d897)), closes [#I49](https://gitee.com/openharmony/kernel_liteos_m/issues/I49)
|
||||
* 低内存资源回收low memory killer ([ab886d8](https://gitee.com/openharmony/kernel_liteos_m/commits/ab886d848ab809942c11d0e408b8ff76c41b92b2)), closes [#I4ID0M](https://gitee.com/openharmony/kernel_liteos_m/issues/I4ID0M)
|
||||
* 低功耗支持冻结线程等需求 ([9b5739a](https://gitee.com/openharmony/kernel_liteos_m/commits/9b5739ab11ae7a89d35ba6f54fc62137ddc6d897)), closes [#I49FJF](https://gitee.com/openharmony/kernel_liteos_m/issues/I49FJF)
|
||||
* 内核提供Interrupt框架,支持多架构多平台通用化 ([e8538d0](https://gitee.com/openharmony/kernel_liteos_m/commits/e8538d041a93817cea4ae3914afcfdc6182483e7))
|
||||
* 内核提供tick timer框架,支持多架构多平台通用化 ([f635450](https://gitee.com/openharmony/kernel_liteos_m/commits/f635450d7cf7f674de3803b5eb9d759b6e4d005b)), closes [#I4N7](https://gitee.com/openharmony/kernel_liteos_m/issues/I4N7)
|
||||
* 内核提供tick timer框架,支持多架构多平台通用化 ([f635450](https://gitee.com/openharmony/kernel_liteos_m/commits/f635450d7cf7f674de3803b5eb9d759b6e4d005b)), closes [#I4N7XV](https://gitee.com/openharmony/kernel_liteos_m/issues/I4N7XV)
|
||||
* 同步调度部分优化至liteos_m ([fb11ab1](https://gitee.com/openharmony/kernel_liteos_m/commits/fb11ab181e69289f7a2edfd5857595b89f1d5d67))
|
||||
* 支持cortex-m55 ([6e17805](https://gitee.com/openharmony/kernel_liteos_m/commits/6e1780546c173365262c7a50b81896f5b3c46389)), closes [#I4Q9](https://gitee.com/openharmony/kernel_liteos_m/issues/I4Q9)
|
||||
* 支持Lms ([7b838e8](https://gitee.com/openharmony/kernel_liteos_m/commits/7b838e8a7b8e9f7fb34ca495e5cb46d70d12722b)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* 支持cortex-m55 ([6e17805](https://gitee.com/openharmony/kernel_liteos_m/commits/6e1780546c173365262c7a50b81896f5b3c46389)), closes [#I4Q9OQ](https://gitee.com/openharmony/kernel_liteos_m/issues/I4Q9OQ)
|
||||
* 支持Lms ([7b838e8](https://gitee.com/openharmony/kernel_liteos_m/commits/7b838e8a7b8e9f7fb34ca495e5cb46d70d12722b)), closes [#I4HYBG](https://gitee.com/openharmony/kernel_liteos_m/issues/I4HYBG)
|
||||
* 支持posix 和 cmsis join能力 ([ecfdf7f](https://gitee.com/openharmony/kernel_liteos_m/commits/ecfdf7ff9bf1adf06835968dc6f06b7c45e04862)), closes [#I44V26](https://gitee.com/openharmony/kernel_liteos_m/issues/I44V26)
|
||||
* 支持posix线程私有数据能力 ([a856303](https://gitee.com/openharmony/kernel_liteos_m/commits/a856303b9cdadcfade33de0d3a335db0332f5761)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* 支持pthread_condattr_setclock ([68dad2c](https://gitee.com/openharmony/kernel_liteos_m/commits/68dad2ccc9856dc2c1ac112bc8f30a703c1af5d9)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4)
|
||||
* 支持pthread_mutex属性相关接口 ([d2be4d7](https://gitee.com/openharmony/kernel_liteos_m/commits/d2be4d7a460365844a7732df8a3eb59e6bb64897)), closes [#I4G4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4G4)
|
||||
* 支持posix线程私有数据能力 ([a856303](https://gitee.com/openharmony/kernel_liteos_m/commits/a856303b9cdadcfade33de0d3a335db0332f5761)), closes [#I4ODEB](https://gitee.com/openharmony/kernel_liteos_m/issues/I4ODEB)
|
||||
* 支持pthread_condattr_setclock ([68dad2c](https://gitee.com/openharmony/kernel_liteos_m/commits/68dad2ccc9856dc2c1ac112bc8f30a703c1af5d9)), closes [#I4ETLN](https://gitee.com/openharmony/kernel_liteos_m/issues/I4ETLN)
|
||||
* 支持pthread_mutex属性相关接口 ([d2be4d7](https://gitee.com/openharmony/kernel_liteos_m/commits/d2be4d7a460365844a7732df8a3eb59e6bb64897)), closes [#I4G4RQ](https://gitee.com/openharmony/kernel_liteos_m/issues/I4G4RQ)
|
||||
* 支持select.h的FD_SETSIZE宏配置 ([05642f0](https://gitee.com/openharmony/kernel_liteos_m/commits/05642f05ae6b220df977f4402bc31f396bf08603)), closes [#I4RYK4](https://gitee.com/openharmony/kernel_liteos_m/issues/I4RYK4)
|
||||
* 支持任务栈可配置 ([96cc92d](https://gitee.com/openharmony/kernel_liteos_m/commits/96cc92d03561e1a9f1030c71916068584b349626))
|
||||
* 调度、任务及pm解耦 ([cc8a794](https://gitee.com/openharmony/kernel_liteos_m/commits/cc8a794229f4236a1611183fd482740b3badbcd7)), closes [#I4JTN6](https://gitee.com/openharmony/kernel_liteos_m/issues/I4JTN6)
|
||||
@@ -303,21 +303,21 @@ LOS_LmsAddrDisableProtect去能指定内存段的访问保护
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* M核代码告警清零 ([cb5f862](https://gitee.com/openharmony/kernel_liteos_m/commits/cb5f862eafd91675bf53d0320616cc8f707a6e5a)), closes [#I4386](https://gitee.com/openharmony/kernel_liteos_m/issues/I4386)
|
||||
* M核告警消除 ([5a9d53b](https://gitee.com/openharmony/kernel_liteos_m/commits/5a9d53b6444a3bbe084f575ef079f0da36c27c2a)), closes [#I46](https://gitee.com/openharmony/kernel_liteos_m/issues/I46)
|
||||
* M核编译配置修改 ([deff7c9](https://gitee.com/openharmony/kernel_liteos_m/commits/deff7c921f606ed85663f91d21c12163c15aa7f8)), closes [#I46](https://gitee.com/openharmony/kernel_liteos_m/issues/I46)
|
||||
* shell模块task命令踩内存问题修改 ([b5e84d5](https://gitee.com/openharmony/kernel_liteos_m/commits/b5e84d5516b599257151f88b5a830d6fe9e0e188)), closes [#II4](https://gitee.com/openharmony/kernel_liteos_m/issues/II4)
|
||||
* trustzone 中断适配 ([15a2c17](https://gitee.com/openharmony/kernel_liteos_m/commits/15a2c17f791b7d6703863718d92fa35402c41067)), closes [#I42](https://gitee.com/openharmony/kernel_liteos_m/issues/I42)
|
||||
* add API LOS_HwiCreate and LOS_HwDelete ([eb668eb](https://gitee.com/openharmony/kernel_liteos_m/commits/eb668eb9e0021961230858f9bfa1599646da9a8f)), closes [#I3R75](https://gitee.com/openharmony/kernel_liteos_m/issues/I3R75)
|
||||
* M核代码告警清零 ([cb5f862](https://gitee.com/openharmony/kernel_liteos_m/commits/cb5f862eafd91675bf53d0320616cc8f707a6e5a)), closes [#I4386N](https://gitee.com/openharmony/kernel_liteos_m/issues/I4386N)
|
||||
* M核告警消除 ([5a9d53b](https://gitee.com/openharmony/kernel_liteos_m/commits/5a9d53b6444a3bbe084f575ef079f0da36c27c2a)), closes [#I46LHG](https://gitee.com/openharmony/kernel_liteos_m/issues/I46LHG)
|
||||
* M核编译配置修改 ([deff7c9](https://gitee.com/openharmony/kernel_liteos_m/commits/deff7c921f606ed85663f91d21c12163c15aa7f8)), closes [#I46XEA](https://gitee.com/openharmony/kernel_liteos_m/issues/I46XEA)
|
||||
* shell模块task命令踩内存问题修改 ([b5e84d5](https://gitee.com/openharmony/kernel_liteos_m/commits/b5e84d5516b599257151f88b5a830d6fe9e0e188)), closes #II4
|
||||
* trustzone 中断适配 ([15a2c17](https://gitee.com/openharmony/kernel_liteos_m/commits/15a2c17f791b7d6703863718d92fa35402c41067)), closes [#I42TFV](https://gitee.com/openharmony/kernel_liteos_m/issues/I42TFV)
|
||||
* add API LOS_HwiCreate and LOS_HwDelete ([eb668eb](https://gitee.com/openharmony/kernel_liteos_m/commits/eb668eb9e0021961230858f9bfa1599646da9a8f)), closes [#I3R75F](https://gitee.com/openharmony/kernel_liteos_m/issues/I3R75F)
|
||||
* add liteos_m vfs ([5479dd6](https://gitee.com/openharmony/kernel_liteos_m/commits/5479dd66d7ec96d2206a9890586fe5f07d50fbb9)), closes [#I3R493](https://gitee.com/openharmony/kernel_liteos_m/issues/I3R493)
|
||||
* backtrace代码段判断函数定义成弱函数,如果有多个代码段,那么可根据实际情况重定义 ([8692ed3](https://gitee.com/openharmony/kernel_liteos_m/commits/8692ed33a3b975bac7aa5b6ce3c40a84e281f6c5)), closes [#I420](https://gitee.com/openharmony/kernel_liteos_m/issues/I420)
|
||||
* backtrace代码段判断函数定义成弱函数,如果有多个代码段,那么可根据实际情况重定义 ([8692ed3](https://gitee.com/openharmony/kernel_liteos_m/commits/8692ed33a3b975bac7aa5b6ce3c40a84e281f6c5)), closes [#I420PQ](https://gitee.com/openharmony/kernel_liteos_m/issues/I420PQ)
|
||||
* change cpup retval range ([d00a35b](https://gitee.com/openharmony/kernel_liteos_m/commits/d00a35ba9288047e9eaba06a8ed1d15806bfca40))
|
||||
* change description according to review ([a38365e](https://gitee.com/openharmony/kernel_liteos_m/commits/a38365ed097fb398f922a5d1a72305933ae3e7b3))
|
||||
* change queuePosion to queuePosition ([e772ccb](https://gitee.com/openharmony/kernel_liteos_m/commits/e772ccb3ccd3b31269066fa59a434a23af98ce51))
|
||||
* change to OpenHarmony LiteOS-M ([259fb54](https://gitee.com/openharmony/kernel_liteos_m/commits/259fb54b3c1a208c5672f1f6551ba0424505e4b2))
|
||||
* comment error ([a37b73d](https://gitee.com/openharmony/kernel_liteos_m/commits/a37b73d7599a62a728dbf564de9d9927f995ec1b))
|
||||
* compile warning fix ([8dea15c](https://gitee.com/openharmony/kernel_liteos_m/commits/8dea15c4fcaff2957c60351781180f964c0a882d)), closes [#I4330](https://gitee.com/openharmony/kernel_liteos_m/issues/I4330)
|
||||
* compile warnings ([75f6187](https://gitee.com/openharmony/kernel_liteos_m/commits/75f61870a002e238385bc9a7632d42b0b2488c9a)), closes [#I3Y57](https://gitee.com/openharmony/kernel_liteos_m/issues/I3Y57)
|
||||
* compile warning fix ([8dea15c](https://gitee.com/openharmony/kernel_liteos_m/commits/8dea15c4fcaff2957c60351781180f964c0a882d)), closes #I4330
|
||||
* compile warnings ([75f6187](https://gitee.com/openharmony/kernel_liteos_m/commits/75f61870a002e238385bc9a7632d42b0b2488c9a)), closes [#I3Y57X](https://gitee.com/openharmony/kernel_liteos_m/issues/I3Y57X)
|
||||
* correct ECB in comment ([e2aeb1f](https://gitee.com/openharmony/kernel_liteos_m/commits/e2aeb1ff1d4cd54a752c9f6ef976ee8e353da620))
|
||||
* correct spelling ([dd5cefb](https://gitee.com/openharmony/kernel_liteos_m/commits/dd5cefb0dace4b7a7276c880e45d5520950e9844))
|
||||
* correct spelling ([e7ea50f](https://gitee.com/openharmony/kernel_liteos_m/commits/e7ea50f13142e34a9860e75be051538fe91e234e))
|
||||
@@ -327,7 +327,7 @@ LOS_LmsAddrDisableProtect去能指定内存段的访问保护
|
||||
* delete unused symbols for default config ([7ad3a22](https://gitee.com/openharmony/kernel_liteos_m/commits/7ad3a22b4d62c8b00876ff338c4ce8d1e3f3cbe2)), closes [#I45HN3](https://gitee.com/openharmony/kernel_liteos_m/issues/I45HN3)
|
||||
* fix __cplusplus typo ([c3eb3e5](https://gitee.com/openharmony/kernel_liteos_m/commits/c3eb3e59e692371f67a4e21e4b38004195ce5e10))
|
||||
* fix backtrace check issue ([b6664e6](https://gitee.com/openharmony/kernel_liteos_m/commits/b6664e66f14d432b02101c883a53cb333dc4c195))
|
||||
* fix bad params def in HalTickStart ([4443b74](https://gitee.com/openharmony/kernel_liteos_m/commits/4443b74ea63d2e458af69723a7198bbbaeb856ea)), closes [#I48](https://gitee.com/openharmony/kernel_liteos_m/issues/I48)
|
||||
* fix bad params def in HalTickStart ([4443b74](https://gitee.com/openharmony/kernel_liteos_m/commits/4443b74ea63d2e458af69723a7198bbbaeb856ea)), closes [#I48YWT](https://gitee.com/openharmony/kernel_liteos_m/issues/I48YWT)
|
||||
* fix comment typo issue ([0c2a675](https://gitee.com/openharmony/kernel_liteos_m/commits/0c2a675e2d163eaf05aff7df226404888d78ca37))
|
||||
* fix destroy typo ([4ba6259](https://gitee.com/openharmony/kernel_liteos_m/commits/4ba6259e94bd677764922b0470fddc2590f6efa5))
|
||||
* fix function name ([f7d50d0](https://gitee.com/openharmony/kernel_liteos_m/commits/f7d50d0fbf53cdd352e94a387cf707083f1641bb))
|
||||
@@ -337,7 +337,7 @@ LOS_LmsAddrDisableProtect去能指定内存段的访问保护
|
||||
* fix macro typo ([1600360](https://gitee.com/openharmony/kernel_liteos_m/commits/16003604a948d081151ca4fcf0cfeea91c9e1960))
|
||||
* fix misspell in comments ([4572814](https://gitee.com/openharmony/kernel_liteos_m/commits/457281427ba286e24386d7916c4bc81f112f1c60))
|
||||
* fix NULL UNUSED redefined issue ([765bd55](https://gitee.com/openharmony/kernel_liteos_m/commits/765bd551990e906f457ec1145aea4f2bf5856547))
|
||||
* fix OS_TASK_STACK_PROTECT_SIZE undeclared error ([2a5a515](https://gitee.com/openharmony/kernel_liteos_m/commits/2a5a515f50a0f344d416218046bf0880facfb97c)), closes [#I4C5](https://gitee.com/openharmony/kernel_liteos_m/issues/I4C5)
|
||||
* fix OS_TASK_STACK_PROTECT_SIZE undeclared error ([2a5a515](https://gitee.com/openharmony/kernel_liteos_m/commits/2a5a515f50a0f344d416218046bf0880facfb97c)), closes [#I4C5RW](https://gitee.com/openharmony/kernel_liteos_m/issues/I4C5RW)
|
||||
* fix print format compilation warning ([ef12c89](https://gitee.com/openharmony/kernel_liteos_m/commits/ef12c89c7a79791665125a0b7391f9e533a06a0f))
|
||||
* fix readme link issue ([9e332c6](https://gitee.com/openharmony/kernel_liteos_m/commits/9e332c69a5813027575786424b78f0ae2f9a4c5a))
|
||||
* fix some typo issues ([f6b8cab](https://gitee.com/openharmony/kernel_liteos_m/commits/f6b8cab2539e4d1ee9e47ab8e3eb12f1630f7393))
|
||||
@@ -345,33 +345,33 @@ LOS_LmsAddrDisableProtect去能指定内存段的访问保护
|
||||
* fix typos ([191644e](https://gitee.com/openharmony/kernel_liteos_m/commits/191644e4412fccb7142cfcd34316ad8e2d24fcdf))
|
||||
* Fixed a spelling error in FS_LOCK_TIMEOUT_SEC. ([42dc308](https://gitee.com/openharmony/kernel_liteos_m/commits/42dc3083693be13c5fa8f2ad8213245465e28adf)), closes [#I3TL66](https://gitee.com/openharmony/kernel_liteos_m/issues/I3TL66)
|
||||
* include file log_config.h in los_mpu.c ([1932d71](https://gitee.com/openharmony/kernel_liteos_m/commits/1932d714a589c9e87258d7c8ed647b6110bde543))
|
||||
* L0 GN compilation problem ([2f9bfcc](https://gitee.com/openharmony/kernel_liteos_m/commits/2f9bfcc6ee436ee3568d0c8158a8e43c9ef02623)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_m/issues/I3)
|
||||
* L0 GN compilation problem ([2f9bfcc](https://gitee.com/openharmony/kernel_liteos_m/commits/2f9bfcc6ee436ee3568d0c8158a8e43c9ef02623)), closes [I3ORHS](https://gitee.com/openharmony/kernel_liteos_m/issues/I3ORHS)
|
||||
* l0 shell adapt new master ([fd2227e](https://gitee.com/openharmony/kernel_liteos_m/commits/fd2227e5c858c840f63629c27e559580e1cbdf2f))
|
||||
* littlefs inappropriate return value and errno ([452f364](https://gitee.com/openharmony/kernel_liteos_m/commits/452f36403dd4376572d8b52352d0d8129a4617e4)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_m/issues/I3)
|
||||
* littlefs inappropriate return value and errno ([452f364](https://gitee.com/openharmony/kernel_liteos_m/commits/452f36403dd4376572d8b52352d0d8129a4617e4)), closes [I3YIVT](https://gitee.com/openharmony/kernel_liteos_m/issues/I3YIVT)
|
||||
* littlefs三方源码采用GN编译修改上库 ([bdb614b](https://gitee.com/openharmony/kernel_liteos_m/commits/bdb614bc2b82011d77c7c8ffb95e415d2640d19d))
|
||||
* LOS_QueueInfoGet函数统计等待读写任务有误 ([215a1f6](https://gitee.com/openharmony/kernel_liteos_m/commits/215a1f6dc06cf2348c5875f7b05193b26ec17dde)), closes [#I4C6P2](https://gitee.com/openharmony/kernel_liteos_m/issues/I4C6P2)
|
||||
* los_swtmr.h不满足自包含要求对los_config.h存在依赖,但未包含los_config.h ([ad8e96a](https://gitee.com/openharmony/kernel_liteos_m/commits/ad8e96a00f2fcaebe57feae4e3f23f99d7f1d066)), closes [#I40](https://gitee.com/openharmony/kernel_liteos_m/issues/I40)
|
||||
* **mbedtls:** mbedtls l0 support ([761b860](https://gitee.com/openharmony/kernel_liteos_m/commits/761b86096c3cf5642c95e556c11a45a3d5f413e4)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_m/issues/I3)
|
||||
* los_swtmr.h不满足自包含要求对los_config.h存在依赖,但未包含los_config.h ([ad8e96a](https://gitee.com/openharmony/kernel_liteos_m/commits/ad8e96a00f2fcaebe57feae4e3f23f99d7f1d066)), closes [#I40DHM](https://gitee.com/openharmony/kernel_liteos_m/issues/I40DHM)
|
||||
* **mbedtls:** mbedtls l0 support ([761b860](https://gitee.com/openharmony/kernel_liteos_m/commits/761b86096c3cf5642c95e556c11a45a3d5f413e4))
|
||||
* misspell ([30578a6](https://gitee.com/openharmony/kernel_liteos_m/commits/30578a6a68a0d3a203b9a00e7bd1a946356d13d2))
|
||||
* modify event API description ([9481f1d](https://gitee.com/openharmony/kernel_liteos_m/commits/9481f1d8406960b8b859cc5a84b3831eadaf040c))
|
||||
* modify the return type of LOS_IntLock from UINTPTR to UINT32. ([bcc34e2](https://gitee.com/openharmony/kernel_liteos_m/commits/bcc34e22ede5aeccea63aba9f9ce3cb9aa92cbeb))
|
||||
* modify type INLNIE ([294a6d2](https://gitee.com/openharmony/kernel_liteos_m/commits/294a6d246b6a1f7cba8ce1bc4eeb9ae11f17a003))
|
||||
* Mutex锁释放后,无任务持有的情况下,owner未清空 ([c136cfd](https://gitee.com/openharmony/kernel_liteos_m/commits/c136cfdf973ae0068154606afa3a23858822c347)), closes [#I40OC8](https://gitee.com/openharmony/kernel_liteos_m/issues/I40OC8)
|
||||
* M核littlefs当文件open失败时,需要回收fd,否则会有fd泄露 ([b458e12](https://gitee.com/openharmony/kernel_liteos_m/commits/b458e12ed54905db6667f9d5db1410f94a3d6c71)), closes [#I3XU6](https://gitee.com/openharmony/kernel_liteos_m/issues/I3XU6)
|
||||
* m核上littlefs新增错误码功能 ([a062378](https://gitee.com/openharmony/kernel_liteos_m/commits/a06237863121816fa6421aed233446a3fa4e2665)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_m/issues/I3)
|
||||
* M核littlefs当文件open失败时,需要回收fd,否则会有fd泄露 ([b458e12](https://gitee.com/openharmony/kernel_liteos_m/commits/b458e12ed54905db6667f9d5db1410f94a3d6c71)), closes [#I3XU6R](https://gitee.com/openharmony/kernel_liteos_m/issues/I3XU6R)
|
||||
* m核上littlefs新增错误码功能 ([a062378](https://gitee.com/openharmony/kernel_liteos_m/commits/a06237863121816fa6421aed233446a3fa4e2665)), closes [#I3UVMQ](https://gitee.com/openharmony/kernel_liteos_m/issues/#I3UVMQ)
|
||||
* net compile fix ([299813c](https://gitee.com/openharmony/kernel_liteos_m/commits/299813cdb43ae1e24200f0a6b006e04e4d4fcb05))
|
||||
* open shell & fix qemu compile ([911a767](https://gitee.com/openharmony/kernel_liteos_m/commits/911a767992ee540a96ee9f67e0b87195656c3eab))
|
||||
* ping cmd compile fail ([ae05de3](https://gitee.com/openharmony/kernel_liteos_m/commits/ae05de3ffda86d312d33b2e38f237dd76daf4949))
|
||||
* protect from accssing NULL pointer, access g_handle after fslock ([bc7a914](https://gitee.com/openharmony/kernel_liteos_m/commits/bc7a914bce1b227a4f57265d5ecc3f82d78533e7)), closes [#I3UCX3](https://gitee.com/openharmony/kernel_liteos_m/issues/I3UCX3)
|
||||
* remove changelog in README ([37ef8ca](https://gitee.com/openharmony/kernel_liteos_m/commits/37ef8ca7ae73bf78f56dfef36c48bcd790afb6ff)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_m/issues/I3)
|
||||
* remove changelog in README ([37ef8ca](https://gitee.com/openharmony/kernel_liteos_m/commits/37ef8ca7ae73bf78f56dfef36c48bcd790afb6ff)), closes [#I3ZECY](https://gitee.com/openharmony/kernel_liteos_m/issues/I3ZECY)
|
||||
* remove libsec_kernel ([1144b75](https://gitee.com/openharmony/kernel_liteos_m/commits/1144b75f3ff9ce9e8fa114cf614d3deade8ac7c2))
|
||||
* remove project files ([4ad01ce](https://gitee.com/openharmony/kernel_liteos_m/commits/4ad01ced93684e5c7ba144ca267f8fcc2fe03105))
|
||||
* remove targets project files ([f39da5a](https://gitee.com/openharmony/kernel_liteos_m/commits/f39da5a6da59a3b1291c6b9ef7c50e6185df5ea1))
|
||||
* risc-v 锁中断在调度后失效 ([70f3aa1](https://gitee.com/openharmony/kernel_liteos_m/commits/70f3aa1c112e949d9af8e0245af5879140adefba)), closes [#I42](https://gitee.com/openharmony/kernel_liteos_m/issues/I42)
|
||||
* riscv_nuclei 编译失败 ([d3fb23c](https://gitee.com/openharmony/kernel_liteos_m/commits/d3fb23cca06580b6e447a9476a9c16643c4ea8fe)), closes [#I41](https://gitee.com/openharmony/kernel_liteos_m/issues/I41)
|
||||
* risc-v 锁中断在调度后失效 ([70f3aa1](https://gitee.com/openharmony/kernel_liteos_m/commits/70f3aa1c112e949d9af8e0245af5879140adefba)), closes [#I42OLJ](https://gitee.com/openharmony/kernel_liteos_m/issues/I42OLJ)
|
||||
* riscv_nuclei 编译失败 ([d3fb23c](https://gitee.com/openharmony/kernel_liteos_m/commits/d3fb23cca06580b6e447a9476a9c16643c4ea8fe)), closes [#I41PQJ](https://gitee.com/openharmony/kernel_liteos_m/issues/I41PQJ)
|
||||
* rollback resources when opendir failed ([82fad6c](https://gitee.com/openharmony/kernel_liteos_m/commits/82fad6c36f183de93d936dd2007b899c2932bcee)), closes [#I3Y577](https://gitee.com/openharmony/kernel_liteos_m/issues/I3Y577)
|
||||
* Scheduling module code to join GN compilation. ([8bf166b](https://gitee.com/openharmony/kernel_liteos_m/commits/8bf166b418ce1a6c027dc304d45fc9431923764c)), closes [#I3OA95](https://gitee.com/openharmony/kernel_liteos_m/issues/I3OA95)
|
||||
* The hook module fails to compile under the c99 compilation standard. ([a078c30](https://gitee.com/openharmony/kernel_liteos_m/commits/a078c3086fa47e05e3ffdc4e94ca202284a1487b)), closes [#I3S4](https://gitee.com/openharmony/kernel_liteos_m/issues/I3S4)
|
||||
* The hook module fails to compile under the c99 compilation standard. ([a078c30](https://gitee.com/openharmony/kernel_liteos_m/commits/a078c3086fa47e05e3ffdc4e94ca202284a1487b)), closes [#I3S4ME](https://gitee.com/openharmony/kernel_liteos_m/issues/I3S4ME)
|
||||
* tick 动态化计算优化,减小中断执行时间对系统总体时间的影响,保证软件定时器的响应精度。 ([2118c84](https://gitee.com/openharmony/kernel_liteos_m/commits/2118c84616cce5b5d4569d5a82a4d5de02af1e1c)), closes [#I3YGP1](https://gitee.com/openharmony/kernel_liteos_m/issues/I3YGP1)
|
||||
* timer qemu 头文件缺失 ([12fed74](https://gitee.com/openharmony/kernel_liteos_m/commits/12fed747226c377c656b8acb8346154627845b6f))
|
||||
* update according to review comments ([4dc0d31](https://gitee.com/openharmony/kernel_liteos_m/commits/4dc0d313d1b4a39ebb62156d0bb6429ebb8b996d))
|
||||
@@ -380,60 +380,60 @@ LOS_LmsAddrDisableProtect去能指定内存段的访问保护
|
||||
* update document description ([954c2fc](https://gitee.com/openharmony/kernel_liteos_m/commits/954c2fcfb531d0da1dcc6354a0c0b14335566ed7))
|
||||
* update macro to config item ([be57ece](https://gitee.com/openharmony/kernel_liteos_m/commits/be57ece9ce6200c8868164bc0bb2f26e3062cd37))
|
||||
* 以g_sysSchedStartTime是否为0判断时间轴是否生效存在极限场景导致调度时间不生效 ([509cf59](https://gitee.com/openharmony/kernel_liteos_m/commits/509cf59befb40839a376be31958d615f066c66fd)), closes [#I45HP5](https://gitee.com/openharmony/kernel_liteos_m/issues/I45HP5)
|
||||
* 修复littlefs的多分区挂载时,对pathname的处理逻辑异常 ([b55cfc1](https://gitee.com/openharmony/kernel_liteos_m/commits/b55cfc1ba7fc470b876c555ac7d3be0aa1d3d363)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_m/issues/I3)
|
||||
* 修复littlefs的多分区挂载时,对pathname的处理逻辑异常 ([b55cfc1](https://gitee.com/openharmony/kernel_liteos_m/commits/b55cfc1ba7fc470b876c555ac7d3be0aa1d3d363)), closes [#I3WWFA](https://gitee.com/openharmony/kernel_liteos_m/issues/I3WWFA)
|
||||
* 修复littlefs编译fs.c缺少头文件件依赖配置+若干musl库的缺失问题+多分区规格宏配置问题 ([7259289](https://gitee.com/openharmony/kernel_liteos_m/commits/7259289bd98a743f596060bc607f77ab8f149129)), closes [#I3VT11](https://gitee.com/openharmony/kernel_liteos_m/issues/I3VT11)
|
||||
* 修复M核littlefs GN编译的若干错误 ([d77828e](https://gitee.com/openharmony/kernel_liteos_m/commits/d77828e206f3324424c3b1372332828a0afb84c2))
|
||||
* 修复M核上musl库缺失strdup,c的问题 ([139f83a](https://gitee.com/openharmony/kernel_liteos_m/commits/139f83af391a4f5e64ab0fccbd783dd651b87e6a)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_m/issues/I3)
|
||||
* 修复M核上musl库缺失strdup,c的问题 ([139f83a](https://gitee.com/openharmony/kernel_liteos_m/commits/139f83af391a4f5e64ab0fccbd783dd651b87e6a)), closes [#I3VZSI](https://gitee.com/openharmony/kernel_liteos_m/issues/I3VZSI)
|
||||
* 修复QUEUE_INFO_S中waitReadTask无法保存大于32的任务编号 ([704cca9](https://gitee.com/openharmony/kernel_liteos_m/commits/704cca97b17972d1640fd33b1fa0b5917bb92b19)), closes [#I41N78](https://gitee.com/openharmony/kernel_liteos_m/issues/I41N78)
|
||||
* 修复task命令格式错误,增加copyright ([ad15bbd](https://gitee.com/openharmony/kernel_liteos_m/commits/ad15bbd6a4d298aabc05b26d7838de6425dbc5c5))
|
||||
* 修复timer_settime只设置第一次到期时间时,到期时间不准的缺陷 ([a5f4e37](https://gitee.com/openharmony/kernel_liteos_m/commits/a5f4e37e535bff39a333c469e2f1bf1817216fe8)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_m/issues/I3)
|
||||
* 修复timer_settime只设置第一次到期时间时,到期时间不准的缺陷 ([e4b5d4e](https://gitee.com/openharmony/kernel_liteos_m/commits/e4b5d4ebe9677d49d490fe74e5ac33c4a29435a2)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_m/issues/I3)
|
||||
* 修复timer_settime只设置第一次到期时间时,到期时间不准的缺陷 ([a5f4e37](https://gitee.com/openharmony/kernel_liteos_m/commits/a5f4e37e535bff39a333c469e2f1bf1817216fe8)), closes [#I3TCHA](https://gitee.com/openharmony/kernel_liteos_m/issues/I3TCHA)
|
||||
* 修复timer_settime只设置第一次到期时间时,到期时间不准的缺陷 ([e4b5d4e](https://gitee.com/openharmony/kernel_liteos_m/commits/e4b5d4ebe9677d49d490fe74e5ac33c4a29435a2)), closes [#I3TCHA](https://gitee.com/openharmony/kernel_liteos_m/issues/I3TCHA)
|
||||
* 修复不规范的copyright ([2d9bbd2](https://gitee.com/openharmony/kernel_liteos_m/commits/2d9bbd2769e71e7b464bd22fc335999dd8000682)), closes [#I3SPJ1](https://gitee.com/openharmony/kernel_liteos_m/issues/I3SPJ1)
|
||||
* 修复中断操作接口头文件位置变更,导致的编译错误 ([013a953](https://gitee.com/openharmony/kernel_liteos_m/commits/013a953926ca7cefd8a2f7c74d23c36c49765b59)), closes [#I4665](https://gitee.com/openharmony/kernel_liteos_m/issues/I4665)
|
||||
* 修复文档链接失效问题 ([5d53c84](https://gitee.com/openharmony/kernel_liteos_m/commits/5d53c848124319a95f509b56ba001357c6dd8b05)), closes [#I4529](https://gitee.com/openharmony/kernel_liteos_m/issues/I4529)
|
||||
* 内核模块编译增加-Werror编译选项,且清除内核编译告警 ([3798091](https://gitee.com/openharmony/kernel_liteos_m/commits/3798091d87441ea445ec642de57e036dbbc8370e)), closes [#I46E6](https://gitee.com/openharmony/kernel_liteos_m/issues/I46E6)
|
||||
* 删除MQ内冗余的重复宏定义 ([6d72916](https://gitee.com/openharmony/kernel_liteos_m/commits/6d7291660ad04682f05850876f81dfd0cba8ea6b)), closes [#I3U5](https://gitee.com/openharmony/kernel_liteos_m/issues/I3U5)
|
||||
* 删除延时节点后,存在时间无法有效刷新的场景 ([0a87c04](https://gitee.com/openharmony/kernel_liteos_m/commits/0a87c04d58d11da2082470698de0760d72259533)), closes [#I45I9](https://gitee.com/openharmony/kernel_liteos_m/issues/I45I9)
|
||||
* 修复中断操作接口头文件位置变更,导致的编译错误 ([013a953](https://gitee.com/openharmony/kernel_liteos_m/commits/013a953926ca7cefd8a2f7c74d23c36c49765b59)), closes [#I4665Z](https://gitee.com/openharmony/kernel_liteos_m/issues/I4665Z)
|
||||
* 修复文档链接失效问题 ([5d53c84](https://gitee.com/openharmony/kernel_liteos_m/commits/5d53c848124319a95f509b56ba001357c6dd8b05)), closes [#I4529I](https://gitee.com/openharmony/kernel_liteos_m/issues/I4529I)
|
||||
* 内核模块编译增加-Werror编译选项,且清除内核编译告警 ([3798091](https://gitee.com/openharmony/kernel_liteos_m/commits/3798091d87441ea445ec642de57e036dbbc8370e)), closes [#I46E6S](https://gitee.com/openharmony/kernel_liteos_m/issues/I46E6S)
|
||||
* 删除MQ内冗余的重复宏定义 ([6d72916](https://gitee.com/openharmony/kernel_liteos_m/commits/6d7291660ad04682f05850876f81dfd0cba8ea6b)), closes [#I3U5QQ](https://gitee.com/openharmony/kernel_liteos_m/issues/I3U5QQ)
|
||||
* 删除延时节点后,存在时间无法有效刷新的场景 ([0a87c04](https://gitee.com/openharmony/kernel_liteos_m/commits/0a87c04d58d11da2082470698de0760d72259533)), closes [#I45I9Y](https://gitee.com/openharmony/kernel_liteos_m/issues/I45I9Y)
|
||||
* 在内核初始化前期启动tick timer ([b3841ed](https://gitee.com/openharmony/kernel_liteos_m/commits/b3841ed1ddbfb3359c7a0ceca04fc0f645d440c3)), closes [#I410F0](https://gitee.com/openharmony/kernel_liteos_m/issues/I410F0)
|
||||
* 增加MPU功能的开关宏,默认关闭 ([9709d29](https://gitee.com/openharmony/kernel_liteos_m/commits/9709d29b87a3888412ffda586e16eba86adccfe7)), closes [#I3WE0](https://gitee.com/openharmony/kernel_liteos_m/issues/I3WE0)
|
||||
* 宏LOSCFG_SUPPORT_FATFS在fs.c中存在使用问题,导致无fatfs的情况下,编译出错 ([c1614ce](https://gitee.com/openharmony/kernel_liteos_m/commits/c1614ce2b4d4dfcda9532cbeeff25ad7a6558196)), closes [#I44](https://gitee.com/openharmony/kernel_liteos_m/issues/I44)
|
||||
* 延时队列为NULL时,返回的响应时间为64位最大值,导致无法更新tick timer的响应周期 ([bcec32e](https://gitee.com/openharmony/kernel_liteos_m/commits/bcec32e389634097102a203ee7e937ed3193c984)), closes [#I3W1](https://gitee.com/openharmony/kernel_liteos_m/issues/I3W1)
|
||||
* 支持smoke 测试用例 ([3ad5942](https://gitee.com/openharmony/kernel_liteos_m/commits/3ad5942301a1094a2c6b6ffee280cf09cfdb2a88)), closes [#I424](https://gitee.com/openharmony/kernel_liteos_m/issues/I424)
|
||||
* 新增函数regcomp,regfree和regexec支持 ([86d5544](https://gitee.com/openharmony/kernel_liteos_m/commits/86d5544a3fd5f41f7f2abe3b143e9f1dc9b430f8)), closes [#I3U9](https://gitee.com/openharmony/kernel_liteos_m/issues/I3U9)
|
||||
* 增加MPU功能的开关宏,默认关闭 ([9709d29](https://gitee.com/openharmony/kernel_liteos_m/commits/9709d29b87a3888412ffda586e16eba86adccfe7)), closes [#I3WE0S](https://gitee.com/openharmony/kernel_liteos_m/issues/I3WE0S)
|
||||
* 宏LOSCFG_SUPPORT_FATFS在fs.c中存在使用问题,导致无fatfs的情况下,编译出错 ([c1614ce](https://gitee.com/openharmony/kernel_liteos_m/commits/c1614ce2b4d4dfcda9532cbeeff25ad7a6558196)), closes [#I44XNR](https://gitee.com/openharmony/kernel_liteos_m/issues/I44XNR)
|
||||
* 延时队列为NULL时,返回的响应时间为64位最大值,导致无法更新tick timer的响应周期 ([bcec32e](https://gitee.com/openharmony/kernel_liteos_m/commits/bcec32e389634097102a203ee7e937ed3193c984)), closes [#I3W1LF](https://gitee.com/openharmony/kernel_liteos_m/issues/I3W1LF)
|
||||
* 支持smoke 测试用例 ([3ad5942](https://gitee.com/openharmony/kernel_liteos_m/commits/3ad5942301a1094a2c6b6ffee280cf09cfdb2a88)), closes [#I424RX](https://gitee.com/openharmony/kernel_liteos_m/issues/I424RX)
|
||||
* 新增函数regcomp,regfree和regexec支持 ([86d5544](https://gitee.com/openharmony/kernel_liteos_m/commits/86d5544a3fd5f41f7f2abe3b143e9f1dc9b430f8)), closes [#I3U9LE](https://gitee.com/openharmony/kernel_liteos_m/issues/I3U9LE)
|
||||
* 清理残留无效的trace代码 ([3c48951](https://gitee.com/openharmony/kernel_liteos_m/commits/3c489518576583ab6bf0d581810ef0a02b6ccd51)), closes [#I3ZMB4](https://gitee.com/openharmony/kernel_liteos_m/issues/I3ZMB4)
|
||||
* 解决arm9编译冲突问题 ([c1a6245](https://gitee.com/openharmony/kernel_liteos_m/commits/c1a624536887fef44fed37134638bf40191b9aae)), closes [#I420](https://gitee.com/openharmony/kernel_liteos_m/issues/I420)
|
||||
* 调度过程低概率触发OsSchedTaskEnQueue断言,导致系统异常 ([e5e9289](https://gitee.com/openharmony/kernel_liteos_m/commits/e5e9289a08cf1db71c09647b71a864f5a1f8a4a2)), closes [#I3VX9](https://gitee.com/openharmony/kernel_liteos_m/issues/I3VX9)
|
||||
* 调整hook类型和位置,方便调试 ([369320d](https://gitee.com/openharmony/kernel_liteos_m/commits/369320de3710486f252c55c522e8c06e19541b77)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_m/issues/I3)
|
||||
* 解决arm9编译冲突问题 ([c1a6245](https://gitee.com/openharmony/kernel_liteos_m/commits/c1a624536887fef44fed37134638bf40191b9aae)), closes [#I420PQ](https://gitee.com/openharmony/kernel_liteos_m/issues/I420PQ)
|
||||
* 调度过程低概率触发OsSchedTaskEnQueue断言,导致系统异常 ([e5e9289](https://gitee.com/openharmony/kernel_liteos_m/commits/e5e9289a08cf1db71c09647b71a864f5a1f8a4a2)), closes [#I3VX9Y](https://gitee.com/openharmony/kernel_liteos_m/issues/I3VX9Y)
|
||||
* 调整hook类型和位置,方便调试 ([369320d](https://gitee.com/openharmony/kernel_liteos_m/commits/369320de3710486f252c55c522e8c06e19541b77)), closes [#I3TGZS](https://gitee.com/openharmony/kernel_liteos_m/issues/I3TGZS)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add cmsis ThreadFlags support ([cea551e](https://gitee.com/openharmony/kernel_liteos_m/commits/cea551e99ea0da8eefbaa826de2f68813252fb83))
|
||||
* add deps to musl and securec ([bfa25fc](https://gitee.com/openharmony/kernel_liteos_m/commits/bfa25fcaa355c28a6139f683c4453f677e23abd7))
|
||||
* add file type support for LfsStat ([ceaed2d](https://gitee.com/openharmony/kernel_liteos_m/commits/ceaed2dc86de2ed242aab4dd02c1f34e064583b3)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_m/issues/I3)
|
||||
* add file type support for LfsStat ([ceaed2d](https://gitee.com/openharmony/kernel_liteos_m/commits/ceaed2dc86de2ed242aab4dd02c1f34e064583b3)), closes [#I3ZCDR](https://gitee.com/openharmony/kernel_liteos_m/issues/I3ZCDR)
|
||||
* add interface of dhcp_is_bound ([84a180d](https://gitee.com/openharmony/kernel_liteos_m/commits/84a180d585686cda693bf8c6ed6b86f7c5dd5eee)), closes [#I46W08](https://gitee.com/openharmony/kernel_liteos_m/issues/I46W08)
|
||||
* add L0 shell function ([97283b7](https://gitee.com/openharmony/kernel_liteos_m/commits/97283b7c5dd44b266e94fcf0f5d21e63ee1ec7e0))
|
||||
* add LOS_ListHeadInsert function ([430b186](https://gitee.com/openharmony/kernel_liteos_m/commits/430b186be7ec1554a29a6d509188eb877d796a7e)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_m/issues/I3)
|
||||
* add LOS_ListHeadInsert function ([430b186](https://gitee.com/openharmony/kernel_liteos_m/commits/430b186be7ec1554a29a6d509188eb877d796a7e)), closes [#I3TAQA](https://gitee.com/openharmony/kernel_liteos_m/issues/I3TAQA)
|
||||
* **kernel:** 补充获取最高、最低优先级接口 ([c24c38b](https://gitee.com/openharmony/kernel_liteos_m/commits/c24c38b084c13a2cdc5616f88bb5f63153600c28)), closes [#I42HM7](https://gitee.com/openharmony/kernel_liteos_m/issues/I42HM7)
|
||||
* L0 armquem 剥离工具链 ([67d7455](https://gitee.com/openharmony/kernel_liteos_m/commits/67d74559d1bb3820bd51da2e2bf43e41e1224314))
|
||||
* L0 支持Trace ([56c93a6](https://gitee.com/openharmony/kernel_liteos_m/commits/56c93a641b3c7a3d1ef9293ee3c95cccb559191f)), closes [#I41Y9](https://gitee.com/openharmony/kernel_liteos_m/issues/I41Y9)
|
||||
* L0 支持低功耗框架 ([558ce14](https://gitee.com/openharmony/kernel_liteos_m/commits/558ce14becab05102497afca90a43d89abaf5531)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_m/issues/I3)
|
||||
* L0 测试用例支持risc-v qemu 编译运行 ([2dd6c08](https://gitee.com/openharmony/kernel_liteos_m/commits/2dd6c080daab52eaf61e5eefe7b581190670e8a7)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_m/issues/I3)
|
||||
* **liteos_m:** support backtrace for riscv ([ca1792a](https://gitee.com/openharmony/kernel_liteos_m/commits/ca1792aa4b5a85ca4ea6e41b265858c6b24a6897)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_m/issues/I3)
|
||||
* los_memory.c代码重复率处理 ([475db62](https://gitee.com/openharmony/kernel_liteos_m/commits/475db62db1ac285fc6cab91f09af618870269580)), closes [#I44](https://gitee.com/openharmony/kernel_liteos_m/issues/I44)
|
||||
* M33平台支持GCC环境的Trustzone ([d469da2](https://gitee.com/openharmony/kernel_liteos_m/commits/d469da29c6d316640eaa7865f98ad8d6e2eb6d44)), closes [#I3Y85](https://gitee.com/openharmony/kernel_liteos_m/issues/I3Y85)
|
||||
* L0 支持Trace ([56c93a6](https://gitee.com/openharmony/kernel_liteos_m/commits/56c93a641b3c7a3d1ef9293ee3c95cccb559191f)), closes [#I41Y9Y](https://gitee.com/openharmony/kernel_liteos_m/issues/I41Y9Y)
|
||||
* L0 支持低功耗框架 ([558ce14](https://gitee.com/openharmony/kernel_liteos_m/commits/558ce14becab05102497afca90a43d89abaf5531)), closes [#I3UDNV](https://gitee.com/openharmony/kernel_liteos_m/issues/I3UDNV)
|
||||
* L0 测试用例支持risc-v qemu 编译运行 ([2dd6c08](https://gitee.com/openharmony/kernel_liteos_m/commits/2dd6c080daab52eaf61e5eefe7b581190670e8a7)), closes [#I3YILG](https://gitee.com/openharmony/kernel_liteos_m/issues/I3YILG)
|
||||
* **liteos_m:** support backtrace for riscv ([ca1792a](https://gitee.com/openharmony/kernel_liteos_m/commits/ca1792aa4b5a85ca4ea6e41b265858c6b24a6897)), closes [#I3RVXY](https://gitee.com/openharmony/kernel_liteos_m/issues/I3RVXY)
|
||||
* los_memory.c代码重复率处理 ([475db62](https://gitee.com/openharmony/kernel_liteos_m/commits/475db62db1ac285fc6cab91f09af618870269580)), closes [#I44WNU](https://gitee.com/openharmony/kernel_liteos_m/issues/I44WNU)
|
||||
* M33平台支持GCC环境的Trustzone ([d469da2](https://gitee.com/openharmony/kernel_liteos_m/commits/d469da29c6d316640eaa7865f98ad8d6e2eb6d44)), closes [#I3Y85I](https://gitee.com/openharmony/kernel_liteos_m/issues/I3Y85I)
|
||||
* provide getifaddrs for liteos_m ([948501a](https://gitee.com/openharmony/kernel_liteos_m/commits/948501ac73e7887f4585eca156ad760acc2a3b1f)), closes [#I400S5](https://gitee.com/openharmony/kernel_liteos_m/issues/I400S5)
|
||||
* risc-v gn 编译框架添加汇编编译选项 ([76dc343](https://gitee.com/openharmony/kernel_liteos_m/commits/76dc343c888ec4e65eba43feb49921111b144640)), closes [#I3YS5](https://gitee.com/openharmony/kernel_liteos_m/issues/I3YS5)
|
||||
* Support arm9 ([6d7c9df](https://gitee.com/openharmony/kernel_liteos_m/commits/6d7c9dfe597affb260e8bd74fa606b6d68c2b49a)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_m/issues/I3)
|
||||
* Support arm9 fiq swi mode and using system mode. ([97b5b08](https://gitee.com/openharmony/kernel_liteos_m/commits/97b5b0837be4b8df1381af29a6f650f243322840)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_m/issues/I3)
|
||||
* support non-continuous memory regions ([0facb0c](https://gitee.com/openharmony/kernel_liteos_m/commits/0facb0c0179f29a08b037655bbe691c98384dc84)), closes [#I43](https://gitee.com/openharmony/kernel_liteos_m/issues/I43)
|
||||
* 完善m核qemu串口驱动,支持shell输入 ([c4dc5ab](https://gitee.com/openharmony/kernel_liteos_m/commits/c4dc5ab0f8b5caae55efdbedf59ab07f5006f6c2)), closes [#I46N7](https://gitee.com/openharmony/kernel_liteos_m/issues/I46N7)
|
||||
* 按任务统计已经alloc的内存大小 ([53117f9](https://gitee.com/openharmony/kernel_liteos_m/commits/53117f9f47a8dd3023e83dc0cc0de224eab9719f)), closes [#I44](https://gitee.com/openharmony/kernel_liteos_m/issues/I44)
|
||||
* 支持native动态加载组件 ([d753834](https://gitee.com/openharmony/kernel_liteos_m/commits/d75383400efe5d9ca0ae4093e4f2e65fee03024b)), closes [#I418](https://gitee.com/openharmony/kernel_liteos_m/issues/I418)
|
||||
* 新增LOSCFG_BASE_CORE_TSK_SWITCH_HOOK 宏定义配置 ([39efd6f](https://gitee.com/openharmony/kernel_liteos_m/commits/39efd6fb30ee7dc9159811f5d37dffcdfe81bae0)), closes [#I40Q9](https://gitee.com/openharmony/kernel_liteos_m/issues/I40Q9)
|
||||
* risc-v gn 编译框架添加汇编编译选项 ([76dc343](https://gitee.com/openharmony/kernel_liteos_m/commits/76dc343c888ec4e65eba43feb49921111b144640)), closes [#I3YS5Y](https://gitee.com/openharmony/kernel_liteos_m/issues/I3YS5Y)
|
||||
* Support arm9 ([6d7c9df](https://gitee.com/openharmony/kernel_liteos_m/commits/6d7c9dfe597affb260e8bd74fa606b6d68c2b49a)), closes [#I3WLCN](https://gitee.com/openharmony/kernel_liteos_m/issues/I3WLCN)
|
||||
* Support arm9 fiq swi mode and using system mode. ([97b5b08](https://gitee.com/openharmony/kernel_liteos_m/commits/97b5b0837be4b8df1381af29a6f650f243322840)), closes [#I3WLCN](https://gitee.com/openharmony/kernel_liteos_m/issues/I3WLCN)
|
||||
* support non-continuous memory regions ([0facb0c](https://gitee.com/openharmony/kernel_liteos_m/commits/0facb0c0179f29a08b037655bbe691c98384dc84)), closes [#I43XOP](https://gitee.com/openharmony/kernel_liteos_m/issues/I43XOP)
|
||||
* 完善m核qemu串口驱动,支持shell输入 ([c4dc5ab](https://gitee.com/openharmony/kernel_liteos_m/commits/c4dc5ab0f8b5caae55efdbedf59ab07f5006f6c2)), closes [#I46N7F](https://gitee.com/openharmony/kernel_liteos_m/issues/I46N7F)
|
||||
* 按任务统计已经alloc的内存大小 ([53117f9](https://gitee.com/openharmony/kernel_liteos_m/commits/53117f9f47a8dd3023e83dc0cc0de224eab9719f)), closes [#I44WNU](https://gitee.com/openharmony/kernel_liteos_m/issues/I44WNU)
|
||||
* 支持native动态加载组件 ([d753834](https://gitee.com/openharmony/kernel_liteos_m/commits/d75383400efe5d9ca0ae4093e4f2e65fee03024b)), closes [#I418HJ](https://gitee.com/openharmony/kernel_liteos_m/issues/I418HJ)
|
||||
* 新增LOSCFG_BASE_CORE_TSK_SWITCH_HOOK 宏定义配置 ([39efd6f](https://gitee.com/openharmony/kernel_liteos_m/commits/39efd6fb30ee7dc9159811f5d37dffcdfe81bae0)), closes [#I40Q9O](https://gitee.com/openharmony/kernel_liteos_m/issues/I40Q9O)
|
||||
* 新增ROM/RAM分析工具 ([ee3403d](https://gitee.com/openharmony/kernel_liteos_m/commits/ee3403deaf24dc612b51354f31f795fb0b9a49b5))
|
||||
* 补充fs相关函数用例 ([2a95af5](https://gitee.com/openharmony/kernel_liteos_m/commits/2a95af5bf1b412de27b4518d0abf7c335366d4d7)), closes [#I3UQ4](https://gitee.com/openharmony/kernel_liteos_m/issues/I3UQ4)
|
||||
* 解决fclose等函数工具链重定义问题 ([b244ad4](https://gitee.com/openharmony/kernel_liteos_m/commits/b244ad4ad0da8d151b69071fdd6db808c91f85a5)), closes [#I3UG6](https://gitee.com/openharmony/kernel_liteos_m/issues/I3UG6)
|
||||
* 补充fs相关函数用例 ([2a95af5](https://gitee.com/openharmony/kernel_liteos_m/commits/2a95af5bf1b412de27b4518d0abf7c335366d4d7)), closes [#I3UQ4F](https://gitee.com/openharmony/kernel_liteos_m/issues/I3UQ4F)
|
||||
* 解决fclose等函数工具链重定义问题 ([b244ad4](https://gitee.com/openharmony/kernel_liteos_m/commits/b244ad4ad0da8d151b69071fdd6db808c91f85a5)), closes [#I3UG6O](https://gitee.com/openharmony/kernel_liteos_m/issues/I3UG6O)
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
10
README.md
10
README.md
@@ -78,7 +78,7 @@ The OpenHarmony LiteOS-M kernel build system is a modular build system based on
|
||||
|
||||
### Setting Up the Environment
|
||||
|
||||
Before setting up the environment for a development board, you must set up the basic system environment for OpenHarmony first. The basic system environment includes the OpenHarmony build environment and development environment. For details, see [Setting Up Development Environment](https://gitee.com/openharmony/docs/blob/HEAD/en/device-dev/quick-start/quickstart-lite-env-setup.md).
|
||||
Before setting up the environment for a development board, you must set up the basic system environment for OpenHarmony first. The basic system environment includes the OpenHarmony build environment and development environment. For details, see [Setting Up Development Environment](https://gitee.com/openharmony/docs/blob/master/en/device-dev/quick-start/Readme-EN.md).
|
||||
|
||||
### Obtaining the OpenHarmony Source Code
|
||||
|
||||
@@ -108,7 +108,7 @@ The LiteOS-M kernel porting projects for specific development boards are provide
|
||||
|
||||
## Contribution<a name="section1371123476307"></a>
|
||||
|
||||
[How to involve](https://gitee.com/openharmony/docs/blob/HEAD/en/contribute/contribution.md)
|
||||
[How to involve](https://gitee.com/openharmony/docs/blob/master/en/contribute/how-to-contribute.md)
|
||||
|
||||
[Commit message spec](https://gitee.com/openharmony/kernel_liteos_m/wikis/Commit%20message%E8%A7%84%E8%8C%83)
|
||||
|
||||
@@ -116,12 +116,10 @@ The LiteOS-M kernel porting projects for specific development boards are provide
|
||||
|
||||
How to contribute a chip based on Liteos-M kernel:
|
||||
|
||||
[ Board-Level Directory Specifications](https://gitee.com/openharmony/docs/blob/HEAD/en/device-dev/porting/porting-chip-board-overview.md)
|
||||
|
||||
[Mini System SoC Porting Guide](https://gitee.com/openharmony/docs/blob/HEAD/en/device-dev/porting/porting-minichip.md)
|
||||
[Mini System SoC Porting Guide](https://gitee.com/openharmony/docs/blob/master/en/device-dev/porting/Readme-EN.md)
|
||||
|
||||
## Repositories Involved<a name="section1371113476307"></a>
|
||||
|
||||
[Kernel Subsystem](https://gitee.com/openharmony/docs/blob/HEAD/en/readme/kernel-subsystem.md)
|
||||
[Kernel Subsystem](https://gitee.com/openharmony/docs/blob/master/en/readme/kernel.md)
|
||||
|
||||
[kernel\_liteos\_m](https://gitee.com/openharmony/kernel_liteos_m/blob/master/README.md)
|
||||
|
||||
@@ -115,11 +115,7 @@ LiteOS-M内核移植的具体开发板的工程由社区开发者提供,可以
|
||||
|
||||
如何基于Liteos-M内核贡献一款芯片:
|
||||
|
||||
[板级目录规范](https://gitee.com/openharmony/docs/blob/HEAD/zh-cn/device-dev/porting/porting-chip-board-overview.md)
|
||||
|
||||
[轻量系统芯片移植指导](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/porting/porting-minichip.md)
|
||||
|
||||
[轻量系统芯片移植案例](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/porting/porting-minichip-cases.md)
|
||||
[轻量系统芯片移植指导](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/porting/Readme-CN.md)
|
||||
|
||||
## 相关仓<a name="section1371113476307"></a>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2020, Huawei Technologies Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2023 Huawei Device Co., Ltd. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
@@ -43,6 +43,10 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#if (LOSCFG_PLATFORM_HWI_WITH_ARG == 0)
|
||||
#error "LOSCFG_PLATFORM_HWI_WITH_ARG must be set to 1 !!!"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup los_arch_interrupt
|
||||
* Define the type of a hardware interrupt vector table function.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2020, Huawei Technologies Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2023 Huawei Device Co., Ltd. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
@@ -167,6 +167,7 @@ LITE_OS_SEC_TEXT UINT32 ArchHwiCreate(HWI_HANDLE_T hwiNum,
|
||||
HWI_PROC_FUNC hwiHandler,
|
||||
HwiIrqParam *irqParam)
|
||||
{
|
||||
(VOID)hwiMode;
|
||||
UINT32 intSave;
|
||||
|
||||
if (hwiHandler == NULL) {
|
||||
@@ -283,7 +284,7 @@ STATIC VOID ExcInfoDisplayContext(const LosExcInfo *exc)
|
||||
ExcBackTrace(taskContext->s0);
|
||||
}
|
||||
|
||||
STATIC VOID ExcInfoDisplay(const LosExcContext *excBufAddr)
|
||||
STATIC VOID ExcInfoDisplay(VOID)
|
||||
{
|
||||
PRINTK("\nException Information \n");
|
||||
|
||||
@@ -305,6 +306,11 @@ STATIC VOID ExcInfoDisplay(const LosExcContext *excBufAddr)
|
||||
|
||||
WEAK UINT32 HalUnalignedAccessFix(UINTPTR mcause, UINTPTR mepc, UINTPTR mtval, VOID *sp)
|
||||
{
|
||||
(VOID)mcause;
|
||||
(VOID)mepc;
|
||||
(VOID)mtval;
|
||||
(VOID)sp;
|
||||
|
||||
/* Unaligned access fixes are not supported by default */
|
||||
PRINTK("Unaligned access fixes are not supported by default!\n");
|
||||
return LOS_NOK;
|
||||
@@ -329,7 +335,7 @@ VOID HalExcEntry(const LosExcContext *excBufAddr)
|
||||
}
|
||||
}
|
||||
|
||||
ExcInfoDisplay(excBufAddr);
|
||||
ExcInfoDisplay();
|
||||
|
||||
if (LOS_TaskIsRunning()) {
|
||||
PRINTK("----------------All Task information ------------\n");
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"name": "liteos_m",
|
||||
"subsystem": "kernel",
|
||||
"syscap": [
|
||||
"SystemCapability.Kernel.liteos-m"
|
||||
"SystemCapability.Kernel.Liteos-M"
|
||||
],
|
||||
"features": [],
|
||||
"adapted_system_type": [
|
||||
@@ -36,7 +36,7 @@
|
||||
],
|
||||
"rom": "300KB",
|
||||
"ram": "100KB",
|
||||
"deps": {
|
||||
"external_deps": {
|
||||
"components": [
|
||||
"utils_lite"
|
||||
],
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#define _GNU_SOURCE 1
|
||||
#include "lfs_adapter.h"
|
||||
#include "los_config.h"
|
||||
#include "los_fs.h"
|
||||
#include "vfs_files.h"
|
||||
#include "vfs_operations.h"
|
||||
#include "vfs_partition.h"
|
||||
|
||||
@@ -41,14 +41,14 @@ kernel_module(module_name) {
|
||||
]
|
||||
|
||||
include_dirs = [
|
||||
"//kernel/liteos_m/kernel/arch/include",
|
||||
"//kernel/liteos_m/kernel/include",
|
||||
"//kernel/liteos_m/utils",
|
||||
"$LITEOSTOPDIR/kernel/arch/include",
|
||||
"$LITEOSTOPDIR/kernel/include",
|
||||
"$LITEOSTOPDIR/utils",
|
||||
"../",
|
||||
".",
|
||||
]
|
||||
|
||||
deps = [ "//kernel/liteos_m/kal" ]
|
||||
deps = [ "$LITEOSTOPDIR/kal" ]
|
||||
configs += [ "$LITEOSTOPDIR:warn_config" ]
|
||||
if (!defined(LOSCFG_COMPILER_ICCARM)) {
|
||||
cflags = [ "-Wno-parentheses" ]
|
||||
|
||||
@@ -125,7 +125,7 @@ int ip6addr_aton(const char *cp, ip6_addr_t *addr)
|
||||
int squash_pos = ipv6_blocks;
|
||||
int i;
|
||||
const unsigned char *sc = (const unsigned char *)cp;
|
||||
const char *ss = cp-1;
|
||||
const unsigned char *ss = (const unsigned char *)(cp - 1);
|
||||
|
||||
for (; ; sc++) {
|
||||
if (current_block_index >= ipv6_blocks) {
|
||||
@@ -142,7 +142,7 @@ int ip6addr_aton(const char *cp, ip6_addr_t *addr)
|
||||
break;
|
||||
} else if (*sc == ':') {
|
||||
if (sc - ss == 1) {
|
||||
if (sc != cp || sc[1] != ':') {
|
||||
if (sc != (const unsigned char *)cp || sc[1] != ':') {
|
||||
return 0; // address begins with a single ':' or contains ":::"
|
||||
} // else address begins with one valid "::"
|
||||
} else {
|
||||
@@ -163,7 +163,7 @@ int ip6addr_aton(const char *cp, ip6_addr_t *addr)
|
||||
#if LWIP_IPV4
|
||||
} else if (*sc == '.' && current_block_index < ipv6_blocks - 1) {
|
||||
ip4_addr_t ip4;
|
||||
int ret = ip4addr_aton(ss+1, &ip4);
|
||||
int ret = ip4addr_aton((const char *)(ss + 1), &ip4);
|
||||
if (!ret) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ struct ifconfig_option {
|
||||
unsigned char ethaddr[6];
|
||||
u16_t mtu;
|
||||
/* when using telnet, print to the telnet socket will result in system */
|
||||
/* deadlock. So we cahe the prinf data to a buf, and when the tcpip */
|
||||
/* deadlock. So we cache the prinf data to a buf, and when the tcpip */
|
||||
/* callback returns, then print the data out to the telnet socket */
|
||||
sys_sem_t cb_completed;
|
||||
char cb_print_buf[PRINT_BUF_LEN];
|
||||
@@ -319,7 +319,7 @@ LWIP_STATIC int OsPingFunc(u32_t *parg)
|
||||
u32_t succ_cnt = 0;
|
||||
u32_t failed_cnt = 0;
|
||||
struct timespec start, end;
|
||||
long timout_ms;
|
||||
long timeout_ms;
|
||||
struct pollfd pfd;
|
||||
long rtt;
|
||||
int ret = 0;
|
||||
@@ -431,17 +431,17 @@ LWIP_STATIC int OsPingFunc(u32_t *parg)
|
||||
((ICMPH_TYPE(iecho_resp) == ICMP_ECHO) && (iphdr_resp->src.addr == to.sin_addr.s_addr))) {
|
||||
/* second type timeout event */
|
||||
(void)clock_gettime(CLOCK_MONOTONIC_RAW, &end);
|
||||
timout_ms = ((end.tv_sec - start.tv_sec) * OS_SYS_MS_PER_SECOND + \
|
||||
timeout_ms = ((end.tv_sec - start.tv_sec) * OS_SYS_MS_PER_SECOND + \
|
||||
(end.tv_nsec - start.tv_nsec) / OS_SYS_NS_PER_MS);
|
||||
timout_ms = LWIP_SHELL_CMD_PING_TIMEOUT - timout_ms;
|
||||
timeout_ms = LWIP_SHELL_CMD_PING_TIMEOUT - timeout_ms;
|
||||
} else {
|
||||
timout_ms = 0;
|
||||
timeout_ms = 0;
|
||||
break;
|
||||
}
|
||||
} while (timout_ms >= 0);
|
||||
} while (timeout_ms >= 0);
|
||||
|
||||
/* all timeout events are true timeout */
|
||||
if ((timout_ms < 0) || (timeout_flag == TRUE)) {
|
||||
if ((timeout_ms < 0) || (timeout_flag == TRUE)) {
|
||||
failed_cnt++;
|
||||
i++;
|
||||
PRINTK("\nPing: destination unreachable ...");
|
||||
|
||||
@@ -19,6 +19,11 @@ config SHELL_PRIO
|
||||
range 1 31
|
||||
depends on SHELL
|
||||
|
||||
config SHELL_STACK_SIZE
|
||||
int "Shell Task Stack Size"
|
||||
default 4096
|
||||
depends on SHELL
|
||||
|
||||
config SHELL_LK
|
||||
bool "Enable Shell lk"
|
||||
default y
|
||||
|
||||
@@ -258,7 +258,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 LosShellInit(VOID)
|
||||
}
|
||||
|
||||
task1.pfnTaskEntry = (TSK_ENTRY_FUNC)ShellTaskEntry;
|
||||
task1.uwStackSize = 0x1000;
|
||||
task1.uwStackSize = LOSCFG_SHELL_STACK_SIZE;
|
||||
task1.pcName = "ShellTaskEntry";
|
||||
task1.usTaskPrio = LOSCFG_SHELL_PRIO;
|
||||
ret = LOS_TaskCreate(&taskID1, &task1);
|
||||
|
||||
@@ -49,6 +49,7 @@ typedef struct {
|
||||
int sem_init(sem_t *sem, int shared, unsigned value);
|
||||
int sem_destroy(sem_t *sem);
|
||||
int sem_wait(sem_t *sem);
|
||||
int sem_trywait(sem_t *sem);
|
||||
int sem_post(sem_t *sem);
|
||||
int sem_timedwait(sem_t *__restrict sem, const struct timespec *__restrict timeout);
|
||||
int sem_getvalue(sem_t *__restrict sem, int *__restrict currVal);
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
#define _POSIX_THREAD_PRIORITY_SCHEDULING
|
||||
#define _UNIX98_THREAD_MUTEX_ATTRIBUTES
|
||||
#define _POSIX_THREAD_PROCESS_SHARED
|
||||
#define _POSIX_PRIORITY_SCHEDULING
|
||||
|
||||
#include_next <sys/features.h>
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ kernel_module(module_name) {
|
||||
sources = [
|
||||
"src/errno.c",
|
||||
"src/libc.c",
|
||||
"src/map_error.c",
|
||||
]
|
||||
configs += [ "$LITEOSTOPDIR:warn_config" ]
|
||||
|
||||
|
||||
100
kal/posix/src/map_error.c
Normal file
100
kal/posix/src/map_error.c
Normal file
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* Copyright (c) 2023-2023 Huawei Device Co., Ltd. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
|
||||
* to endorse or promote products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "los_mux.h"
|
||||
#include "los_queue.h"
|
||||
#include "los_sem.h"
|
||||
#include "los_task.h"
|
||||
#include <errno.h>
|
||||
|
||||
INT32 map_errno(UINT32 err)
|
||||
{
|
||||
if (err == LOS_OK) {
|
||||
return 0;
|
||||
}
|
||||
switch (err) {
|
||||
case LOS_ERRNO_QUEUE_INVALID:
|
||||
case LOS_ERRNO_QUEUE_WRITE_PTR_NULL:
|
||||
case LOS_ERRNO_QUEUE_WRITESIZE_ISZERO:
|
||||
case LOS_ERRNO_QUEUE_SIZE_TOO_BIG:
|
||||
case LOS_ERRNO_QUEUE_CREAT_PTR_NULL:
|
||||
case LOS_ERRNO_QUEUE_PARA_ISZERO:
|
||||
case LOS_ERRNO_QUEUE_WRITE_SIZE_TOO_BIG:
|
||||
case LOS_ERRNO_TSK_ID_INVALID:
|
||||
case LOS_ERRNO_TSK_PTR_NULL:
|
||||
case LOS_ERRNO_TSK_NAME_EMPTY:
|
||||
case LOS_ERRNO_TSK_ENTRY_NULL:
|
||||
case LOS_ERRNO_TSK_PRIOR_ERROR:
|
||||
case LOS_ERRNO_TSK_STKSZ_TOO_LARGE:
|
||||
case LOS_ERRNO_TSK_STKSZ_TOO_SMALL:
|
||||
case LOS_ERRNO_TSK_NOT_CREATED:
|
||||
case OS_ERROR:
|
||||
case LOS_ERRNO_SEM_INVALID:
|
||||
case LOS_ERRNO_SEM_UNAVAILABLE:
|
||||
errno = EINVAL;
|
||||
break;
|
||||
case LOS_ERRNO_QUEUE_ISFULL:
|
||||
case LOS_ERRNO_QUEUE_ISEMPTY:
|
||||
errno = EAGAIN;
|
||||
break;
|
||||
case LOS_ERRNO_QUEUE_CREATE_NO_MEMORY:
|
||||
case LOS_ERRNO_TSK_TCB_UNAVAILABLE:
|
||||
case LOS_ERRNO_SEM_ALL_BUSY:
|
||||
errno = ENOSPC;
|
||||
break;
|
||||
case LOS_ERRNO_QUEUE_TIMEOUT:
|
||||
case LOS_ERRNO_SEM_TIMEOUT:
|
||||
errno = ETIMEDOUT;
|
||||
break;
|
||||
case LOS_ERRNO_QUEUE_CB_UNAVAILABLE:
|
||||
errno = ENFILE;
|
||||
break;
|
||||
case LOS_ERRNO_QUEUE_READ_IN_INTERRUPT:
|
||||
case LOS_ERRNO_QUEUE_WRITE_IN_INTERRUPT:
|
||||
case LOS_ERRNO_SEM_PEND_INTERR:
|
||||
errno = EINTR;
|
||||
break;
|
||||
case LOS_ERRNO_TSK_NO_MEMORY:
|
||||
case LOS_ERRNO_SEM_OVERFLOW:
|
||||
errno = ENOMEM;
|
||||
break;
|
||||
case LOS_ERRNO_SEM_PENDED:
|
||||
errno = EBUSY;
|
||||
break;
|
||||
case LOS_ERRNO_SEM_PEND_IN_LOCK:
|
||||
errno = EPERM;
|
||||
break;
|
||||
default:
|
||||
errno = EINVAL;
|
||||
break;
|
||||
}
|
||||
return errno;
|
||||
}
|
||||
|
||||
48
kal/posix/src/map_error.h
Normal file
48
kal/posix/src/map_error.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 2023-2023 Huawei Device Co., Ltd. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
|
||||
* to endorse or promote products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _POSIX_MAP_ERROR_H
|
||||
#define _POSIX_MAP_ERROR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
INT32 map_errno(UINT32 err);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "los_config.h"
|
||||
#include "los_task.h"
|
||||
#include "los_debug.h"
|
||||
#include "map_error.h"
|
||||
|
||||
#define PTHREAD_DEFAULT_NAME "pthread"
|
||||
#define PTHREAD_DEFAULT_NAME_LEN 8
|
||||
@@ -207,9 +208,10 @@ int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (LOS_TaskCreateOnly(&taskID, &taskInitParam) != LOS_OK) {
|
||||
ret = LOS_TaskCreateOnly(&taskID, &taskInitParam);
|
||||
if (ret != LOS_OK) {
|
||||
free((VOID *)(UINTPTR)taskInitParam.uwArg);
|
||||
return EINVAL;
|
||||
return map_errno(ret);
|
||||
}
|
||||
|
||||
PthreadData *pthreadData = (PthreadData *)taskInitParam.uwArg;
|
||||
@@ -221,10 +223,10 @@ int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
|
||||
LOS_ListAdd(&g_pthreadListHead, &pthreadData->threadList);
|
||||
LOS_IntRestore(intSave);
|
||||
|
||||
(void)LOS_TaskResume(taskID);
|
||||
|
||||
*thread = (pthread_t)taskID;
|
||||
|
||||
(void)LOS_TaskResume(taskID);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -303,7 +303,6 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
|
||||
PRINT_ERR("%s: %d failed\n", __FUNCTION__, __LINE__);
|
||||
}
|
||||
|
||||
(VOID)LOS_EventClear(&(cond->event), 0);
|
||||
ret = (INT32)LOS_EventRead(&(cond->event), 0x0f, LOS_WAITMODE_OR | LOS_WAITMODE_CLR, (UINT32)absTicks);
|
||||
|
||||
if (pthread_mutex_lock(mutex) != 0) {
|
||||
|
||||
@@ -679,6 +679,14 @@ extern UINT8 *m_aucSysMem0;
|
||||
#define LOSCFG_KERNEL_PM_IDLE 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration item to set shell stack size.
|
||||
*/
|
||||
#ifndef LOSCFG_SHELL_STACK_SIZE
|
||||
#define LOSCFG_SHELL_STACK_SIZE 0x1000
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
|
||||
@@ -114,6 +114,7 @@ LITE_OS_SEC_TEXT_INIT VOID LOS_Panic(const CHAR *fmt, ...)
|
||||
va_start(ap, fmt);
|
||||
PRINT_ERR(fmt, ap);
|
||||
va_end(ap);
|
||||
OsDoExcHook(EXC_PANIC);
|
||||
#if (LOSCFG_BACKTRACE_TYPE != 0)
|
||||
LOS_BackTrace();
|
||||
#endif
|
||||
|
||||
@@ -256,9 +256,9 @@ UINT32 OsGetTaskWaterLine(UINT32 taskID)
|
||||
}
|
||||
|
||||
#if (LOSCFG_BASE_CORE_CPUP == 1)
|
||||
LITE_OS_SEC_TEXT_MINOR UINT32 OsGetAllTskCpupInfo(CPUP_INFO_S **cpuLessOneSec,
|
||||
CPUP_INFO_S **cpuTenSec,
|
||||
CPUP_INFO_S **cpuOneSec)
|
||||
STATIC UINT32 GetAllTskCpupInfo(CPUP_INFO_S **cpuLessOneSec,
|
||||
CPUP_INFO_S **cpuTenSec,
|
||||
CPUP_INFO_S **cpuOneSec)
|
||||
{
|
||||
if ((cpuLessOneSec == NULL) || (cpuTenSec == NULL) || (cpuOneSec == NULL)) {
|
||||
return OS_ERROR;
|
||||
@@ -304,7 +304,26 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsGetAllTskCpupInfo(CPUP_INFO_S **cpuLessOneSec,
|
||||
}
|
||||
#endif
|
||||
|
||||
LITE_OS_SEC_TEXT_MINOR VOID OsPrintAllTskInfoHeader(VOID)
|
||||
STATIC VOID PrintTskInfo(const LosTaskCB *taskCB)
|
||||
{
|
||||
UINT32 semID;
|
||||
|
||||
if (taskCB->taskStatus & OS_TASK_STATUS_EXIT) {
|
||||
PRINTK("%4u%9u%10s%#10x%#10x%#11x%#11x%#10x%#7x",
|
||||
taskCB->taskID, taskCB->priority, OsConvertTskStatus(taskCB->taskStatus),
|
||||
taskCB->stackSize, 0, 0, 0, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
semID = (taskCB->taskSem == NULL) ? OS_NULL_SHORT : (((LosSemCB *)taskCB->taskSem)->semID);
|
||||
PRINTK("%4u%9u%10s%#10x%#10x%#11x%#11x%#10x%#7x",
|
||||
taskCB->taskID, taskCB->priority, OsConvertTskStatus(taskCB->taskStatus),
|
||||
taskCB->stackSize, OsGetTaskWaterLine(taskCB->taskID),
|
||||
(UINT32)(UINTPTR)taskCB->stackPointer, taskCB->topOfStack, taskCB->eventMask, semID);
|
||||
return;
|
||||
}
|
||||
|
||||
STATIC VOID PrintTskInfoHeader(VOID)
|
||||
{
|
||||
PRINTK("\r\n TID Priority Status StackSize WaterLine StackPoint TopOfStack EventMask SemID");
|
||||
#if (LOSCFG_TASK_MEM_USED == 1)
|
||||
@@ -341,7 +360,6 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsGetAllTskInfo(VOID)
|
||||
#if (LOSCFG_KERNEL_PRINTF != 0)
|
||||
LosTaskCB *taskCB = (LosTaskCB *)NULL;
|
||||
UINT32 loopNum;
|
||||
UINT32 semID;
|
||||
#if (LOSCFG_BASE_CORE_CPUP == 1)
|
||||
CPUP_INFO_S *cpuLessOneSec = (CPUP_INFO_S *)NULL;
|
||||
CPUP_INFO_S *cpuTenSec = (CPUP_INFO_S *)NULL;
|
||||
@@ -354,12 +372,12 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsGetAllTskInfo(VOID)
|
||||
#endif
|
||||
|
||||
#if (LOSCFG_BASE_CORE_CPUP == 1)
|
||||
if (OsGetAllTskCpupInfo(&cpuLessOneSec, &cpuTenSec, &cpuOneSec) != LOS_OK) {
|
||||
if (GetAllTskCpupInfo(&cpuLessOneSec, &cpuTenSec, &cpuOneSec) != LOS_OK) {
|
||||
return OS_ERROR;
|
||||
}
|
||||
#endif
|
||||
#endif /* LOSCFG_BASE_CORE_CPUP */
|
||||
|
||||
OsPrintAllTskInfoHeader();
|
||||
PrintTskInfoHeader();
|
||||
|
||||
for (loopNum = 0; loopNum < g_taskMaxNum; loopNum++) {
|
||||
taskCB = (((LosTaskCB *)g_taskCBArray) + loopNum);
|
||||
@@ -367,11 +385,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsGetAllTskInfo(VOID)
|
||||
continue;
|
||||
}
|
||||
|
||||
semID = (taskCB->taskSem == NULL) ? OS_NULL_SHORT : (((LosSemCB *)taskCB->taskSem)->semID);
|
||||
PRINTK("%4u%9u%10s%#10x%#10x%#11x%#11x%#10x%#7x",
|
||||
taskCB->taskID, taskCB->priority, OsConvertTskStatus(taskCB->taskStatus),
|
||||
taskCB->stackSize, OsGetTaskWaterLine(taskCB->taskID),
|
||||
(UINT32)(UINTPTR)taskCB->stackPointer, taskCB->topOfStack, taskCB->eventMask, semID);
|
||||
PrintTskInfo(taskCB);
|
||||
#if (LOSCFG_TASK_MEM_USED == 1)
|
||||
PRINTK("%#10x", g_taskMemUsed[loopNum]);
|
||||
#endif
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/config.gni")
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
config("include") {
|
||||
@@ -36,6 +37,8 @@ config("include") {
|
||||
if (defined(LOSCFG_KERNEL_TEST_FULL)) {
|
||||
defines += [ "LOS_KERNEL_TEST_FULL=1" ]
|
||||
}
|
||||
cflags = warn_config_cflags
|
||||
asmflags = warn_config_asmflags
|
||||
}
|
||||
|
||||
module_switch = defined(LOSCFG_TEST)
|
||||
|
||||
@@ -26,8 +26,10 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("test_cmsis") {
|
||||
sources = [ "cmsis_func_test.c" ]
|
||||
|
||||
configs += [ "//kernel/liteos_m/testsuites:include" ]
|
||||
configs += [ "$LITEOSTOPDIR/testsuites:include" ]
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("test_atomic") {
|
||||
sources = [
|
||||
"it_los_atomic.c",
|
||||
@@ -43,5 +45,5 @@ static_library("test_atomic") {
|
||||
"it_los_atomic_011.c",
|
||||
]
|
||||
include_dirs = [ "." ]
|
||||
configs += [ "//kernel/liteos_m/testsuites:include" ]
|
||||
configs += [ "$LITEOSTOPDIR/testsuites:include" ]
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("test_event") {
|
||||
sources = [
|
||||
"It_los_event.c",
|
||||
@@ -74,5 +76,5 @@ static_library("test_event") {
|
||||
"It_los_event_043.c",
|
||||
]
|
||||
|
||||
configs += [ "//kernel/liteos_m/testsuites:include" ]
|
||||
configs += [ "$LITEOSTOPDIR/testsuites:include" ]
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("test_hwi") {
|
||||
sources = [
|
||||
"It_los_hwi.c",
|
||||
@@ -72,5 +74,5 @@ static_library("test_hwi") {
|
||||
"llt_los_hwi_035.c",
|
||||
]
|
||||
|
||||
configs += [ "//kernel/liteos_m/testsuites:include" ]
|
||||
configs += [ "$LITEOSTOPDIR/testsuites:include" ]
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("test_lmk") {
|
||||
sources = [
|
||||
"It_los_lmk.c",
|
||||
@@ -35,7 +37,7 @@ static_library("test_lmk") {
|
||||
"It_los_lmk_004.c",
|
||||
]
|
||||
|
||||
include_dirs = [ "//kernel/liteos_m/components/lmk" ]
|
||||
include_dirs = [ "$LITEOSTOPDIR/components/lmk" ]
|
||||
|
||||
configs += [ "//kernel/liteos_m/testsuites:include" ]
|
||||
configs += [ "$LITEOSTOPDIR/testsuites:include" ]
|
||||
}
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("test_lms") {
|
||||
sources = [
|
||||
@@ -74,5 +76,5 @@ static_library("test_lms") {
|
||||
]
|
||||
}
|
||||
|
||||
configs += [ "//kernel/liteos_m/testsuites:include" ]
|
||||
configs += [ "$LITEOSTOPDIR/testsuites:include" ]
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("test_mem") {
|
||||
sources = [
|
||||
"It_los_mem_001.c",
|
||||
@@ -61,5 +63,5 @@ static_library("test_mem") {
|
||||
"it_los_mem.c",
|
||||
]
|
||||
|
||||
configs += [ "//kernel/liteos_m/testsuites:include" ]
|
||||
configs += [ "$LITEOSTOPDIR/testsuites:include" ]
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("test_mux") {
|
||||
sources = [
|
||||
"It_los_mutex_001.c",
|
||||
@@ -64,5 +66,5 @@ static_library("test_mux") {
|
||||
"It_los_mux.c",
|
||||
]
|
||||
|
||||
configs += [ "//kernel/liteos_m/testsuites:include" ]
|
||||
configs += [ "$LITEOSTOPDIR/testsuites:include" ]
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("test_pm") {
|
||||
sources = [
|
||||
"It_los_pm.c",
|
||||
@@ -34,7 +36,7 @@ static_library("test_pm") {
|
||||
"It_los_pm_003.c",
|
||||
]
|
||||
|
||||
include_dirs = [ "//kernel/liteos_m/components/power" ]
|
||||
include_dirs = [ "$LITEOSTOPDIR/components/power" ]
|
||||
|
||||
configs += [ "//kernel/liteos_m/testsuites:include" ]
|
||||
configs += [ "$LITEOSTOPDIR/testsuites:include" ]
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("test_queue") {
|
||||
sources = [
|
||||
"It_los_queue.c",
|
||||
@@ -172,5 +174,5 @@ static_library("test_queue") {
|
||||
"Llt_los_queue_001.c",
|
||||
]
|
||||
|
||||
configs += [ "//kernel/liteos_m/testsuites:include" ]
|
||||
configs += [ "$LITEOSTOPDIR/testsuites:include" ]
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ static UINT32 Testcase(VOID)
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
CHAR buff3[QUEUE_SHORT_BUFFER_LENGTH] = {0};
|
||||
|
||||
ret = LOS_QueueCreateStatic("Q1", QUEUE_BASE_NUM, &g_testQueueID01, buff3, 0, QUEUE_BASE_MSGSIZE);
|
||||
ret = LOS_QueueCreateStatic("Q1", QUEUE_BASE_NUM, &g_testQueueID01, (UINT8 *)buff3, 0, QUEUE_BASE_MSGSIZE);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWrite(g_testQueueID01, &buff1, QUEUE_BASE_MSGSIZE, 0);
|
||||
|
||||
@@ -43,7 +43,7 @@ static UINT32 Testcase(VOID)
|
||||
|
||||
g_testQueueID01 = QUEUW_INVALID_VALUE;
|
||||
|
||||
ret = LOS_QueueCreateStatic("Q1", QUEUE_BASE_NUM, &g_testQueueID01, buff3, 0, 0);
|
||||
ret = LOS_QueueCreateStatic("Q1", QUEUE_BASE_NUM, &g_testQueueID01, (UINT8 *)buff3, 0, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_PARA_ISZERO, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWrite(g_testQueueID01, &buff1, QUEUE_BASE_MSGSIZE, 0);
|
||||
|
||||
@@ -39,7 +39,7 @@ static UINT32 Testcase(VOID)
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
CHAR buff3[QUEUE_SHORT_BUFFER_LENGTH] = {0};
|
||||
|
||||
ret = LOS_QueueCreateStatic("Q1", QUEUE_BASE_NUM, &g_testQueueID01, buff3, 0, 1);
|
||||
ret = LOS_QueueCreateStatic("Q1", QUEUE_BASE_NUM, &g_testQueueID01, (UINT8 *)buff3, 0, 1);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWrite(g_testQueueID01, &buff1, QUEUE_BASE_MSGSIZE, 0);
|
||||
|
||||
@@ -43,7 +43,7 @@ static UINT32 Testcase(VOID)
|
||||
|
||||
g_testQueueID01 = QUEUW_INVALID_VALUE;
|
||||
|
||||
ret = LOS_QueueCreateStatic("Q1", QUEUE_BASE_NUM, NULL, buff3, 0, QUEUE_BASE_MSGSIZE);
|
||||
ret = LOS_QueueCreateStatic("Q1", QUEUE_BASE_NUM, NULL, (UINT8 *)buff3, 0, QUEUE_BASE_MSGSIZE);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_CREAT_PTR_NULL, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWrite(g_testQueueID01, &buff1, QUEUE_BASE_MSGSIZE, 0);
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("test_sem") {
|
||||
sources = [
|
||||
"It_los_sem.c",
|
||||
@@ -75,5 +77,5 @@ static_library("test_sem") {
|
||||
"it_los_sem_043.c",
|
||||
]
|
||||
|
||||
configs += [ "//kernel/liteos_m/testsuites:include" ]
|
||||
configs += [ "$LITEOSTOPDIR/testsuites:include" ]
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("test_signal") {
|
||||
sources = [
|
||||
"It_los_signal.c",
|
||||
@@ -36,5 +38,5 @@ static_library("test_signal") {
|
||||
"It_los_signal_005.c",
|
||||
]
|
||||
|
||||
configs += [ "//kernel/liteos_m/testsuites:include" ]
|
||||
configs += [ "$LITEOSTOPDIR/testsuites:include" ]
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("test_swtmr") {
|
||||
sources = [
|
||||
"It_los_swtmr.c",
|
||||
@@ -146,5 +148,5 @@ static_library("test_swtmr") {
|
||||
"It_los_swtmr_Delay_005.c",
|
||||
]
|
||||
|
||||
configs += [ "//kernel/liteos_m/testsuites:include" ]
|
||||
configs += [ "$LITEOSTOPDIR/testsuites:include" ]
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("test_task") {
|
||||
sources = [
|
||||
"It_los_task.c",
|
||||
@@ -159,5 +161,5 @@ static_library("test_task") {
|
||||
"It_los_task_130.c",
|
||||
]
|
||||
|
||||
configs += [ "//kernel/liteos_m/testsuites:include" ]
|
||||
configs += [ "$LITEOSTOPDIR/testsuites:include" ]
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("test_posix") {
|
||||
sources = [
|
||||
"mqueue/It_posix_queue.c",
|
||||
@@ -160,5 +162,5 @@ static_library("test_posix") {
|
||||
"pthread_func_test.c",
|
||||
]
|
||||
|
||||
configs += [ "//kernel/liteos_m/testsuites:include" ]
|
||||
configs += [ "$LITEOSTOPDIR/testsuites:include" ]
|
||||
}
|
||||
|
||||
@@ -108,6 +108,7 @@ extern VOID ItSuitePosixMqueue(VOID);
|
||||
extern UINT32 PosixPthreadInit(pthread_attr_t *attr, int pri);
|
||||
extern UINT32 PosixPthreadDestroy(pthread_attr_t *attr, pthread_t thread);
|
||||
extern VOID TestAssertWaitDelay(UINT32 *testCount, UINT32 flag);
|
||||
extern void TestExtraTaskDelay(UINT32 tick);
|
||||
|
||||
VOID ItPosixQueue001(VOID);
|
||||
VOID ItPosixQueue002(VOID);
|
||||
|
||||
@@ -34,13 +34,11 @@
|
||||
#include "sched.h"
|
||||
#include "signal.h"
|
||||
#include "semaphore.h"
|
||||
#include "sched.h"
|
||||
#include "osTest.h"
|
||||
#include "pthread.h"
|
||||
#include "limits.h"
|
||||
#include "unistd.h"
|
||||
#include "mqueue.h"
|
||||
#include "signal.h"
|
||||
|
||||
#define PTHREAD_IS_ERROR (-1)
|
||||
#define PTHREAD_PRIORITY_TEST 20
|
||||
@@ -64,7 +62,6 @@
|
||||
#define PTHREAD_EXISTED_SEM_NUM SEM_EXISTED_NUM
|
||||
|
||||
/* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
|
||||
#define _POSIX_C_SOURCE 200112L
|
||||
|
||||
#define PRIORITY_OTHER (-1)
|
||||
#define PRIORITY_FIFO 20
|
||||
|
||||
@@ -71,12 +71,12 @@ static_library("posix_test") {
|
||||
|
||||
if (!defined(LOSCFG_COMPILER_ICCARM)) {
|
||||
cflags = [
|
||||
"-Wno-error",
|
||||
"-Wno-unused-function",
|
||||
"-Wno-int-conversion",
|
||||
]
|
||||
} else {
|
||||
cflags = [ "--no_warnings" ]
|
||||
}
|
||||
|
||||
configs += [ "//kernel/liteos_m/testsuites:include" ]
|
||||
configs += [ "$LITEOSTOPDIR/testsuites:include" ]
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsalnum001, Function | MediumTe
|
||||
{
|
||||
int src = 'A';
|
||||
int ret = isalnum(src);
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsalnum002, Function | MediumTe
|
||||
{
|
||||
int src = '1';
|
||||
int ret = isalnum(src);
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsalnum003, Function | MediumTe
|
||||
{
|
||||
int src = '@';
|
||||
int ret = isalnum(src);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsalnum004, Function | MediumTe
|
||||
{
|
||||
int src = ' ';
|
||||
int ret = isalnum(src);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsalnum005, Function | MediumTe
|
||||
{
|
||||
int src = '\f'; // 0x0c 14
|
||||
int ret = isalnum(src);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsascii001, Function | MediumTe
|
||||
{
|
||||
const int src = -1;
|
||||
int ret = isascii(src);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsascii002, Function | MediumTe
|
||||
{
|
||||
const int src = 0;
|
||||
int ret = isascii(src);
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsascii003, Function | MediumTe
|
||||
{
|
||||
const int src = 127;
|
||||
int ret = isascii(src);
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsascii004, Function | MediumTe
|
||||
{
|
||||
const int src = 128;
|
||||
int ret = isascii(src);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsascii005, Function | MediumTe
|
||||
{
|
||||
int src = '\f'; // 0x0c 14
|
||||
int ret = isascii(src);
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsprint001, Function | MediumTe
|
||||
{
|
||||
int src = 'A';
|
||||
int ret = isprint(src);
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsprint002, Function | MediumTe
|
||||
{
|
||||
int src = '1';
|
||||
int ret = isprint(src);
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsprint003, Function | MediumTe
|
||||
{
|
||||
int src = '@';
|
||||
int ret = isprint(src);
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsprint004, Function | MediumTe
|
||||
{
|
||||
int src = ' ';
|
||||
int ret = isprint(src);
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsprint005, Function | MediumTe
|
||||
{
|
||||
int src = '\f'; // 0x0c
|
||||
int ret = isprint(src);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsspace001, Function | MediumTe
|
||||
{
|
||||
int src = 'A';
|
||||
int ret = isspace(src);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsspace002, Function | MediumTe
|
||||
{
|
||||
int src = '1';
|
||||
int ret = isspace(src);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsspace003, Function | MediumTe
|
||||
{
|
||||
int src = '@';
|
||||
int ret = isspace(src);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsspace004, Function | MediumTe
|
||||
{
|
||||
int src = ' ';
|
||||
int ret = isspace(src);
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsspace005, Function | MediumTe
|
||||
{
|
||||
int src = '\t';
|
||||
int ret = isspace(src);
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsupper001, Function | MediumTe
|
||||
{
|
||||
int src = 'A';
|
||||
int ret = isupper(src);
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -351,7 +351,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsupper002, Function | MediumTe
|
||||
{
|
||||
int src = 'a';
|
||||
int ret = isupper(src);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -364,7 +364,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsupper003, Function | MediumTe
|
||||
{
|
||||
const int src = 0x45;
|
||||
int ret = isupper(src);
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsupper004, Function | MediumTe
|
||||
{
|
||||
int src = ' ';
|
||||
int ret = isupper(src);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -390,12 +390,10 @@ LITE_TEST_CASE(PosixCtypeFuncTestSuite, testCtypeIsupper005, Function | MediumTe
|
||||
{
|
||||
int src = '\t';
|
||||
int ret = isupper(src);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
RUN_TEST_SUITE(PosixCtypeFuncTestSuite);
|
||||
|
||||
void PosixCtypeFuncTest()
|
||||
{
|
||||
LOG("begin PosixCtypeFuncTest....");
|
||||
|
||||
@@ -79,7 +79,7 @@ LITE_TEST_CASE(PosixCTypeIsdigitTest, testCTypeIsdigit001, Function | MediumTest
|
||||
else {
|
||||
LOG("[DEMO] posix ctype test case 1:isdigit(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ LITE_TEST_CASE(PosixCTypeIsdigitTest, testCTypeIsdigit002, Function | MediumTest
|
||||
else {
|
||||
LOG("[DEMO] posix ctype test case 2:isdigit(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ LITE_TEST_CASE(PosixCTypeIsdigitTest, testCTypeIsdigit003, Function | MediumTest
|
||||
else {
|
||||
LOG("[DEMO] posix ctype test case 3:isdigit(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ LITE_TEST_CASE(PosixCTypeIsdigitTest, testCTypeIsdigit004, Function | MediumTest
|
||||
else {
|
||||
LOG("[DEMO] posix ctype test case 4(except):isdigit(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -155,13 +155,10 @@ LITE_TEST_CASE(PosixCTypeIsdigitTest, testCTypeIsdigit005, Function | MediumTest
|
||||
else {
|
||||
LOG("[DEMO] posix ctype test case 5(except):isdigit(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
RUN_TEST_SUITE(PosixCTypeIsdigitTest);
|
||||
|
||||
|
||||
void PosixIsdigitFuncTest()
|
||||
{
|
||||
LOG("begin PosixIsdigitFuncTest....");
|
||||
|
||||
@@ -78,7 +78,7 @@ LITE_TEST_CASE(PosixCTypeIslowerTest, testCTypeIslower001, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 1:islower(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(1, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 1, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ LITE_TEST_CASE(PosixCTypeIslowerTest, testCTypeIslower002, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 2:islower(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(1, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 1, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ LITE_TEST_CASE(PosixCTypeIslowerTest, testCTypeIslower003, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 3:islower(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(1, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 1, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ LITE_TEST_CASE(PosixCTypeIslowerTest, testCTypeIslower004, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 4(except):islower(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ LITE_TEST_CASE(PosixCTypeIslowerTest, testCTypeIslower005, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 5(except):islower(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -168,12 +168,10 @@ LITE_TEST_CASE(PosixCTypeIslowerTest, testCTypeIslower006, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 6(except):islower(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
RUN_TEST_SUITE(PosixCTypeIslowerTest);
|
||||
|
||||
void PosixIslowerFuncTest()
|
||||
{
|
||||
LOG("begin PosixIslowerFuncTest....");
|
||||
|
||||
@@ -78,7 +78,7 @@ LITE_TEST_CASE(PosixCTypeIsxdigitTest, testCTypeIsxdigit001, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 1:isxdigit(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ LITE_TEST_CASE(PosixCTypeIsxdigitTest, testCTypeIsxdigit002, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 2:isxdigit(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ LITE_TEST_CASE(PosixCTypeIsxdigitTest, testCTypeIsxdigit003, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 3:isxdigit(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ LITE_TEST_CASE(PosixCTypeIsxdigitTest, testCTypeIsxdigit004, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 1:isxdigit(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ LITE_TEST_CASE(PosixCTypeIsxdigitTest, testCTypeIsxdigit005, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 1:isxdigit(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ LITE_TEST_CASE(PosixCTypeIsxdigitTest, testCTypeIsxdigit006, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 1:isxdigit(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ LITE_TEST_CASE(PosixCTypeIsxdigitTest, testCTypeIsxdigit007, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 1:isxdigit(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_NOT_EQUAL(0, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ LITE_TEST_CASE(PosixCTypeIsxdigitTest, testCTypeIsxdigit008, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 5(except):isxdigit(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ LITE_TEST_CASE(PosixCTypeIsxdigitTest, testCTypeIsxdigit009, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 4(except):isxdigit(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -240,12 +240,10 @@ LITE_TEST_CASE(PosixCTypeIsxdigitTest, testCTypeIsxdigit010, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 5(except):isxdigit(%c) fail.\n", a);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
RUN_TEST_SUITE(PosixCTypeIsxdigitTest);
|
||||
|
||||
void PosixIsxdigitFuncTest()
|
||||
{
|
||||
LOG("begin PosixIsxdigitFuncTest....");
|
||||
|
||||
@@ -76,9 +76,9 @@ LITE_TEST_CASE(PosixCTypeTolowerTest, testCTypeTolower001, Function | MediumTest
|
||||
if (ret == 'a') {
|
||||
LOG("[DEMO] posix ctype test case 1:tolower(%c)==%c ok.\n", a, ret);
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 1:tolower(%c)!=%c fail.\n", a);
|
||||
LOG("[DEMO] posix ctype test case 1:tolower(%c)!=%c fail.\n", a, ret);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == 'a');
|
||||
ICUNIT_ASSERT_EQUAL(ret, 'a', ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -94,9 +94,9 @@ LITE_TEST_CASE(PosixCTypeTolowerTest, testCTypeTolower002, Function | MediumTest
|
||||
if (ret == 'a') {
|
||||
LOG("[DEMO] posix ctype test case 2:tolower(%c)==%c ok.\n", a, ret);
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 2:tolower(%c)!=%c fail.\n", a);
|
||||
LOG("[DEMO] posix ctype test case 2:tolower(%c)!=%c fail.\n", a, ret);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == 'a');
|
||||
ICUNIT_ASSERT_EQUAL(ret, 'a', ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -112,9 +112,9 @@ LITE_TEST_CASE(PosixCTypeTolowerTest, testCTypeTolower003, Function | MediumTest
|
||||
if (ret == 'z') {
|
||||
LOG("[DEMO] posix ctype test case 3:tolower(%c)==%c ok.\n", a, ret);
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 3:tolower(%c)!=%c fail.\n", a);
|
||||
LOG("[DEMO] posix ctype test case 3:tolower(%c)!=%c fail.\n", a, ret);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == 'z');
|
||||
ICUNIT_ASSERT_EQUAL(ret, 'z', ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -130,9 +130,9 @@ LITE_TEST_CASE(PosixCTypeTolowerTest, testCTypeTolower004, Function | MediumTest
|
||||
if (ret == 'z') {
|
||||
LOG("[DEMO] posix ctype test case 4:tolower(%c)==%c ok.\n", a, ret);
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 4:tolower(%c)!=%c fail.\n", a);
|
||||
LOG("[DEMO] posix ctype test case 4:tolower(%c)!=%c fail.\n", a, ret);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == 'z');
|
||||
ICUNIT_ASSERT_EQUAL(ret, 'z', ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -148,14 +148,12 @@ LITE_TEST_CASE(PosixCTypeTolowerTest, testCTypeTolower005, Function | MediumTest
|
||||
if (ret == '1') {
|
||||
LOG("[DEMO] posix ctype test case 5(except):tolower(%c)==%c ok.\n", a, ret);
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 5(except):tolower(%c)!=%c fail.\n", a);
|
||||
LOG("[DEMO] posix ctype test case 5(except):tolower(%c)!=%c fail.\n", a, ret);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == '1');
|
||||
ICUNIT_ASSERT_EQUAL(ret, '1', ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
RUN_TEST_SUITE(PosixCTypeTolowerTest);
|
||||
|
||||
void PosixTolowerFuncTest()
|
||||
{
|
||||
LOG("begin PosixTolowerFuncTest....");
|
||||
|
||||
@@ -76,9 +76,9 @@ LITE_TEST_CASE(PosixCTypeToupperTest, testCTypeToupper001, Function | MediumTest
|
||||
if (ret == 'A') {
|
||||
LOG("[DEMO] posix ctype test case 1:toupper(%c)==%c ok.\n", a, ret);
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 1:toupper(%c)!=%c fail.\n", a);
|
||||
LOG("[DEMO] posix ctype test case 1:toupper(%c)!=%c fail.\n", a, ret);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == 'A');
|
||||
ICUNIT_ASSERT_EQUAL(ret, 'A', ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -94,9 +94,9 @@ LITE_TEST_CASE(PosixCTypeToupperTest, testCTypeToupper002, Function | MediumTest
|
||||
if (ret == 'A') {
|
||||
LOG("[DEMO] posix ctype test case 2:toupper(%c)==%c ok.\n", a, ret);
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 2:toupper(%c)!=%c fail.\n", a);
|
||||
LOG("[DEMO] posix ctype test case 2:toupper(%c)!=%c fail.\n", a, ret);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == 'A');
|
||||
ICUNIT_ASSERT_EQUAL(ret, 'A', ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -112,9 +112,9 @@ LITE_TEST_CASE(PosixCTypeToupperTest, testCTypeToupper003, Function | MediumTest
|
||||
if (ret == 'Z') {
|
||||
LOG("[DEMO] posix ctype test case 3:toupper(%c)==%c ok.\n", a, ret);
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 3:toupper(%c)!=%c fail.\n", a);
|
||||
LOG("[DEMO] posix ctype test case 3:toupper(%c)!=%c fail.\n", a, ret);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == 'Z');
|
||||
ICUNIT_ASSERT_EQUAL(ret, 'Z', ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -130,9 +130,9 @@ LITE_TEST_CASE(PosixCTypeToupperTest, testCTypeToupper004, Function | MediumTest
|
||||
if (ret == 'Z') {
|
||||
LOG("[DEMO] posix ctype test case 4:toupper(%c)==%c ok.\n", a, ret);
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 4:toupper(%c)!=%c fail.\n", a);
|
||||
LOG("[DEMO] posix ctype test case 4:toupper(%c)!=%c fail.\n", a, ret);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == 'Z');
|
||||
ICUNIT_ASSERT_EQUAL(ret, 'Z', ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -148,14 +148,12 @@ LITE_TEST_CASE(PosixCTypeToupperTest, testCTypeToupper005, Function | MediumTest
|
||||
if (ret == '1') {
|
||||
LOG("[DEMO] posix ctype test case 5(except):toupper(%c)==%c ok.\n", a, ret);
|
||||
} else {
|
||||
LOG("[DEMO] posix ctype test case 5(except):toupper(%c)!=%c fail.\n", a);
|
||||
LOG("[DEMO] posix ctype test case 5(except):toupper(%c)!=%c fail.\n", a, ret);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == '1');
|
||||
ICUNIT_ASSERT_EQUAL(ret, '1', ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
RUN_TEST_SUITE(PosixCTypeToupperTest);
|
||||
|
||||
void PosixToupperFuncTest()
|
||||
{
|
||||
LOG("begin PosixToupperFuncTest....");
|
||||
|
||||
@@ -75,32 +75,30 @@ LITE_TEST_CASE(PosixSysFuncTestSuite, testOsSysStrerror001, Function | MediumTes
|
||||
#if (LOSCFG_LIBC_MUSL == 1)
|
||||
for (int i = EPERM; i < EHWPOISON; i++) {
|
||||
char *s = strerror(i);
|
||||
TEST_ASSERT_NOT_NULL(s);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(s, NULL, s);
|
||||
}
|
||||
|
||||
LOG("strerror(-1) = %s\n", strerror(-1));
|
||||
TEST_ASSERT_EQUAL_STRING("No error information", strerror(-1));
|
||||
ICUNIT_ASSERT_STRING_EQUAL(strerror(-1), "No error information", -1);
|
||||
LOG("strerror(0) = %s\n", strerror(0));
|
||||
TEST_ASSERT_EQUAL_STRING("No error information", strerror(0));
|
||||
ICUNIT_ASSERT_STRING_EQUAL(strerror(0), "No error information", 0);
|
||||
LOG("strerror(2) = %s\n", strerror(2));
|
||||
TEST_ASSERT_EQUAL_STRING("No such file or directory", strerror(2));
|
||||
ICUNIT_ASSERT_STRING_EQUAL(strerror(2), "No such file or directory", 2);
|
||||
LOG("strerror(10) = %s\n", strerror(10));
|
||||
TEST_ASSERT_EQUAL_STRING("No child process", strerror(10));
|
||||
ICUNIT_ASSERT_STRING_EQUAL(strerror(10), "No child process", 10);
|
||||
#endif
|
||||
#if (LOSCFG_LIBC_NEWLIB == 1)
|
||||
LOG("strerror(0) = %s\n", strerror(0));
|
||||
TEST_ASSERT_EQUAL_STRING("Success", strerror(0));
|
||||
ICUNIT_ASSERT_STRING_EQUAL(strerror(0), "Success", 0);
|
||||
LOG("strerror(2) = %s\n", strerror(2));
|
||||
TEST_ASSERT_EQUAL_STRING("No such file or directory", strerror(2));
|
||||
ICUNIT_ASSERT_STRING_EQUAL(strerror(2), "No such file or directory", 2);
|
||||
LOG("strerror(10) = %s\n", strerror(10));
|
||||
TEST_ASSERT_EQUAL_STRING("No children", strerror(10));
|
||||
ICUNIT_ASSERT_STRING_EQUAL(strerror(10), "No children", 10);
|
||||
#endif
|
||||
|
||||
return LOS_OK;
|
||||
};
|
||||
|
||||
RUN_TEST_SUITE(PosixSysFuncTestSuite);
|
||||
|
||||
void PosixStrerrorTest()
|
||||
{
|
||||
LOG("begin PosixStrerrorTest....");
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -107,7 +107,7 @@ LITE_TEST_CASE(PosixMathFuncTestSuite, testMathAbs001, Function | MediumTest | L
|
||||
for (int i = 0; i < testCount; ++i) {
|
||||
ret = abs(testValues[i]);
|
||||
LOG("\n [POSIXTEST][abs]abs(%d) = %d, expected is %d", testValues[i], ret, expected[i]);
|
||||
TEST_ASSERT_EQUAL_INT(expected[i], ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, expected[i], ret);
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
@@ -126,7 +126,7 @@ LITE_TEST_CASE(PosixMathFuncTestSuite, testMathAbs002, Function | MediumTest | L
|
||||
for (int i = 0; i < testCount; ++i) {
|
||||
ret = abs(testValues[i]);
|
||||
LOG("\n [POSIXTEST][abs]abs(%d) = %d, expected is %d", testValues[i], ret, expected[i]);
|
||||
TEST_ASSERT_EQUAL_INT(expected[i], ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, expected[i], ret);
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
@@ -148,7 +148,7 @@ LITE_TEST_CASE(PosixMathFuncTestSuite, testMathLog001, Function | MediumTest | L
|
||||
ret = log(testValues[i]);
|
||||
LOG("\n [POSIXTEST][log]log(%lf) = %lf, expected is %lf", testValues[i], ret, expected[i]);
|
||||
TEST_ASSERT_EQUAL_FLOAT(expected[i], ret);
|
||||
TEST_ASSERT_TRUE(DoubleEquals(expected[i], ret));
|
||||
ICUNIT_ASSERT_EQUAL(DoubleEquals(expected[i], ret), TRUE, 0);
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
@@ -191,7 +191,7 @@ LITE_TEST_CASE(PosixMathFuncTestSuite, testMathSqrt001, Function | MediumTest |
|
||||
ret = sqrt(testValues[i]);
|
||||
LOG("\n [POSIXTEST][sqrt]sqrt(%lf) = %lf, expected is %lf", testValues[i], ret, expected[i]);
|
||||
TEST_ASSERT_EQUAL_FLOAT(expected[i], ret);
|
||||
TEST_ASSERT_TRUE(DoubleEquals(expected[i], ret));
|
||||
ICUNIT_ASSERT_EQUAL(DoubleEquals(expected[i], ret), TRUE, 0);
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
@@ -236,7 +236,7 @@ LITE_TEST_CASE(PosixMathFuncTestSuite, testMathPow001, Function | MediumTest | L
|
||||
LOG("\n [POSIXTEST][pow]pow1(%lf,%lf) = %lf, expected is %lf", testValues[i][TEST_VALUE_X],
|
||||
testValues[i][TEST_VALUE_Y], ret, testValues[i][TEST_EXPECTED]);
|
||||
TEST_ASSERT_EQUAL_FLOAT(testValues[i][TEST_EXPECTED], ret);
|
||||
TEST_ASSERT_TRUE(DoubleEquals(testValues[i][TEST_EXPECTED], ret));
|
||||
ICUNIT_ASSERT_EQUAL(DoubleEquals(testValues[i][TEST_EXPECTED], ret), TRUE, 0);
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
@@ -269,7 +269,7 @@ LITE_TEST_CASE(PosixMathFuncTestSuite, testMathPow002, Function | MediumTest | L
|
||||
for (int i = 0; i < testCount; ++i) {
|
||||
ret = pow(testValues[i][TEST_VALUE_X], testValues[i][TEST_VALUE_Y]);
|
||||
TEST_ASSERT_EQUAL_FLOAT(testValues[i][TEST_EXPECTED], ret);
|
||||
TEST_ASSERT_TRUE(DoubleEquals(testValues[i][TEST_EXPECTED], ret));
|
||||
ICUNIT_ASSERT_EQUAL(DoubleEquals(testValues[i][TEST_EXPECTED], ret), TRUE, 0);
|
||||
LOG("\n [POSIXTEST][pow]pow1(%lf,%lf) = %lf, expected is %lf", testValues[i][TEST_VALUE_X],
|
||||
testValues[i][TEST_VALUE_Y], ret, testValues[i][TEST_EXPECTED]);
|
||||
}
|
||||
@@ -297,7 +297,7 @@ LITE_TEST_CASE(PosixMathFuncTestSuite, testMathPow003, Function | MediumTest | L
|
||||
TEST_ASSERT_EQUAL_FLOAT(testValues[i][TEST_EXPECTED], ret);
|
||||
LOG("\n [POSIXTEST][pow]pow1(%lf,%lf) = %lf, expected is %lf", testValues[i][TEST_VALUE_X],
|
||||
testValues[i][TEST_VALUE_Y], ret, testValues[i][TEST_EXPECTED]);
|
||||
TEST_ASSERT_TRUE(DoubleEquals(testValues[i][TEST_EXPECTED], ret));
|
||||
ICUNIT_ASSERT_EQUAL(DoubleEquals(testValues[i][TEST_EXPECTED], ret), TRUE, 0);
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
@@ -318,7 +318,7 @@ LITE_TEST_CASE(PosixMathFuncTestSuite, testMathRound001, Function | MediumTest |
|
||||
ret = round(testValues[i]);
|
||||
LOG("\n [POSIXTEST][round]round1(%lf) = %lf, expected is %lf", testValues[i], ret, expected[i]);
|
||||
TEST_ASSERT_EQUAL_FLOAT(expected[i], ret);
|
||||
TEST_ASSERT_TRUE(DoubleEquals(expected[i], ret));
|
||||
ICUNIT_ASSERT_EQUAL(DoubleEquals(expected[i], ret), TRUE, 0);
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
@@ -338,7 +338,7 @@ LITE_TEST_CASE(PosixMathFuncTestSuite, testMathRound002, Function | MediumTest |
|
||||
ret = round(testValues[i]);
|
||||
LOG("\n [POSIXTEST][round]round1(%lf) = %lf, expected is %lf", testValues[i], ret, expected[i]);
|
||||
TEST_ASSERT_EQUAL_FLOAT(expected[i], ret);
|
||||
TEST_ASSERT_TRUE(DoubleEquals(expected[i], ret));
|
||||
ICUNIT_ASSERT_EQUAL(DoubleEquals(expected[i], ret), TRUE, 0);
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
@@ -48,32 +48,8 @@
|
||||
#define LITE_TEST_CASE(module, function, flag) static int function(void)
|
||||
#define RUN_TEST_SUITE(testsuit)
|
||||
|
||||
#define TEST_ASSERT_EQUAL(expected, actual) ICUNIT_ASSERT_EQUAL(expected, actual, actual)
|
||||
#define TEST_ASSERT_EQUAL_INT(expected, actual) TEST_ASSERT_EQUAL(expected, actual)
|
||||
#define TEST_ASSERT_EQUAL_INT32(expected, actual) TEST_ASSERT_EQUAL(expected, actual)
|
||||
#define TEST_ASSERT_EQUAL_INT64(expected, actual) TEST_ASSERT_EQUAL(expected, actual)
|
||||
#define TEST_ASSERT_EQUAL_UINT32(expected, actual) TEST_ASSERT_EQUAL(expected, actual)
|
||||
#define TEST_ASSERT_EQUAL_UINT64(expected, actual) TEST_ASSERT_EQUAL(expected, actual)
|
||||
#define TEST_ASSERT_NULL(ptr) TEST_ASSERT_EQUAL(NULL, ptr)
|
||||
#define TEST_ASSERT_EQUAL_PTR(expected, actual) TEST_ASSERT_EQUAL(expected, actual)
|
||||
|
||||
#define TEST_ASSERT_NOT_EQUAL(expected, actual) ICUNIT_ASSERT_NOT_EQUAL(expected, actual, actual)
|
||||
#define TEST_ASSERT_NOT_NULL(ptr) TEST_ASSERT_NOT_EQUAL(NULL, ptr)
|
||||
|
||||
#define TEST_ASSERT_EQUAL_STRING(str1, str2) ICUNIT_ASSERT_STRING_EQUAL(str1, str2, 1)
|
||||
|
||||
#define TEST_ASSERT_TRUE(condition) TEST_ASSERT_NOT_EQUAL(0, condition)
|
||||
#define TEST_ASSERT_LESS_THAN(threshold, actual) TEST_ASSERT_TRUE((actual) < (threshold))
|
||||
#define TEST_ASSERT_LESS_THAN_INT(threshold, actual) TEST_ASSERT_LESS_THAN(threshold, actual)
|
||||
#define TEST_ASSERT_GREATER_THAN(threshold, actual) TEST_ASSERT_TRUE((actual) > (threshold))
|
||||
#define TEST_ASSERT_GREATER_THAN_INT(threshold, actual) TEST_ASSERT_GREATER_THAN(threshold, actual)
|
||||
#define TEST_ASSERT_GREATER_OR_EQUAL(threshold, actual) TEST_ASSERT_TRUE((actual) >= (threshold))
|
||||
#define TEST_ASSERT_LESS_OR_EQUAL_INT64(threshold, actual) TEST_ASSERT_TRUE((actual) <= (threshold))
|
||||
#define TEST_ASSERT_INT32_WITHIN(a, b, c) ICUNIT_ASSERT_WITHIN_EQUAL(c, (b) - (a), (b) + (a), c)
|
||||
#define TEST_FAIL() TEST_ASSERT_TRUE(0)
|
||||
#define TEST_ASSERT_EQUAL_CHAR_ARRAY(expected, actual, num) ICUNIT_ASSERT_SIZE_STRING_EQUAL(expected, actual, num, 1)
|
||||
#define TEST_ASSERT_EQUAL_FLOAT(expected, actual) \
|
||||
TEST_ASSERT_TRUE(((expected) == (actual)) || (isnan(expected) && isnan(actual)))
|
||||
ICUNIT_ASSERT_EQUAL(((expected) == (actual)) || (isnan(expected) && isnan(actual)), TRUE, 0)
|
||||
|
||||
void ItSuitePosix(void);
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ int TestRegex(int flag, const char *pattern, const char *buf, const int expected
|
||||
int j = 0;
|
||||
regcomp(®, pattern, flag);
|
||||
int status = regexec(®, buf, nmatch, pmatch, 0);
|
||||
TEST_ASSERT_EQUAL_INT(expectedStatus, status);
|
||||
ICUNIT_ASSERT_EQUAL(status, expectedStatus, status);
|
||||
if (status == REG_NOMATCH) {
|
||||
LOG("no match");
|
||||
} else if (status == 0) {
|
||||
@@ -94,7 +94,7 @@ int TestRegex(int flag, const char *pattern, const char *buf, const int expected
|
||||
}
|
||||
res[j] = 0;
|
||||
LOG("\n");
|
||||
TEST_ASSERT_EQUAL_STRING(res, expectedRes);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(res, expectedRes, 0);
|
||||
}
|
||||
regfree(®);
|
||||
return 0;
|
||||
@@ -105,7 +105,7 @@ int TestRegcomp(int flag, const char *pattern, const int expectedStatus)
|
||||
regex_t reg;
|
||||
int status = regcomp(®, pattern, flag);
|
||||
LOG("pattern : %s ,real status : %d \n", pattern, status);
|
||||
TEST_ASSERT_EQUAL_INT(expectedStatus, status);
|
||||
ICUNIT_ASSERT_EQUAL(status, expectedStatus, status);
|
||||
regfree(®);
|
||||
return 0;
|
||||
}
|
||||
@@ -166,7 +166,7 @@ LITE_TEST_CASE(PosixRegexFuncTestSuite, testRegexNosub001, Function | MediumTest
|
||||
const char *pattern2 = "HARMONY[1-9]";
|
||||
regcomp(®, pattern2, cflags);
|
||||
int status = regexec(®, buf, (size_t)0, NULL, 0);
|
||||
TEST_ASSERT_EQUAL_INT(0, status);
|
||||
ICUNIT_ASSERT_EQUAL(status, 0, status);
|
||||
regfree(®);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ static BOOL PosixSemaphoreFuncTestSuiteTearDown(void)
|
||||
// get cur-time plus ms
|
||||
struct timespec GetDelayedTime(unsigned int ms)
|
||||
{
|
||||
LOG("GetDelayedTime ms = %lu", ms);
|
||||
LOG("GetDelayedTime ms = %u", ms);
|
||||
struct timespec ts = { 0 };
|
||||
const unsigned int nsecPerSec = 1000000000;
|
||||
const unsigned int nsecPerMs = 1000000;
|
||||
@@ -91,7 +91,7 @@ int GetTimeDiff(struct timespec ts1, struct timespec ts2)
|
||||
const int nsecPerMs = 1000000;
|
||||
int ms = (ts1.tv_sec - ts2.tv_sec) * nsecPerSec + (ts1.tv_nsec - ts2.tv_nsec);
|
||||
ms = ms / nsecPerMs;
|
||||
LOG("different result: %ld (ms)", ms);
|
||||
LOG("different result: %d (ms)", ms);
|
||||
return ms;
|
||||
}
|
||||
|
||||
@@ -106,23 +106,23 @@ LITE_TEST_CASE(PosixSemaphoreFuncTestSuite, testIpcSem_Timedwait001, Function |
|
||||
struct timespec tsNow = { 0 };
|
||||
sem_t sem;
|
||||
|
||||
TEST_ASSERT_EQUAL_INT(0, sem_init((sem_t *)&sem, 0, 0));
|
||||
ICUNIT_ASSERT_EQUAL(sem_init((sem_t *)&sem, 0, 0), 0, 0);
|
||||
|
||||
ts = GetDelayedTime(100);
|
||||
LOG("predicted time:%lld, %d", ts.tv_sec, ts.tv_nsec);
|
||||
LOG("predicted time:%lld, %ld", ts.tv_sec, ts.tv_nsec);
|
||||
if (sem_timedwait((sem_t *)&sem, &ts) == -1) {
|
||||
TEST_ASSERT_EQUAL_INT(ETIMEDOUT, errno);
|
||||
ICUNIT_ASSERT_EQUAL(errno, ETIMEDOUT, errno);
|
||||
} else {
|
||||
LOG("\n> sem_timedwait return unexpected");
|
||||
}
|
||||
|
||||
clock_gettime(CLOCK_REALTIME, &tsNow);
|
||||
LOG("tsNow %lld, %d", tsNow.tv_sec, tsNow.tv_nsec);
|
||||
LOG("tsNow %lld, %ld", tsNow.tv_sec, tsNow.tv_nsec);
|
||||
int timeDiff = GetTimeDiff(tsNow, ts); // calculate time different
|
||||
LOG("timeDiff %d", timeDiff);
|
||||
TEST_ASSERT_LESS_THAN_INT(20, abs(timeDiff));
|
||||
ICUNIT_ASSERT_EQUAL(abs(timeDiff) < 20, TRUE, 0);
|
||||
|
||||
TEST_ASSERT_EQUAL_INT(0, sem_destroy((sem_t *)&sem));
|
||||
ICUNIT_ASSERT_EQUAL(sem_destroy((sem_t *)&sem), 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -138,33 +138,33 @@ LITE_TEST_CASE(PosixSemaphoreFuncTestSuite, testIpcSem_Timedwait002, Function |
|
||||
struct timespec tsBegin = { 0 };
|
||||
sem_t sem;
|
||||
|
||||
TEST_ASSERT_EQUAL_INT(0, sem_init((sem_t *)&sem, 0, 1));
|
||||
ICUNIT_ASSERT_EQUAL(sem_init((sem_t *)&sem, 0, 1), 0, 0);
|
||||
|
||||
ts = GetDelayedTime(100);
|
||||
LOG("\n ts %lld, %d", ts.tv_sec, ts.tv_nsec);
|
||||
LOG("\n ts %lld, %ld", ts.tv_sec, ts.tv_nsec);
|
||||
clock_gettime(CLOCK_REALTIME, &tsBegin);
|
||||
int ret = sem_timedwait((sem_t *)&sem, &ts);
|
||||
clock_gettime(CLOCK_REALTIME, &tsNow);
|
||||
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
|
||||
LOG("\n tsBegin %ld, %ld, tsNow %ld, %ld", tsBegin.tv_sec, tsBegin.tv_nsec, tsNow.tv_sec, tsNow.tv_nsec);
|
||||
LOG("\n tsBegin %lld, %ld, tsNow %lld, %ld", tsBegin.tv_sec, tsBegin.tv_nsec, tsNow.tv_sec, tsNow.tv_nsec);
|
||||
int timeDiff = GetTimeDiff(tsNow, tsBegin); // calculate time different
|
||||
LOG("\n timeDiff %d", timeDiff);
|
||||
TEST_ASSERT_LESS_THAN_INT(20, timeDiff);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(timeDiff, timeDiff, 19, 0);
|
||||
|
||||
// try get semaphore again
|
||||
ts = GetDelayedTime(100);
|
||||
LOG("\n ts %d, %d", ts.tv_sec, ts.tv_nsec);
|
||||
LOG("\n ts %lld, %ld", ts.tv_sec, ts.tv_nsec);
|
||||
ret = sem_timedwait((sem_t *)&sem, &ts);
|
||||
clock_gettime(CLOCK_REALTIME, &tsNow);
|
||||
TEST_ASSERT_EQUAL_INT(-1, ret);
|
||||
TEST_ASSERT_EQUAL_INT(ETIMEDOUT, errno);
|
||||
LOG("\n tsNow %ld, %ld", tsNow.tv_sec, tsNow.tv_nsec);
|
||||
ICUNIT_ASSERT_EQUAL(ret, -1, ret);
|
||||
ICUNIT_ASSERT_EQUAL(errno, ETIMEDOUT, errno);
|
||||
LOG("\n tsNow %lld, %ld", tsNow.tv_sec, tsNow.tv_nsec);
|
||||
timeDiff = GetTimeDiff(tsNow, tsBegin); // calculate time different
|
||||
LOG("\n wait timeDiff %d", timeDiff);
|
||||
|
||||
TEST_ASSERT_EQUAL_INT(0, sem_destroy((sem_t *)&sem));
|
||||
ICUNIT_ASSERT_EQUAL(sem_destroy((sem_t *)&sem), 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -182,36 +182,36 @@ LITE_TEST_CASE(PosixSemaphoreFuncTestSuite, testIpcSem_Timedwait003, Function |
|
||||
ts.tv_sec = 0;
|
||||
ts.tv_nsec = 200000;
|
||||
ret = sem_timedwait((sem_t *)&sem, &ts);
|
||||
TEST_ASSERT_EQUAL_INT(-1, ret);
|
||||
TEST_ASSERT_EQUAL_INT(EINVAL, errno);
|
||||
ICUNIT_ASSERT_EQUAL(ret, -1, ret);
|
||||
ICUNIT_ASSERT_EQUAL(errno, EINVAL, errno);
|
||||
|
||||
ret = sem_init((sem_t *)&sem, 0, 0);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
|
||||
ts.tv_sec = time(NULL);
|
||||
ts.tv_nsec = -2;
|
||||
ret = sem_timedwait((sem_t *)&sem, &ts);
|
||||
TEST_ASSERT_EQUAL_INT(-1, ret);
|
||||
TEST_ASSERT_EQUAL_INT(EINVAL, errno);
|
||||
ICUNIT_ASSERT_EQUAL(ret, -1, ret);
|
||||
ICUNIT_ASSERT_EQUAL(errno, EINVAL, errno);
|
||||
|
||||
ts.tv_sec = time(NULL);
|
||||
ts.tv_nsec = NANO_S;
|
||||
ret = sem_timedwait((sem_t *)&sem, &ts);
|
||||
TEST_ASSERT_EQUAL_INT(-1, ret);
|
||||
TEST_ASSERT_EQUAL_INT(EINVAL, errno);
|
||||
ICUNIT_ASSERT_EQUAL(ret, -1, ret);
|
||||
ICUNIT_ASSERT_EQUAL(errno, EINVAL, errno);
|
||||
|
||||
ret = sem_timedwait((sem_t *)&sem, NULL);
|
||||
TEST_ASSERT_EQUAL_INT(-1, ret);
|
||||
TEST_ASSERT_EQUAL_INT(EINVAL, errno);
|
||||
ICUNIT_ASSERT_EQUAL(ret, -1, ret);
|
||||
ICUNIT_ASSERT_EQUAL(errno, EINVAL, errno);
|
||||
|
||||
ret = sem_destroy((sem_t *)&sem);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
|
||||
ts.tv_sec = time(NULL);
|
||||
ts.tv_nsec = 2000000;
|
||||
ret = sem_timedwait(NULL, &ts);
|
||||
TEST_ASSERT_EQUAL_INT(-1, ret);
|
||||
TEST_ASSERT_EQUAL_INT(EINVAL, errno);
|
||||
ICUNIT_ASSERT_EQUAL(ret, -1, ret);
|
||||
ICUNIT_ASSERT_EQUAL(errno, EINVAL, errno);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -227,19 +227,19 @@ LITE_TEST_CASE(PosixSemaphoreFuncTestSuite, testIpcSem_Trywait004, Function | Me
|
||||
int ret;
|
||||
|
||||
ret = sem_init(&sem, 0, 1);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
|
||||
ret = sem_trywait(&sem);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
|
||||
ret = sem_getvalue(&sem, &val);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
|
||||
if (val <= 0) {
|
||||
sem_destroy(&sem);
|
||||
return LOS_OK;
|
||||
} else {
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -78,15 +78,15 @@ int VaFunc(int argsNum, ...)
|
||||
|
||||
for (int i = 0; i < argsNum; i++) {
|
||||
if (i < 1) {
|
||||
TEST_ASSERT_EQUAL_INT(10, va_arg(vaP2, int));
|
||||
ICUNIT_ASSERT_EQUAL(va_arg(vaP2, int), 10, 0);
|
||||
}
|
||||
|
||||
if (i == 1) {
|
||||
TEST_ASSERT_EQUAL_INT(65, va_arg(vaP2, int));
|
||||
ICUNIT_ASSERT_EQUAL(va_arg(vaP2, int), 65, 0);
|
||||
}
|
||||
|
||||
if (i > 1) {
|
||||
TEST_ASSERT_EQUAL_STRING("hello world", va_arg(vaP2, char *));
|
||||
ICUNIT_ASSERT_STRING_EQUAL(va_arg(vaP2, char *), "hello world", 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ int VaFunc(int argsNum, ...)
|
||||
LITE_TEST_CASE(PosixStdargFuncTestSuite, testStdarg001, Function | MediumTest | Level1)
|
||||
{
|
||||
int ret = VaFunc(1, 10);
|
||||
TEST_ASSERT_EQUAL_INT(RET_OK, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, RET_OK, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ LITE_TEST_CASE(PosixStdargFuncTestSuite, testStdarg001, Function | MediumTest |
|
||||
LITE_TEST_CASE(PosixStdargFuncTestSuite, testStdarg002, Function | MediumTest | Level1)
|
||||
{
|
||||
int ret = VaFunc(2, 10, 'A');
|
||||
TEST_ASSERT_EQUAL_INT(RET_OK, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, RET_OK, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ LITE_TEST_CASE(PosixStdargFuncTestSuite, testStdarg002, Function | MediumTest |
|
||||
LITE_TEST_CASE(PosixStdargFuncTestSuite, testStdarg003, Function | MediumTest | Level1)
|
||||
{
|
||||
int ret = VaFunc(3, 10, 'A', "hello world");
|
||||
TEST_ASSERT_EQUAL_INT(RET_OK, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, RET_OK, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ LITE_TEST_CASE(PosixStdargFuncTestSuite, testStdarg003, Function | MediumTest |
|
||||
LITE_TEST_CASE(PosixStdargFuncTestSuite, testStdarg004, Function | MediumTest | Level1)
|
||||
{
|
||||
int ret = VaFunc(3, 10, 'A', "hello world", '\0');
|
||||
TEST_ASSERT_EQUAL_INT(RET_OK, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, RET_OK, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ LITE_TEST_CASE(PosixStdlibAtoiTest, testStdlibAtoi001, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 1:atoi(%d) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(2147483647, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, 2147483647, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ LITE_TEST_CASE(PosixStdlibAtoiTest, testStdlibAtoi002, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 2:atoi(%d) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(-2147483648, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, -2147483648, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ LITE_TEST_CASE(PosixStdlibAtoiTest, testStdlibAtoi003, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 3:atoi(%d) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(100, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, 100, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ LITE_TEST_CASE(PosixStdlibAtoiTest, testStdlibAtoi004, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 4(except):atoi(%d) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(-2147483648, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, -2147483648, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ LITE_TEST_CASE(PosixStdlibAtoiTest, testStdlibAtoi005, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 5(except):atoi(%d) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(2147483647, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, 2147483647, value);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@@ -165,7 +165,7 @@ LITE_TEST_CASE(PosixStdlibAtoiTest, testStdlibAtoi006, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 6:atoi(%d) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(100, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, 100, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ LITE_TEST_CASE(PosixStdlibAtoiTest, testStdlibAtoi007, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 7:atoi(%d) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(-100, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, -100, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ LITE_TEST_CASE(PosixStdlibAtoiTest, testStdlibAtoi008, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 8(except):atoi(%d) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(0, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, 0, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ LITE_TEST_CASE(PosixStdlibAtoiTest, testStdlibAtoi009, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 9(except):atoi(%d) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(12, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, 12, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ LITE_TEST_CASE(PosixStdlibAtoiTest, testStdlibAtoi010, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 10(except):atoi(%d) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(-10, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, -10, value);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -78,7 +78,7 @@ LITE_TEST_CASE(PosixStdlibAtolTest, testStdlibAtol001, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 1:atol(%ld) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(2147483647, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, 2147483647, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ LITE_TEST_CASE(PosixStdlibAtolTest, testStdlibAtol002, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 2:atol(%ld) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(-2147483648, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, -2147483648, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ LITE_TEST_CASE(PosixStdlibAtolTest, testStdlibAtol003, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 3:atol(%ld) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(100, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, 100, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ LITE_TEST_CASE(PosixStdlibAtolTest, testStdlibAtol004, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 4(except):atol(%ld) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(-2147483648, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, -2147483648, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ LITE_TEST_CASE(PosixStdlibAtolTest, testStdlibAtol005, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 5(except):atoi(%d) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(2147483647, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, 2147483647, value);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@@ -165,7 +165,7 @@ LITE_TEST_CASE(PosixStdlibAtolTest, testStdlibAtol006, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 6:atol(%ld) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(100, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, 100, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ LITE_TEST_CASE(PosixStdlibAtolTest, testStdlibAtol007, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 7:atoi(%ld) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(-100, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, -100, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ LITE_TEST_CASE(PosixStdlibAtolTest, testStdlibAtol008, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 8(except):atol(%ld) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(0, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, 0, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ LITE_TEST_CASE(PosixStdlibAtolTest, testStdlibAtol009, Function | MediumTest | L
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 9(except):atol(%ld) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(12, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, 12, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ LITE_TEST_CASE(PosixStdlibAtollTest, testStdlibAtoll001, Function | MediumTest |
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 1:atoll(%lld) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_TRUE(value == 9223372036854775807LL);
|
||||
ICUNIT_ASSERT_EQUAL(value, 9223372036854775807LL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ LITE_TEST_CASE(PosixStdlibAtollTest, testStdlibAtoll002, Function | MediumTest |
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 2:atoll(%lld) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_TRUE(value == -9223372036854775808ULL);
|
||||
ICUNIT_ASSERT_EQUAL(value, -9223372036854775808ULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ LITE_TEST_CASE(PosixStdlibAtollTest, testStdlibAtoll003, Function | MediumTest |
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 3:atoll(%lld) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_TRUE(value == 100LL);
|
||||
ICUNIT_ASSERT_EQUAL(value, 100LL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ LITE_TEST_CASE(PosixStdlibAtollTest, testStdlibAtoll004, Function | MediumTest |
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 4(except):atoll(%lld) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT64(LLONG_MIN, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, LLONG_MIN, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ LITE_TEST_CASE(PosixStdlibAtollTest, testStdlibAtoll005, Function | MediumTest |
|
||||
LOG("[DEMO] posix stdlib test case 5(except):atoll(%lld) fail.\n", value);
|
||||
}
|
||||
|
||||
TEST_ASSERT_EQUAL_INT64(LLONG_MAX, value);
|
||||
ICUNIT_ASSERT_EQUAL(value, LLONG_MAX, 0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@@ -167,7 +167,7 @@ LITE_TEST_CASE(PosixStdlibAtollTest, testStdlibAtoll006, Function | MediumTest |
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 6:atoll(%lld) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_TRUE(value == 100LL);
|
||||
ICUNIT_ASSERT_EQUAL(value, 100LL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ LITE_TEST_CASE(PosixStdlibAtollTest, testStdlibAtoll007, Function | MediumTest |
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 7:atoll(%lld) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_TRUE(value == -100LL);
|
||||
ICUNIT_ASSERT_EQUAL(value, -100LL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ LITE_TEST_CASE(PosixStdlibAtollTest, testStdlibAtoll008, Function | MediumTest |
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 8(except):atoll(%lld) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_TRUE(value == 0LL);
|
||||
ICUNIT_ASSERT_EQUAL(value, 0LL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ LITE_TEST_CASE(PosixStdlibAtollTest, testStdlibAtoll009, Function | MediumTest |
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 9(except):atoll(%lld) fail.\n", value);
|
||||
}
|
||||
TEST_ASSERT_TRUE(value == 12LL);
|
||||
ICUNIT_ASSERT_EQUAL(value, 12LL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,8 +80,8 @@ LITE_TEST_CASE(PosixStdlibStrtolTest, testStdlibStrtol001, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 1:strtol(base=16) ret:%ld,%s fail.\n", ret, nPtr16);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(16, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr16, "");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 16, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr16, "", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -100,8 +100,8 @@ LITE_TEST_CASE(PosixStdlibStrtolTest, testStdlibStrtol002, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 2:strtol(base=16) ret:%ld,%s fail.\n", ret, nPtr16);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(16, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr16, "");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 16, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr16, "", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -120,8 +120,8 @@ LITE_TEST_CASE(PosixStdlibStrtolTest, testStdlibStrtol003, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 3:strtol(base=10) ret:%ld,%s fail.\n", ret, nPtr10);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(10, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr10, "");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 10, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr10, "", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -140,8 +140,8 @@ LITE_TEST_CASE(PosixStdlibStrtolTest, testStdlibStrtol004, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 4:strtol(base=10) ret:%ld,%s fail.\n", ret, nPtr10);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(-10, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr10, "");
|
||||
ICUNIT_ASSERT_EQUAL(ret, -10, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr10, "", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -160,8 +160,8 @@ LITE_TEST_CASE(PosixStdlibStrtolTest, testStdlibStrtol005, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 5:strtol(base=0) ret:%ld,%s fail.\n", ret, nPtr10_3);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(10, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr10_3, "");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 10, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr10_3, "", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -180,8 +180,8 @@ LITE_TEST_CASE(PosixStdlibStrtolTest, testStdlibStrtol006, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 6:strtol(base=8) ret:%ld,%s fail.\n", ret, nPtr8);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(8, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr8, "");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 8, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr8, "", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -200,8 +200,8 @@ LITE_TEST_CASE(PosixStdlibStrtolTest, testStdlibStrtol007, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 7:strtol(base=8) ret:%ld,%s fail.\n", ret, nPtr8_2);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(8, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr8_2, "");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 8, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr8_2, "", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -220,8 +220,8 @@ LITE_TEST_CASE(PosixStdlibStrtolTest, testStdlibStrtol008, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 8:strtol(base=8) ret:%ld,%s fail.\n", ret, nPtr8_3);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(8, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr8_3, "");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 8, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr8_3, "", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -240,8 +240,8 @@ LITE_TEST_CASE(PosixStdlibStrtolTest, testStdlibStrtol009, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 9:strtol(base=2) ret:%ld,%s fail.\n", ret, nPtr2);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(2, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr2, "");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 2, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr2, "", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -260,8 +260,8 @@ LITE_TEST_CASE(PosixStdlibStrtolTest, testStdlibStrtol010, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 10:strtol(base=10) ret:%ld, %s fail.\n", ret, endPtr);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(12, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, " 0110 0XDEFE 0666 -1.6");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 12, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, " 0110 0XDEFE 0666 -1.6", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -281,8 +281,8 @@ LITE_TEST_CASE(PosixStdlibStrtolTest, testStdlibStrtol011, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 11:strtol(base=65) ret:%ld, %s fail.\n", ret, endPtr);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(0, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, "12 1.5");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, "12 1.5", 0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@@ -297,8 +297,8 @@ LITE_TEST_CASE(PosixStdlibStrtolTest, testStdlibStrtol012, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 12:strtol(base=10) ret:%ld, %s fail.\n", ret, endPtr);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(2147483647, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, " -2147483648");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 2147483647, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, " -2147483648", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -317,8 +317,8 @@ LITE_TEST_CASE(PosixStdlibStrtolTest, testStdlibStrtol013, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 13:strtol(base=10) ret:%ld, %s fail.\n", ret, endPtr);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT32(-2147483648, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, "");
|
||||
ICUNIT_ASSERT_EQUAL(ret, -2147483648, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, "", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,8 +81,8 @@ LITE_TEST_CASE(PosixStdlibStrtoulTest, testStdlibStrtoul001, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 1:strtoul(base=10) ret:%lu,%s fail.\n", ret, nPtr);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_UINT32(12UL, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, " 0110 0XDEFE 0666 4294967295 4294967296 12.34");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 12UL, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, " 0110 0XDEFE 0666 4294967295 4294967296 12.34", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -101,8 +101,8 @@ LITE_TEST_CASE(PosixStdlibStrtoulTest, testStdlibStrtoul002, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 2:strtoul(base=2) ret:%lu,%s fail.\n", ret, endPtr);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_UINT32(6UL, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, " 0XDEFE 0666 4294967295 4294967296 12.34");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 6UL, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, " 0XDEFE 0666 4294967295 4294967296 12.34", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -121,8 +121,8 @@ LITE_TEST_CASE(PosixStdlibStrtoulTest, testStdlibStrtoul003, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 3:strtoul(base=16) ret:%lu,%s fail.\n", ret, endPtr);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_UINT32(0XDEFEUL, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, " 0666 4294967295 4294967296 12.34");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0XDEFEUL, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, " 0666 4294967295 4294967296 12.34", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -141,8 +141,8 @@ LITE_TEST_CASE(PosixStdlibStrtoulTest, testStdlibStrtoul004, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 4:strtoul(base=8) ret:%lu,%s fail.\n", ret, endPtr);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_UINT32(0666UL, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, " 4294967295 4294967296 12.34");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0666UL, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, " 4294967295 4294967296 12.34", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -161,8 +161,8 @@ LITE_TEST_CASE(PosixStdlibStrtoulTest, testStdlibStrtoul005, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 5:strtoul(base=0) ret:%lu,%s fail.\n", ret, endPtr);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_UINT32(4294967295UL, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, " 4294967296 12.34");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 4294967295UL, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, " 4294967296 12.34", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -182,8 +182,8 @@ LITE_TEST_CASE(PosixStdlibStrtoulTest, testStdlibStrtoul006, Function | MediumTe
|
||||
LOG("[DEMO] posix stdlib test case 6:strtoul(base=0) ret:%lu,%s fail.\n", ret, endPtr);
|
||||
}
|
||||
|
||||
TEST_ASSERT_EQUAL_UINT32(ULONG_MAX, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, " 12.34");
|
||||
ICUNIT_ASSERT_EQUAL(ret, ULONG_MAX, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, " 12.34", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -203,8 +203,8 @@ LITE_TEST_CASE(PosixStdlibStrtoulTest, testStdlibStrtoul007, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 7:strtoul(base=65) ret:%lu,%s fail.\n", ret, endPtr);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_UINT32(0UL, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, " 12.34");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0UL, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, " 12.34", 0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@@ -224,8 +224,8 @@ LITE_TEST_CASE(PosixStdlibStrtoulTest, testStdlibStrtoul008, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 8:strtoul(base=0) ret:%lu,%s fail.\n", ret, endPtr);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_UINT32(0UL, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, ".34");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0UL, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, ".34", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -244,8 +244,8 @@ LITE_TEST_CASE(PosixStdlibStrtoulTest, testStdlibStrtoul009, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 9:strtoul(base=0) ret:%lu,%s fail.\n", ret, endPtr);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_UINT32(0XDEFE, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, " 0666");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0XDEFE, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, " 0666", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -264,8 +264,8 @@ LITE_TEST_CASE(PosixStdlibStrtoulTest, testStdlibStrtoul010, Function | MediumTe
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 9:strtoul(base=0) ret:%lu,%s fail.\n", ret, endPtr);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_UINT32(0666, ret);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, "");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0666, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, "", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,8 +82,8 @@ LITE_TEST_CASE(PosixStdlibStrtoullTest, testStdlibStrtoull001, Function | Medium
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 1:strtoull(base=10) ret:%llu,%s fail.\n", ret, nPtr);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == 12ULL);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, " 0110 0XDEFE 0666 1.6");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 12ULL, 0);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, " 0110 0XDEFE 0666 1.6", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -102,8 +102,8 @@ LITE_TEST_CASE(PosixStdlibStrtoullTest, testStdlibStrtoull002, Function | Medium
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 2:strtoull(base=2) ret:%llu,%s fail.\n", ret, nPtr);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == 6ULL);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, " 0XDEFE 0666 1.6");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 6ULL, 0);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, " 0XDEFE 0666 1.6", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -122,8 +122,8 @@ LITE_TEST_CASE(PosixStdlibStrtoullTest, testStdlibStrtoull003, Function | Medium
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 3:strtoull(base=16) ret:%llu,%s fail.\n", ret, nPtr);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == 0XDEFEULL);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, " 0666 1.6");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0XDEFEULL, 0);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, " 0666 1.6", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -142,8 +142,8 @@ LITE_TEST_CASE(PosixStdlibStrtoullTest, testStdlibStrtoull004, Function | Medium
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 4:strtoull(base=8) ret:%llu,%s fail.\n", ret, nPtr);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == 0666ULL);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, " 1.6");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0666ULL, 0);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, " 1.6", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -163,8 +163,8 @@ LITE_TEST_CASE(PosixStdlibStrtoullTest, testStdlibStrtoull005, Function | Medium
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 5:strtoull(base=65) ret:%llu,%s fail.\n", ret, nPtr);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == 0ULL);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, " 1.6");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0ULL, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, " 1.6", 0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@@ -184,8 +184,8 @@ LITE_TEST_CASE(PosixStdlibStrtoullTest, testStdlibStrtoull006, Function | Medium
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 6:strtoull(base=0) ret:%llu,%s fail.\n", ret, nPtr);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == 0ULL);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, ".6");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0ULL, 0);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, ".6", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -204,8 +204,8 @@ LITE_TEST_CASE(PosixStdlibStrtoullTest, testStdlibStrtoull007, Function | Medium
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 7:strtoull(base=10) ret:%llu,%s fail.\n", ret, nPtr);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == 18446744073709551615ULL);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, " 18446744073709551616");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 18446744073709551615ULL, 0);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, " 18446744073709551616", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -225,9 +225,9 @@ LITE_TEST_CASE(PosixStdlibStrtoullTest, testStdlibStrtoull008, Function | Medium
|
||||
LOG("[DEMO] posix stdlib test case 8:strtoull(base=10) ret:%llu,%s fail.\n", ret, nPtr);
|
||||
}
|
||||
|
||||
TEST_ASSERT_EQUAL_UINT64(ULLONG_MAX, ret);
|
||||
TEST_ASSERT_EQUAL_INT(ERANGE, errno);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, "");
|
||||
ICUNIT_ASSERT_EQUAL(ret, ULLONG_MAX, ret);
|
||||
ICUNIT_ASSERT_EQUAL(errno, ERANGE, errno);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, "", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -246,8 +246,8 @@ LITE_TEST_CASE(PosixStdlibStrtoullTest, testStdlibStrtoull009, Function | Medium
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 9:strtoull(base=0) ret:%llu,%s fail.\n", ret, nPtr);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == 0XDEFEULL);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, " 0666");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0XDEFEULL, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, " 0666", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -266,8 +266,8 @@ LITE_TEST_CASE(PosixStdlibStrtoullTest, testStdlibStrtoull010, Function | Medium
|
||||
} else {
|
||||
LOG("[DEMO] posix stdlib test case 10:strtoull(base=0) ret:%llu,%s fail.\n", ret, nPtr);
|
||||
}
|
||||
TEST_ASSERT_TRUE(ret == 0666ULL);
|
||||
TEST_ASSERT_EQUAL_STRING(endPtr, "");
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0666ULL, ret);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(endPtr, "", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,12 +77,12 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemMemcpy001, Function | MediumTest
|
||||
char dest[1024] = {0};
|
||||
retValue = memcpy(dest, source, sizeof(source) / sizeof(source[0]));
|
||||
|
||||
TEST_ASSERT_NOT_NULL(retValue);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(retValue, NULL, 0);
|
||||
|
||||
retValue = memcpy(source, dest, sizeof(source) / sizeof(source[0]));
|
||||
TEST_ASSERT_NOT_NULL(retValue);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(retValue, NULL, 0);
|
||||
|
||||
TEST_ASSERT_EQUAL_STRING(dest, source);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(dest, source, 0);
|
||||
|
||||
int len;
|
||||
char chr = 'A';
|
||||
@@ -95,7 +95,7 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemMemcpy001, Function | MediumTest
|
||||
|
||||
memcpy(&buf[16], &buf[0], 16);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
TEST_ASSERT_EQUAL_INT((int)buf[i + 16], (int)buf[i]);
|
||||
ICUNIT_ASSERT_EQUAL(buf[i + 16], buf[i], 0);
|
||||
if (buf[i + 16] != buf[i]) {
|
||||
printf("String Copy error \r\n");
|
||||
break;
|
||||
@@ -118,11 +118,11 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemMemcpy002, Function | MediumTest
|
||||
" immediate use in a computer\r\n"};
|
||||
char dest[1024] = {0};
|
||||
retValue = memcpy(dest, source, sizeof(source) / sizeof(source[0]));
|
||||
TEST_ASSERT_NOT_NULL(retValue);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(retValue, NULL, 0);
|
||||
|
||||
retValue = memcpy(source, dest, sizeof(source) / sizeof(source[0]));
|
||||
TEST_ASSERT_NOT_NULL(retValue);
|
||||
TEST_ASSERT_EQUAL_STRING(source, dest);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(retValue, NULL, 0);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(dest, source, 0);
|
||||
|
||||
char chr = 'A';
|
||||
int i, len, failure;
|
||||
@@ -142,7 +142,7 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemMemcpy002, Function | MediumTest
|
||||
break;
|
||||
}
|
||||
}
|
||||
TEST_ASSERT_EQUAL_INT(0, failure);
|
||||
ICUNIT_ASSERT_EQUAL(failure, 0, failure);
|
||||
return 0;
|
||||
};
|
||||
|
||||
@@ -159,11 +159,11 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemMemset001, Function | MediumTest
|
||||
" immediate use in a computer\r\n"};
|
||||
char ch = rand() % 26 + 'A';
|
||||
retValue = memset(source, ch, sizeof(source) / sizeof(source[0]));
|
||||
TEST_ASSERT_NOT_NULL(retValue);
|
||||
TEST_ASSERT_EQUAL_PTR(source, retValue);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(retValue, NULL, 0);
|
||||
ICUNIT_ASSERT_EQUAL(retValue, source, 0);
|
||||
|
||||
for (int i = 0; i < (sizeof(source) / sizeof(source[0])); i++) {
|
||||
TEST_ASSERT_EQUAL_INT((int)ch, (int)source[i]);
|
||||
ICUNIT_ASSERT_EQUAL(source[i], ch, 0);
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
@@ -183,7 +183,7 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemMemcmp001, Function | MediumTest
|
||||
"immediate use in a computer\r\n"};
|
||||
|
||||
retValue = memcmp(source, dest, sizeof(source) / sizeof(source[0]));
|
||||
TEST_ASSERT_EQUAL_INT(0, retValue);
|
||||
ICUNIT_ASSERT_EQUAL(retValue, 0, retValue);
|
||||
|
||||
|
||||
char orign[8] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88};
|
||||
@@ -195,16 +195,16 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemMemcmp001, Function | MediumTest
|
||||
int len = sizeof(orign);
|
||||
|
||||
ret = memcmp(orign, lt, len);
|
||||
TEST_ASSERT_GREATER_THAN(0, ret);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ret, 1, ret, 0);
|
||||
|
||||
ret = memcmp(eq, orign, len);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
|
||||
ret = memcmp(orign, gt, len);
|
||||
TEST_ASSERT_LESS_THAN(0, ret);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ret, ret, -1, 0);
|
||||
|
||||
ret = memcmp(gt, orign, 0);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
};
|
||||
|
||||
@@ -221,16 +221,16 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemMemcmp002, Function | MediumTest
|
||||
"immediate use in a computer\r\n"};
|
||||
char dest[] = {"Hello, Richard, how are you?\r\n"};
|
||||
retValue = memcmp(source, dest, sizeof(dest) / sizeof(dest[0]));
|
||||
TEST_ASSERT_GREATER_THAN(0, retValue);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(retValue, 1, retValue, 0);
|
||||
|
||||
int ret = memcmp(L"CBCDEFG", L"BBCDEFG", 7);
|
||||
TEST_ASSERT_GREATER_THAN(0, ret);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ret, 1, ret, 0);
|
||||
|
||||
ret = memcmp(L"ABCDEFG", L"abcdefg", 2);
|
||||
TEST_ASSERT_LESS_THAN(0, ret);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ret, ret, -1, 0);
|
||||
|
||||
ret = memcmp(L"ABCDEFG", L"ABCDEFG", 6);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
};
|
||||
|
||||
@@ -247,7 +247,7 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemMemcmp003, Function | MediumTest
|
||||
char dest[] = {"memory refers to the computer hardware devices used to store information for "
|
||||
"immediate use in a computer\r\n"};
|
||||
retValue = memcmp(source, dest, sizeof(source) / sizeof(source[0]));
|
||||
TEST_ASSERT_LESS_THAN(0, retValue);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(retValue, retValue, -1, 0);
|
||||
return 0;
|
||||
};
|
||||
|
||||
@@ -261,7 +261,7 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemRealloc001, Function | MediumTest
|
||||
{
|
||||
char *source = (char *)malloc(20);
|
||||
source = (char *)realloc(source, 0);
|
||||
TEST_ASSERT_NULL(source);
|
||||
ICUNIT_ASSERT_EQUAL(source, NULL, 0);
|
||||
|
||||
size_t k, len, mlen, rlen;
|
||||
for (int i = 0; i < 5; i++) {
|
||||
@@ -272,7 +272,7 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemRealloc001, Function | MediumTest
|
||||
|
||||
mlen = 10;
|
||||
mem = malloc(mlen);
|
||||
TEST_ASSERT_NOT_NULL(mem);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(mem, NULL, 0);
|
||||
|
||||
(void)memset_s(mem, mlen, testChar, mlen);
|
||||
rlen = rand() % (1024) + mlen;
|
||||
@@ -280,7 +280,7 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemRealloc001, Function | MediumTest
|
||||
if (mem1 == NULL) {
|
||||
free(mem);
|
||||
}
|
||||
TEST_ASSERT_NOT_NULL(mem1);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(mem1, NULL, 0);
|
||||
|
||||
len = mlen <= rlen ? mlen : rlen;
|
||||
|
||||
@@ -292,7 +292,7 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemRealloc001, Function | MediumTest
|
||||
}
|
||||
|
||||
free(mem1);
|
||||
TEST_ASSERT_EQUAL_INT(0, failure);
|
||||
ICUNIT_ASSERT_EQUAL(failure, 0, failure);
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
@@ -308,7 +308,7 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemRealloc002, Function | MediumTest
|
||||
char *source = (char *)malloc(20);
|
||||
|
||||
char *newData = (char *)realloc(source, 40);
|
||||
TEST_ASSERT_NOT_NULL(newData);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(newData, NULL, 0);
|
||||
if (newData != NULL) {
|
||||
source = newData;
|
||||
}
|
||||
@@ -318,10 +318,10 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemRealloc002, Function | MediumTest
|
||||
const size_t large = 4096;
|
||||
|
||||
void *mem = malloc(len);
|
||||
TEST_ASSERT_NOT_NULL(mem);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(mem, NULL, 0);
|
||||
|
||||
void *reMem = realloc(mem, large);
|
||||
TEST_ASSERT_NOT_NULL(reMem);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(reMem, NULL, 0);
|
||||
|
||||
if (reMem != NULL) {
|
||||
mem = reMem;
|
||||
@@ -341,7 +341,7 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemRealloc003, Function | MediumTest
|
||||
char *retValue = NULL;
|
||||
|
||||
retValue = (char *)realloc(retValue, 20);
|
||||
TEST_ASSERT_NOT_NULL(retValue);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(retValue, NULL, 0);
|
||||
return 0;
|
||||
};
|
||||
|
||||
@@ -355,7 +355,7 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemRealloc004, Function | MediumTest
|
||||
char *source = (char *)malloc(20);
|
||||
|
||||
char *newData = (char *)realloc(source, 10);
|
||||
TEST_ASSERT_NOT_NULL(newData);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(newData, NULL, 0);
|
||||
|
||||
if (newData != NULL) {
|
||||
source = newData;
|
||||
|
||||
@@ -79,7 +79,7 @@ LITE_TEST_CASE(PosixStringStrchrTest, testStringStrchr001, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 1:strchr(!) %s fail.\n", src);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_STRING(ret, "!! world");
|
||||
ICUNIT_ASSERT_STRING_EQUAL(ret, "!! world", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ LITE_TEST_CASE(PosixStringStrchrTest, testStringStrchr002, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 2:strchr(l) %s fail.\n", src);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_STRING(ret, "llo !! world");
|
||||
ICUNIT_ASSERT_STRING_EQUAL(ret, "llo !! world", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ LITE_TEST_CASE(PosixStringStrchrTest, testStringStrchr003, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 3:strchr(\'\\0\') %s fail.\n", src);
|
||||
}
|
||||
TEST_ASSERT_NOT_NULL(ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ LITE_TEST_CASE(PosixStringStrchrTest, testStringStrchr004, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 4(except):strchr(?) %s fail.\n", src);
|
||||
}
|
||||
TEST_ASSERT_NULL(ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ LITE_TEST_CASE(PosixStringStrchrTest, testStringStrchr005, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 5(except):strchr(m) %s fail.\n", src);
|
||||
}
|
||||
TEST_ASSERT_NULL(ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ LITE_TEST_CASE(PosixStringStrchrTest, testStringStrchr006, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 6(except):strchr(0) %s fail.\n", src);
|
||||
}
|
||||
TEST_ASSERT_NOT_NULL(ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrlen001, Function | MediumT
|
||||
{
|
||||
char src[] = "helloworld";
|
||||
int ret = strlen(src);
|
||||
TEST_ASSERT_EQUAL_INT(10, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 10, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrlen002, Function | MediumT
|
||||
{
|
||||
char src[] = "hello world";
|
||||
int ret = strlen(src);
|
||||
TEST_ASSERT_EQUAL_INT(11, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 11, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrlen002, Function | MediumT
|
||||
LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrlen003, Function | MediumTest | Level1)
|
||||
{
|
||||
int ret = strlen("");
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrlen004, Function | MediumT
|
||||
{
|
||||
char src[] = "hello\0world";
|
||||
int ret = strlen(src);
|
||||
TEST_ASSERT_EQUAL_INT(5, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 5, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrlen005, Function | MediumT
|
||||
{
|
||||
char src[] = "\0helloworld";
|
||||
int ret = strlen(src);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrncasecmp001, Function | Me
|
||||
{
|
||||
char *src[] = {"helloworld", "HElloworld"};
|
||||
int ret = strncasecmp(src[0], src[1], 2);
|
||||
TEST_ASSERT_EQUAL_INT(RET_OK, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, RET_OK, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrncasecmp002, Function | Me
|
||||
{
|
||||
char *src[] = {"helloworld", "he\0lloworld"};
|
||||
int ret = strncasecmp(src[0], src[1], 3);
|
||||
TEST_ASSERT_GREATER_THAN(RET_OK, ret);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ret, RET_OK + 1, ret, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrncasecmp003, Function | Me
|
||||
{
|
||||
char *src[] = {"helloworld", "he lloworld"};
|
||||
int ret = strncasecmp(src[0], src[1], 3);
|
||||
TEST_ASSERT_GREATER_THAN(RET_OK, ret);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ret, RET_OK + 1, ret, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrncasecmp004, Function | Me
|
||||
{
|
||||
char *src[] = {"helloworld", "hello World"};
|
||||
int ret = strncasecmp(src[0], src[1], 3);
|
||||
TEST_ASSERT_EQUAL_INT(RET_OK, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, RET_OK, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrncasecmp005, Function | Me
|
||||
{
|
||||
char *src[] = {"helloworld", "\0"};
|
||||
int ret = strncasecmp(src[0], src[1], 1);
|
||||
TEST_ASSERT_GREATER_THAN(RET_OK, ret);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ret, RET_OK + 1, ret, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrncmp001, Function | Medium
|
||||
{
|
||||
char *src[] = {"helloworld", "HELloworld"};
|
||||
int ret = strncmp(src[0], src[1], 3);
|
||||
TEST_ASSERT_GREATER_THAN(RET_OK, ret);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ret, RET_OK + 1, ret, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrncmp002, Function | Medium
|
||||
{
|
||||
char *src[] = {"helloworld", "he\0lloworld"};
|
||||
int ret = strncmp(src[0], src[1], 3);
|
||||
TEST_ASSERT_GREATER_THAN(RET_OK, ret);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ret, RET_OK + 1, ret, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrncmp003, Function | Medium
|
||||
{
|
||||
char *src[] = {"helloworld", "he lloworld"};
|
||||
int ret = strncmp(src[0], src[1], 3);
|
||||
TEST_ASSERT_GREATER_THAN(RET_OK, ret);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ret, RET_OK + 1, ret, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrncmp004, Function | Medium
|
||||
{
|
||||
char *src[] = {"helloworld", "hello World"};
|
||||
int ret = strncmp(src[0], src[1], 3);
|
||||
TEST_ASSERT_EQUAL_INT(RET_OK, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, RET_OK, ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrncmp005, Function | Medium
|
||||
{
|
||||
char *src[] = {"helloworld", "\0"};
|
||||
int ret = strncmp(src[0], src[1], 3);
|
||||
TEST_ASSERT_GREATER_THAN(RET_OK, ret);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ret, RET_OK + 1, ret, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -272,8 +272,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrrchr001, Function | Medium
|
||||
{
|
||||
char src[] = "hello world";
|
||||
char *ret = strrchr(src, '!');
|
||||
TEST_ASSERT_EQUAL_PTR(NULL, ret);
|
||||
TEST_ASSERT_NULL(ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -286,8 +285,8 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrrchr002, Function | Medium
|
||||
{
|
||||
char src[] = "hello world";
|
||||
char *ret = strrchr(src, '\0');
|
||||
TEST_ASSERT_EQUAL_PTR(src + 11, ret);
|
||||
TEST_ASSERT_NOT_NULL(ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, src + 11, 0);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -300,8 +299,8 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrrchr003, Function | Medium
|
||||
{
|
||||
char src[] = "hello\0world";
|
||||
char *ret = strrchr(src, '\0');
|
||||
TEST_ASSERT_EQUAL_PTR(src + 5, ret);
|
||||
TEST_ASSERT_NOT_NULL(ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, src + 5, 0);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -314,8 +313,8 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrrchr004, Function | Medium
|
||||
{
|
||||
char src[] = "hello world";
|
||||
char *ret = strrchr(src, ' ');
|
||||
TEST_ASSERT_EQUAL_PTR(src + 5, ret);
|
||||
TEST_ASSERT_NOT_NULL(ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, src + 5, 0);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -328,8 +327,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStringStrrchr005, Function | Medium
|
||||
{
|
||||
char src[] = "hello\0world";
|
||||
char *ret = strrchr(src, ' ');
|
||||
TEST_ASSERT_EQUAL_PTR(NULL, ret);
|
||||
TEST_ASSERT_NULL(ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,19 +82,19 @@ static BOOL PosixStringsFuncTestSuiteTearDown(void)
|
||||
LITE_TEST_CASE(PosixStringsFuncTestSuite, testStrCaseCmp001, Function | MediumTest | Level1)
|
||||
{
|
||||
int ret = strcasecmp("", "");
|
||||
TEST_ASSERT_EQUAL_INT(EQUAL, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, EQUAL, ret);
|
||||
|
||||
ret = strcasecmp("abcdefg", "abcdefg");
|
||||
TEST_ASSERT_EQUAL_INT(EQUAL, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, EQUAL, ret);
|
||||
|
||||
ret = strcasecmp("abcdefg", "abcdEFg");
|
||||
TEST_ASSERT_EQUAL_INT(EQUAL, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, EQUAL, ret);
|
||||
|
||||
ret = strcasecmp("abcdefg", "abcdEF");
|
||||
TEST_ASSERT_NOT_EQUAL(EQUAL, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, EQUAL, ret);
|
||||
|
||||
ret = strcasecmp("abcdef", "abcdEFg");
|
||||
TEST_ASSERT_NOT_EQUAL(EQUAL, ret);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(ret, EQUAL, ret);
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -78,14 +78,14 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStrstrcmp001, Function | MediumTest
|
||||
char dest[] = {"Compiler exited with error"};
|
||||
|
||||
retValue = strcmp(source, dest);
|
||||
TEST_ASSERT_EQUAL_INT(0, retValue);
|
||||
ICUNIT_ASSERT_EQUAL(retValue, 0, retValue);
|
||||
|
||||
int ret = strcmp("abcdef", "ABCDEF");
|
||||
TEST_ASSERT_GREATER_THAN(0, ret);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ret, 1, ret, 0);
|
||||
|
||||
ret = strcmp("123456", "654321");
|
||||
TEST_ASSERT_LESS_THAN(0, ret);
|
||||
TEST_ASSERT_EQUAL_INT(0, strcmp("~!@#$%^&*()_+", "~!@#$%^&*()_+"));
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ret, ret, -1, 0);
|
||||
ICUNIT_ASSERT_EQUAL(strcmp("~!@#$%^&*()_+", "~!@#$%^&*()_+"), 0, 0);
|
||||
return 0;
|
||||
};
|
||||
|
||||
@@ -102,7 +102,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStrstrcmp002, Function | MediumTest
|
||||
char dest[] = {"00000000000"};
|
||||
|
||||
retValue = strcmp(source, dest);
|
||||
TEST_ASSERT_GREATER_THAN(0, retValue);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(retValue, 1, retValue, 0);
|
||||
return 0;
|
||||
};
|
||||
|
||||
@@ -119,7 +119,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStrstrcmp003, Function | MediumTest
|
||||
char dest[] = {"Compiler exited with error"};
|
||||
|
||||
retValue = strcmp(source, dest);
|
||||
TEST_ASSERT_LESS_THAN(0, retValue);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(retValue, retValue, -1, 0);
|
||||
return 0;
|
||||
};
|
||||
|
||||
@@ -135,18 +135,18 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStrStrdup001, Function | MediumTest
|
||||
char *dest;
|
||||
|
||||
dest = strdup(source);
|
||||
TEST_ASSERT_NOT_NULL(dest);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(dest, NULL, 0);
|
||||
printf("The Result Display :%s\r\n", dest);
|
||||
TEST_ASSERT_EQUAL_CHAR_ARRAY(source, dest, sizeof(source) / sizeof(source[0]));
|
||||
ICUNIT_ASSERT_SIZE_STRING_EQUAL(dest, source, sizeof(source) / sizeof(source[0]), 0);
|
||||
|
||||
char src[] = "hello world !";
|
||||
char *ret = strdup(src);
|
||||
TEST_ASSERT_EQUAL_CHAR_ARRAY(src, ret, sizeof(src) / sizeof(src[0]));
|
||||
ICUNIT_ASSERT_SIZE_STRING_EQUAL(ret, src, sizeof(src) / sizeof(src[0]), 0);
|
||||
free(ret);
|
||||
|
||||
char srcS[] = "This is String1";
|
||||
ret = strdup(srcS);
|
||||
TEST_ASSERT_EQUAL_CHAR_ARRAY("This is String1", ret, sizeof(srcS) / sizeof(srcS[0]));
|
||||
ICUNIT_ASSERT_SIZE_STRING_EQUAL(ret, "This is String1", sizeof(srcS) / sizeof(srcS[0]), 0);
|
||||
free(ret);
|
||||
return 0;
|
||||
};
|
||||
@@ -163,9 +163,9 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStrStrdup002, Function | MediumTest
|
||||
char *dest;
|
||||
|
||||
dest = strdup(source);
|
||||
TEST_ASSERT_NOT_NULL(dest);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(dest, NULL, 0);
|
||||
printf("The Result Display :%s\r\n", dest);
|
||||
TEST_ASSERT_EQUAL_CHAR_ARRAY(source, dest, sizeof(source) / sizeof(source[0]));
|
||||
ICUNIT_ASSERT_SIZE_STRING_EQUAL(dest, source, sizeof(source) / sizeof(source[0]), 0);
|
||||
return 0;
|
||||
};
|
||||
|
||||
@@ -182,16 +182,16 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStrStrcspn001, Function | MediumTes
|
||||
char dest1[] = {"H"};
|
||||
|
||||
retValue = strcspn(source, dest1);
|
||||
TEST_ASSERT_EQUAL_INT(18U, retValue);
|
||||
ICUNIT_ASSERT_EQUAL(retValue, 18U, retValue);
|
||||
|
||||
const char dest[] = "hello world !";
|
||||
const char src[] = "!";
|
||||
size_t ret = strcspn(dest, src);
|
||||
TEST_ASSERT_EQUAL_INT(12U, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 12U, ret);
|
||||
|
||||
const char srcS[] = "a";
|
||||
ret = strcspn(dest, srcS);
|
||||
TEST_ASSERT_EQUAL_INT(13U, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 13U, ret);
|
||||
return 0;
|
||||
};
|
||||
|
||||
@@ -207,7 +207,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStrStrcspn002, Function | MediumTes
|
||||
char dest[] = {"or"};
|
||||
|
||||
retValue = strcspn(source, dest);
|
||||
TEST_ASSERT_EQUAL_INT(1, retValue);
|
||||
ICUNIT_ASSERT_EQUAL(retValue, 1, retValue);
|
||||
return 0;
|
||||
};
|
||||
|
||||
@@ -222,12 +222,12 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStrStrptime001, Function | MediumTe
|
||||
struct tm tmData;
|
||||
(void)memset_s(&tmData, sizeof(struct tm), 0, sizeof(struct tm));
|
||||
char *ret = strptime("2020-10-29 21:24:00abc", "%Y-%m-%d %H:%M:%S", &tmData);
|
||||
TEST_ASSERT_EQUAL_CHAR_ARRAY("abc", ret, 3);
|
||||
TEST_ASSERT_EQUAL_INT(120, tmData.tm_year);
|
||||
TEST_ASSERT_EQUAL_INT(9, tmData.tm_mon);
|
||||
TEST_ASSERT_EQUAL_INT(29, tmData.tm_mday);
|
||||
TEST_ASSERT_EQUAL_INT(21, tmData.tm_hour);
|
||||
TEST_ASSERT_EQUAL_INT(24, tmData.tm_min);
|
||||
ICUNIT_ASSERT_SIZE_STRING_EQUAL(ret, "abc", 3, 0);
|
||||
ICUNIT_ASSERT_EQUAL(tmData.tm_year, 120, tmData.tm_year);
|
||||
ICUNIT_ASSERT_EQUAL(tmData.tm_mon, 9, tmData.tm_mon);
|
||||
ICUNIT_ASSERT_EQUAL(tmData.tm_mday, 29, tmData.tm_mday);
|
||||
ICUNIT_ASSERT_EQUAL(tmData.tm_hour, 21, tmData.tm_hour);
|
||||
ICUNIT_ASSERT_EQUAL(tmData.tm_min, 24, tmData.tm_min);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -80,7 +80,7 @@ LITE_TEST_CASE(PosixStringStrStrTest, testStringStrStr001, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 1:strstr(%s) %s fail.\n", srcS, destS);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_STRING(ret, destS);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(ret, destS, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ LITE_TEST_CASE(PosixStringStrStrTest, testStringStrStr002, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 2:strstr(%s) %s fail.\n", srcS, destS);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_STRING(ret, "this is string");
|
||||
ICUNIT_ASSERT_STRING_EQUAL(ret, "this is string", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ LITE_TEST_CASE(PosixStringStrStrTest, testStringStrStr003, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 3:strstr(%s) %s fail.\n", srcT, dest);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_STRING(ret, dest);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(ret, dest, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ LITE_TEST_CASE(PosixStringStrStrTest, testStringStrStr004, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 4(except):strstr(%s) %s fail.\n", src, dest);
|
||||
}
|
||||
TEST_ASSERT_NULL(ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ LITE_TEST_CASE(PosixStringStrStrTest, testStringStrStr005, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 5(except):strstr(%s) %s fail.\n", src, dest);
|
||||
}
|
||||
TEST_ASSERT_NULL(ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ LITE_TEST_CASE(PosixStringStrStrTest, testStringStrStr006, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 6:strstr(%s) %s fail.\n", srcOne, destS);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_STRING(ret, "tring this is string");
|
||||
ICUNIT_ASSERT_STRING_EQUAL(ret, "tring this is string", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ LITE_TEST_CASE(PosixStringStrStrTest, testStringStrStr007, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 7(except):strstr(%s) %s fail.\n", srcOne, destS);
|
||||
}
|
||||
TEST_ASSERT_NULL(ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ LITE_TEST_CASE(PosixStringStrStrTest, testStringStrStr008, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 8:strstr(%s) %s fail.\n", srcTwo, destS);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_STRING(ret, "this is string");
|
||||
ICUNIT_ASSERT_STRING_EQUAL(ret, "this is string", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ LITE_TEST_CASE(PosixStringStrStrTest, testStringStrStr009, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 9(except):strstr(%s) %s fail.\n", srcTwo2, destS);
|
||||
}
|
||||
TEST_ASSERT_NULL(ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ LITE_TEST_CASE(PosixStringStrStrTest, testStringStrStr010, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 10:strstr(%s) %s fail.\n", srcThree, destS);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_STRING(ret, "this is string");
|
||||
ICUNIT_ASSERT_STRING_EQUAL(ret, "this is string", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ LITE_TEST_CASE(PosixStringStrStrTest, testStringStrStr011, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 11(except):strstr(%s) %s fail.\n", srcThree, destS);
|
||||
}
|
||||
TEST_ASSERT_NULL(ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ LITE_TEST_CASE(PosixStringStrStrTest, testStringStrStr012, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 12:strstr(%s) %s fail.\n", srcFour, destS);
|
||||
}
|
||||
TEST_ASSERT_EQUAL_STRING(ret, "this is string");
|
||||
ICUNIT_ASSERT_STRING_EQUAL(ret, "this is string", 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ LITE_TEST_CASE(PosixStringStrStrTest, testStringStrStr013, Function | MediumTest
|
||||
} else {
|
||||
LOG("[DEMO] posix string test case 13(except):strstr(%s) %s fail.\n", srcFour, destS);
|
||||
}
|
||||
TEST_ASSERT_NULL(ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ static int KeepRun(int msec)
|
||||
struct timespec time1 = { 0, 0 };
|
||||
struct timespec time2 = { 0, 0 };
|
||||
clock_gettime(CLOCK_MONOTONIC, &time1);
|
||||
LOG("KeepRun start : tv_sec=%ld, tv_nsec=%ld\n", time1.tv_sec, time1.tv_nsec);
|
||||
LOG("KeepRun start : tv_sec=%lld, tv_nsec=%ld\n", time1.tv_sec, time1.tv_nsec);
|
||||
int loop = 0;
|
||||
int ran = 0;
|
||||
while (ran < msec) {
|
||||
@@ -111,7 +111,7 @@ static int KeepRun(int msec)
|
||||
ran += (time2.tv_nsec - time1.tv_nsec) / NANOSECONDS_PER_MILLISECOND;
|
||||
}
|
||||
|
||||
LOG("KeepRun end : tv_sec=%ld, tv_nsec=%ld\n", time2.tv_sec, time2.tv_nsec);
|
||||
LOG("KeepRun end : tv_sec=%lld, tv_nsec=%ld\n", time2.tv_sec, time2.tv_nsec);
|
||||
return loop;
|
||||
}
|
||||
|
||||
@@ -158,15 +158,15 @@ LITE_TEST_CASE(PosixTimeFuncTestSuite, testTimeUSleep001, Function | MediumTest
|
||||
clock_gettime(CLOCK_MONOTONIC, &time1);
|
||||
int rt = usleep(interval[j]);
|
||||
clock_gettime(CLOCK_MONOTONIC, &time2);
|
||||
TEST_ASSERT_EQUAL_INT(RET_OK, rt);
|
||||
ICUNIT_ASSERT_EQUAL(rt, RET_OK, rt);
|
||||
duration = (time2.tv_sec - time1.tv_sec) * 1000000 + (time2.tv_nsec - time1.tv_nsec) / 1000;
|
||||
LOG("testloop %d, actual usleep duration: %ld us\n", i, duration);
|
||||
d += duration;
|
||||
}
|
||||
d = d / ACCURACY_TEST_LOOPS; // average
|
||||
LOG("interval:%u, average duration: %.2f\n", interval[j], d);
|
||||
TEST_ASSERT_GREATER_OR_EQUAL(interval[j], d);
|
||||
TEST_ASSERT_INT32_WITHIN(SLEEP_ACCURACY, interval[j], d);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(d, interval[j], d, 0);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(d, interval[j] - SLEEP_ACCURACY, interval[j] + SLEEP_ACCURACY, d);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -183,10 +183,10 @@ LITE_TEST_CASE(PosixTimeFuncTestSuite, testTimeUSleep002, Function | MediumTest
|
||||
clock_gettime(CLOCK_MONOTONIC, &time1);
|
||||
int rt = usleep(0);
|
||||
clock_gettime(CLOCK_MONOTONIC, &time2);
|
||||
TEST_ASSERT_EQUAL_INT(RET_OK, rt);
|
||||
ICUNIT_ASSERT_EQUAL(rt, RET_OK, rt);
|
||||
long long duration = (time2.tv_sec - time1.tv_sec) * 1000000 + (time2.tv_nsec - time1.tv_nsec) / 1000;
|
||||
LOG("\n usleep(0), actual usleep duration: %lld us\n", duration);
|
||||
TEST_ASSERT_LESS_OR_EQUAL_INT64(1000, duration);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(duration, duration, 1000, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -201,27 +201,27 @@ LITE_TEST_CASE(PosixTimeFuncTestSuite, testTimeGmtime001, Function | MediumTest
|
||||
char timeStr[TIME_STR_LEN] = {0};
|
||||
LOG("\nsizeof(time_t) = %d, sizeof(struct tm) = %d", sizeof(time_t), sizeof(struct tm));
|
||||
struct tm *timePtr = gmtime(&time1);
|
||||
TEST_ASSERT_EQUAL_STRING("1970/1/1 05:14:40 WEEK(4)", TmToStr(timePtr, timeStr, TIME_STR_LEN));
|
||||
ICUNIT_ASSERT_STRING_EQUAL("1970/1/1 05:14:40 WEEK(4)", TmToStr(timePtr, timeStr, TIME_STR_LEN), 0);
|
||||
|
||||
time1 = LONG_MAX;
|
||||
timePtr = gmtime(&time1);
|
||||
LOG("\n LONG_MAX = %lld, cvt result : %s", time1, TmToStr(timePtr, timeStr, TIME_STR_LEN));
|
||||
TEST_ASSERT_EQUAL_STRING("2038/1/19 03:14:07 WEEK(2)", TmToStr(timePtr, timeStr, TIME_STR_LEN));
|
||||
ICUNIT_ASSERT_STRING_EQUAL("2038/1/19 03:14:07 WEEK(2)", TmToStr(timePtr, timeStr, TIME_STR_LEN), 0);
|
||||
|
||||
time1 = LONG_MAX - 1;
|
||||
timePtr = gmtime(&time1);
|
||||
LOG("\n LONG_MAX - 1 = %lld, cvt result : %s", time1, TmToStr(timePtr, timeStr, TIME_STR_LEN));
|
||||
TEST_ASSERT_EQUAL_STRING("2038/1/19 03:14:06 WEEK(2)", TmToStr(timePtr, timeStr, TIME_STR_LEN));
|
||||
ICUNIT_ASSERT_STRING_EQUAL("2038/1/19 03:14:06 WEEK(2)", TmToStr(timePtr, timeStr, TIME_STR_LEN), 0);
|
||||
|
||||
time1 = LONG_MIN;
|
||||
timePtr = gmtime(&time1);
|
||||
LOG("\n LONG_MIN = %lld, cvt result : %s", time1, TmToStr(timePtr, timeStr, TIME_STR_LEN));
|
||||
TEST_ASSERT_EQUAL_STRING("1901/12/13 20:45:52 WEEK(5)", TmToStr(timePtr, timeStr, TIME_STR_LEN));
|
||||
ICUNIT_ASSERT_STRING_EQUAL("1901/12/13 20:45:52 WEEK(5)", TmToStr(timePtr, timeStr, TIME_STR_LEN), 0);
|
||||
|
||||
time1 = LONG_MIN + 1;
|
||||
timePtr = gmtime(&time1);
|
||||
LOG("\n LONG_MIN + 1 = %lld, cvt result : %s", time1, TmToStr(timePtr, timeStr, TIME_STR_LEN));
|
||||
TEST_ASSERT_EQUAL_STRING("1901/12/13 20:45:53 WEEK(5)", TmToStr(timePtr, timeStr, TIME_STR_LEN));
|
||||
ICUNIT_ASSERT_STRING_EQUAL("1901/12/13 20:45:53 WEEK(5)", TmToStr(timePtr, timeStr, TIME_STR_LEN), 0);
|
||||
return 0;
|
||||
};
|
||||
|
||||
@@ -246,15 +246,15 @@ LITE_TEST_CASE(PosixTimeFuncTestSuite, testTimeLocaltime001, Function | MediumTe
|
||||
time(&tStart);
|
||||
sleep(2);
|
||||
time(&tEnd);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
|
||||
struct tm *tmStart = localtime(&tStart);
|
||||
strftime(cTime, sizeof(cTime), "%H:%M:%S", tmStart);
|
||||
TEST_ASSERT_EQUAL_STRING("07:59:59", cTime);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(cTime, "07:59:59", 0);
|
||||
LOG("\n time_t=%lld, first time:%s", tStart, cTime);
|
||||
struct tm *tmEnd = localtime(&tEnd);
|
||||
strftime(cTime, sizeof(cTime), "%H:%M:%S", tmEnd);
|
||||
TEST_ASSERT_EQUAL_STRING("08:00:01", cTime);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(cTime, "08:00:01", 0);
|
||||
LOG("\n time_t=%lld, first time:%s", tEnd, cTime);
|
||||
return 0;
|
||||
}
|
||||
@@ -270,25 +270,25 @@ LITE_TEST_CASE(PosixTimeFuncTestSuite, testTimeLocaltime002, Function | MediumTe
|
||||
time_t tStart = LONG_MAX;
|
||||
struct tm *tmStart = localtime(&tStart);
|
||||
strftime(cTime, sizeof(cTime), "%y-%m-%d %H:%M:%S", tmStart);
|
||||
TEST_ASSERT_EQUAL_STRING("38-01-19 11:14:07", cTime);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(cTime, "38-01-19 11:14:07", 0);
|
||||
LOG("\n time_t=%lld, first time:%s", tStart, cTime);
|
||||
|
||||
tStart = LONG_MIN;
|
||||
tmStart = localtime(&tStart);
|
||||
strftime(cTime, sizeof(cTime), "%y-%m-%d %H:%M:%S", tmStart);
|
||||
TEST_ASSERT_EQUAL_STRING("01-12-14 04:45:52", cTime);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(cTime, "01-12-14 04:45:52", 0);
|
||||
LOG("\n time_t=%lld, first time:%s", tStart, cTime);
|
||||
|
||||
tStart = 0;
|
||||
tmStart = localtime(&tStart);
|
||||
strftime(cTime, sizeof(cTime), "%y-%m-%d %H:%M:%S", tmStart);
|
||||
TEST_ASSERT_EQUAL_STRING("70-01-01 08:00:00", cTime);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(cTime, "70-01-01 08:00:00", 0);
|
||||
LOG("\n time_t=%lld, first time:%s", tStart, cTime);
|
||||
|
||||
tStart = -1;
|
||||
tmStart = localtime(&tStart);
|
||||
strftime(cTime, sizeof(cTime), "%y-%m-%d %H:%M:%S", tmStart);
|
||||
TEST_ASSERT_EQUAL_STRING("70-01-01 07:59:59", cTime);
|
||||
ICUNIT_ASSERT_STRING_EQUAL(cTime, "70-01-01 07:59:59", 0);
|
||||
LOG("\n time_t=%lld, first time:%s", tStart, cTime);
|
||||
return 0;
|
||||
}
|
||||
@@ -314,19 +314,19 @@ LITE_TEST_CASE(PosixTimeFuncTestSuite, testTimeLocaltimer001, Function | MediumT
|
||||
time(&tStart);
|
||||
sleep(2);
|
||||
time(&tEnd);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
|
||||
struct tm *tmrStartPtr = localtime_r(&tStart, &tmrStart);
|
||||
struct tm *tmrEndPtr = localtime_r(&tEnd, &tmrEnd);
|
||||
|
||||
strftime(cTime, sizeof(cTime), "%H:%M:%S", &tmrStart);
|
||||
TEST_ASSERT_EQUAL_STRING("07:59:59", cTime);
|
||||
ICUNIT_ASSERT_STRING_EQUAL("07:59:59", cTime, 0);
|
||||
strftime(cTime, sizeof(cTime), "%H:%M:%S", tmrStartPtr);
|
||||
TEST_ASSERT_EQUAL_STRING("07:59:59", cTime);
|
||||
ICUNIT_ASSERT_STRING_EQUAL("07:59:59", cTime, 0);
|
||||
strftime(cTime, sizeof(cTime), "%H:%M:%S", &tmrEnd);
|
||||
TEST_ASSERT_EQUAL_STRING("08:00:01", cTime);
|
||||
ICUNIT_ASSERT_STRING_EQUAL("08:00:01", cTime, 0);
|
||||
strftime(cTime, sizeof(cTime), "%H:%M:%S", tmrEndPtr);
|
||||
TEST_ASSERT_EQUAL_STRING("08:00:01", cTime);
|
||||
ICUNIT_ASSERT_STRING_EQUAL("08:00:01", cTime, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -343,25 +343,25 @@ LITE_TEST_CASE(PosixTimeFuncTestSuite, testTimeLocaltimer002, Function | MediumT
|
||||
time_t tStart = LONG_MAX;
|
||||
struct tm *tmStart = localtime_r(&tStart, &tmrResult);
|
||||
strftime(cTime, sizeof(cTime), "%y-%m-%d %H:%M:%S", tmStart);
|
||||
TEST_ASSERT_EQUAL_STRING("38-01-19 11:14:07", cTime);
|
||||
ICUNIT_ASSERT_STRING_EQUAL("38-01-19 11:14:07", cTime, 0);
|
||||
LOG("\n time_t=%lld, first time:%s", tStart, cTime);
|
||||
|
||||
tStart = LONG_MIN;
|
||||
tmStart = localtime_r(&tStart, &tmrResult);
|
||||
strftime(cTime, sizeof(cTime), "%y-%m-%d %H:%M:%S", tmStart);
|
||||
TEST_ASSERT_EQUAL_STRING("01-12-14 04:45:52", cTime);
|
||||
ICUNIT_ASSERT_STRING_EQUAL("01-12-14 04:45:52", cTime, 0);
|
||||
LOG("\n time_t=%lld, first time:%s", tStart, cTime);
|
||||
|
||||
tStart = 0;
|
||||
tmStart = localtime_r(&tStart, &tmrResult);
|
||||
strftime(cTime, sizeof(cTime), "%y-%m-%d %H:%M:%S", tmStart);
|
||||
TEST_ASSERT_EQUAL_STRING("70-01-01 08:00:00", cTime);
|
||||
ICUNIT_ASSERT_STRING_EQUAL("70-01-01 08:00:00", cTime, 0);
|
||||
LOG("\n time_t=%lld, first time:%s", tStart, cTime);
|
||||
|
||||
tStart = -1;
|
||||
tmStart = localtime_r(&tStart, &tmrResult);
|
||||
strftime(cTime, sizeof(cTime), "%y-%m-%d %H:%M:%S", tmStart);
|
||||
TEST_ASSERT_EQUAL_STRING("70-01-01 07:59:59", cTime);
|
||||
ICUNIT_ASSERT_STRING_EQUAL("70-01-01 07:59:59", cTime, 0);
|
||||
LOG("\n time_t=%lld, first time:%s", tStart, cTime);
|
||||
return 0;
|
||||
}
|
||||
@@ -382,40 +382,40 @@ LITE_TEST_CASE(PosixTimeFuncTestSuite, testTimeMktime001, Function | MediumTest
|
||||
|
||||
// get system timezone
|
||||
int ret = gettimeofday(&tv, &tz);
|
||||
TEST_ASSERT_EQUAL_INT(0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
long sysTimezone = (long)(-tz.tz_minuteswest) * SECS_PER_MIN;
|
||||
LOG("\n system timezone = %ld\n", sysTimezone);
|
||||
|
||||
INIT_TM(testTM, 2020, 7, 9, 18, 10, 0, 7);
|
||||
time_t timeRet = mktime(&testTM);
|
||||
LOG("\n 2020-7-9 18:10:00, mktime Ret = %lld", timeRet);
|
||||
TEST_ASSERT_EQUAL_INT(sysTimezone, testTM.__tm_gmtoff);
|
||||
TEST_ASSERT_EQUAL_INT(1596996600 - testTM.__tm_gmtoff, timeRet);
|
||||
ICUNIT_ASSERT_EQUAL(sysTimezone, testTM.__tm_gmtoff, 0);
|
||||
ICUNIT_ASSERT_EQUAL(1596996600 - testTM.__tm_gmtoff, timeRet, 0);
|
||||
|
||||
INIT_TM(testTM, 1970, 0, 1, 8, 0, 0, 0);
|
||||
timeRet = mktime(&testTM);
|
||||
LOG("\n 1970-1-1 08:00:00, mktime Ret = %lld", timeRet);
|
||||
TEST_ASSERT_EQUAL_INT(sysTimezone, testTM.__tm_gmtoff);
|
||||
TEST_ASSERT_EQUAL_INT(28800 - testTM.__tm_gmtoff, timeRet);
|
||||
ICUNIT_ASSERT_EQUAL(sysTimezone, testTM.__tm_gmtoff, 0);
|
||||
ICUNIT_ASSERT_EQUAL(28800 - testTM.__tm_gmtoff, timeRet, 0);
|
||||
|
||||
struct tm *timePtr = localtime(&testTime);
|
||||
LOG("\n testTime 18880, tm : %s", TmToStr(timePtr, timeStr, TIME_STR_LEN));
|
||||
timeRet = mktime(timePtr);
|
||||
TEST_ASSERT_EQUAL_INT(18880, timeRet);
|
||||
ICUNIT_ASSERT_EQUAL(timeRet, 18880, timeRet);
|
||||
LOG("\n input 18880, mktime Ret = %lld", timeRet);
|
||||
|
||||
testTime = LONG_MAX;
|
||||
timePtr = localtime(&testTime);
|
||||
LOG("\n testTime LONG_MAX, tm : %s", TmToStr(timePtr, timeStr, TIME_STR_LEN));
|
||||
timeRet = mktime(timePtr);
|
||||
TEST_ASSERT_EQUAL_INT(LONG_MAX, timeRet);
|
||||
ICUNIT_ASSERT_EQUAL(timeRet, LONG_MAX, timeRet);
|
||||
LOG("\n input LONG_MAX, mktime Ret = %lld", timeRet);
|
||||
|
||||
testTime = 0;
|
||||
timePtr = localtime(&testTime);
|
||||
LOG("\n testTime 0, tm : %s", TmToStr(timePtr, timeStr, TIME_STR_LEN));
|
||||
timeRet = mktime(timePtr);
|
||||
TEST_ASSERT_EQUAL_INT(0, timeRet);
|
||||
ICUNIT_ASSERT_EQUAL(timeRet, 0, timeRet);
|
||||
LOG("\n input 0, mktime Ret = %lld", timeRet);
|
||||
return 0;
|
||||
}
|
||||
@@ -433,10 +433,10 @@ LITE_TEST_CASE(PosixTimeFuncTestSuite, testTimeMktime002, Function | MediumTest
|
||||
time_t timeRet = mktime(&testTM);
|
||||
LOG("\n 1800-8-9 10:10:00, mktime Ret lld = %lld", timeRet);
|
||||
#if (LOSCFG_LIBC_MUSL == 1)
|
||||
TEST_ASSERT_EQUAL_INT(-1, timeRet);
|
||||
ICUNIT_ASSERT_EQUAL(timeRet, -1, timeRet);
|
||||
#endif
|
||||
#if (LOSCFG_LIBC_NEWLIB == 1)
|
||||
TEST_ASSERT_LESS_THAN_INT(0, timeRet);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(timeRet, timeRet, -1, 0);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@@ -455,26 +455,26 @@ LITE_TEST_CASE(PosixTimeFuncTestSuite, testTimeStrftime001, Function | MediumTes
|
||||
|
||||
mtime = LONG_MAX;
|
||||
ftime = strftime(buffer, 80, "%y-%m-%d %H:%M:%S", localtime(&mtime));
|
||||
TEST_ASSERT_GREATER_THAN_INT(0, ftime);
|
||||
TEST_ASSERT_EQUAL_STRING("38-01-19 11:14:07", buffer);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ftime, 1, ftime, 0);
|
||||
ICUNIT_ASSERT_STRING_EQUAL("38-01-19 11:14:07", buffer, 0);
|
||||
LOG("\nresult: %s, expected : %s", buffer, "38-01-19 11:14:07");
|
||||
|
||||
mtime = LONG_MIN;
|
||||
ftime = strftime(buffer, 80, "%Y-%m-%d %H:%M:%S", localtime(&mtime));
|
||||
TEST_ASSERT_GREATER_THAN_INT(0, ftime);
|
||||
TEST_ASSERT_EQUAL_STRING("1901-12-14 04:45:52", buffer);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ftime, 1, ftime, 0);
|
||||
ICUNIT_ASSERT_STRING_EQUAL("1901-12-14 04:45:52", buffer, 0);
|
||||
LOG("\nresult: %s, expected : %s", buffer, "1901-12-14 04:45:52");
|
||||
|
||||
mtime = 18880;
|
||||
ftime = strftime(buffer, 80, "%F %T", localtime(&mtime));
|
||||
TEST_ASSERT_GREATER_THAN_INT(0, ftime);
|
||||
TEST_ASSERT_EQUAL_STRING("1970-01-01 13:14:40", buffer);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ftime, 1, ftime, 0);
|
||||
ICUNIT_ASSERT_STRING_EQUAL("1970-01-01 13:14:40", buffer, 0);
|
||||
LOG("\nresult: %s, expected : %s", buffer, "1970-01-01 13:14:40");
|
||||
|
||||
mtime = 18880;
|
||||
ftime = strftime(buffer, 80, "%D %w %H:%M:%S", localtime(&mtime));
|
||||
TEST_ASSERT_GREATER_THAN_INT(0, ftime);
|
||||
TEST_ASSERT_EQUAL_STRING("01/01/70 4 13:14:40", buffer);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ftime, 1, ftime, 0);
|
||||
ICUNIT_ASSERT_STRING_EQUAL("01/01/70 4 13:14:40", buffer, 0);
|
||||
LOG("\nresult: %s, expected : %s", buffer, "01/01/70 4 13:14:40");
|
||||
return 0;
|
||||
};
|
||||
@@ -492,18 +492,18 @@ LITE_TEST_CASE(PosixTimeFuncTestSuite, testTimeStrftime002, Function | MediumTes
|
||||
struct tm *tmTime = localtime(&mtime);
|
||||
|
||||
ftime = strftime(buffer, 80, "%Ex %EX %A", tmTime);
|
||||
TEST_ASSERT_GREATER_THAN_INT(0, ftime);
|
||||
TEST_ASSERT_EQUAL_STRING("01/01/70 13:14:40 Thursday", buffer);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ftime, 1, ftime, 0);
|
||||
ICUNIT_ASSERT_STRING_EQUAL("01/01/70 13:14:40 Thursday", buffer, 0);
|
||||
LOG("\nresult: %s, expected : %s", buffer, "01/01/70 13:14:40 Thursday");
|
||||
|
||||
ftime = strftime(buffer, 80, "%x %X", tmTime);
|
||||
TEST_ASSERT_GREATER_THAN_INT(0, ftime);
|
||||
TEST_ASSERT_EQUAL_STRING("01/01/70 13:14:40", buffer);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ftime, 1, ftime, 0);
|
||||
ICUNIT_ASSERT_STRING_EQUAL("01/01/70 13:14:40", buffer, 0);
|
||||
LOG("\nresult: %s, expected : %s", buffer, "01/01/70 13:14:40");
|
||||
|
||||
ftime = strftime(buffer, 80, "%D %A %H:%M:%S", tmTime);
|
||||
TEST_ASSERT_GREATER_THAN_INT(0, ftime);
|
||||
TEST_ASSERT_EQUAL_STRING("01/01/70 Thursday 13:14:40", buffer);
|
||||
ICUNIT_ASSERT_WITHIN_EQUAL(ftime, 1, ftime, 0);
|
||||
ICUNIT_ASSERT_STRING_EQUAL("01/01/70 Thursday 13:14:40", buffer, 0);
|
||||
LOG("\nresult: %s, expected : %s", buffer, "01/01/70 Thursday 13:14:40");
|
||||
return 0;
|
||||
};
|
||||
@@ -521,25 +521,25 @@ LITE_TEST_CASE(PosixTimeFuncTestSuite, testTimeStrftime003, Function | MediumTes
|
||||
struct tm *tmTime = localtime(&mtime);
|
||||
|
||||
ftime = strftime(buffer, 12, "%Y-%m-%d %H:%M:%S", tmTime);
|
||||
TEST_ASSERT_EQUAL_INT(0, ftime);
|
||||
ICUNIT_ASSERT_EQUAL(ftime, 0, ftime);
|
||||
LOG("\nresult: %s, expected : %s", buffer, "1970-01-01 13:14:40");
|
||||
|
||||
ftime = strftime(buffer, 80, "", tmTime);
|
||||
TEST_ASSERT_EQUAL_INT(0, ftime);
|
||||
ICUNIT_ASSERT_EQUAL(ftime, 0, ftime);
|
||||
LOG("\nresult: %s, expected : %s", buffer, "1970-01-01 13:14:40");
|
||||
|
||||
ftime = strftime(buffer, 19, "%Y-%m-%d %H:%M:%S", tmTime);
|
||||
TEST_ASSERT_EQUAL_INT(0, ftime);
|
||||
ICUNIT_ASSERT_EQUAL(ftime, 0, ftime);
|
||||
LOG("\nresult: %s, expected : %s", buffer, "1970-01-01 13:14:40");
|
||||
|
||||
ftime = strftime(buffer, 20, "%Y-%m-%d %H:%M:%S", tmTime);
|
||||
TEST_ASSERT_EQUAL_INT(19, ftime);
|
||||
TEST_ASSERT_EQUAL_STRING("1970-01-01 13:14:40", buffer);
|
||||
ICUNIT_ASSERT_EQUAL(ftime, 19, ftime);
|
||||
ICUNIT_ASSERT_STRING_EQUAL("1970-01-01 13:14:40", buffer, 0);
|
||||
LOG("\nresult: %s, expected : %s", buffer, "1970-01-01 13:14:40");
|
||||
|
||||
tmTime->__tm_zone = "UTC+8";
|
||||
ftime = strftime(buffer, 80, "%F %T %Z", tmTime);
|
||||
TEST_ASSERT_EQUAL_INT(20, ftime);
|
||||
ICUNIT_ASSERT_EQUAL(ftime, 20, ftime);
|
||||
LOG("\nresult: %s, expected : %s", buffer, "1970-01-01 13:14:40");
|
||||
return 0;
|
||||
};
|
||||
@@ -572,10 +572,10 @@ LITE_TEST_CASE(PosixTimeFuncTestSuite, testTimes, Function | MediumTest | Level1
|
||||
(long)(end.tms_utime - start.tms_utime), (long)(end.tms_stime - start.tms_stime));
|
||||
|
||||
if (!CheckValueClose((end.tms_utime - start.tms_utime), testClockt, 0.02)) {
|
||||
TEST_FAIL();
|
||||
ICUNIT_ASSERT_EQUAL(1, 0, 0);
|
||||
}
|
||||
if (!CheckValueClose((endTime - stTime), testClockt, 0.02)) {
|
||||
TEST_FAIL();
|
||||
ICUNIT_ASSERT_EQUAL(1, 0, 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@ typedef struct {
|
||||
typedef enum {
|
||||
EXC_REBOOT,
|
||||
EXC_ASSERT,
|
||||
EXC_PANIC,
|
||||
EXC_STACKOVERFLOW,
|
||||
EXC_INTERRUPT,
|
||||
EXC_TYPE_END
|
||||
|
||||
Reference in New Issue
Block a user