Commit Graph

99 Commits

Author SHA1 Message Date
openharmony_ci 3b8083815c !701 按照门禁要求对所有BUILD.gn脚本进行格式化
Merge pull request !701 from Caoruihong/gnformat
2021-11-06 04:48:29 +00:00
Caoruihong a2fed9a56c chore(build): format all BUILD.gn files
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: Ifd3bf13f53a27e0a0bbd051cf35662e7409e6ed0
2021-11-06 11:55:58 +08:00
openharmony_ci 0f8ff8f545 !662 fix SYSCALL SysFstat,SysFstat64,SysFstatat64(fix struct kstat with stat) & add 19 IO testcases
Merge pull request !662 from 刘治万/1015_unitest
2021-11-04 01:46:08 +00:00
openharmony_ci fcb21ffc8a !676 修复ppoll接口"[ERR]OsMemFree check error!"报错
Merge pull request !676 from pef/ppoll-1
2021-11-02 09:35:09 +00:00
openharmony_ci 3074449c79 !665 修复misc09用例因依赖hosts文件而失败
Merge pull request !665 from lnlan/sys_misc_test_fix
2021-10-30 02:15:26 +00:00
pef 78a297fd4e 修复ppoll接口"[ERR]OsMemFree check error!"报错
【背景】
内核中释放用户空间指针报错:"[ERR]OsMemFree check error!"

【修改方案】
修改SysPpoll函数。

【影响】
对现有的产品编译不会有影响。

re #I47YWZ

Change-Id: Id7f86036870d4f32be8fc438b9aad85cdda59546
Signed-off-by: pef <cyd1997@126.com>
2021-10-29 08:14:20 +00:00
teamol 79839a4325 OOfix SYSCALL SysFstat,SysFstat64,SysFstatat64(fix struct kstat with stat) & add 19 IO testcases
1.modifications:
    modified:   testsuites/unittest/IO/It_test_IO.h
    modified:   testsuites/unittest/IO/full/IO_test_duplocale_001.cpp
    modified:   testsuites/unittest/IO/io_test.cpp
2.add 19 testcases:
    IO_test_dcgettext_001.cpp
    IO_test_dcgettext_002.cpp
    IO_test_dcngettext_001.cpp
    IO_test_dcngettext_002.cpp
    IO_test_dngettext_001.cpp
    IO_test_dngettext_002.cpp
    IO_test_duplocale_001.cpp
    IO_test_locale_001.cpp
    IO_test_ngettext_001.cpp
    IO_test_nl_langinfo_001.cpp
    IO_test_nl_langinfo_l_001.cpp
    IO_test_strcasecmp_l_001.cpp
    IO_test_strfmon_l_001.cpp
    IO_test_strncasecmp_l_001.cpp
    It_stdio_hasmntopt_001.cpp
    IO_test_gettext_001.cpp
    IO_test_locale_002.cpp
    IO_test_strcasecmp_l_002.cpp
    IO_test_strfmon_l_002.cpp
    IO_test_strncasecmp_l_002.cpp
3.influence:
    none

Signed-off-by: liuzhiwan <liuzhiwan2020@163.com>
Change-Id: Ib5883ddb14cfd545f2c5b1685a082f098def0965
2021-10-29 03:05:20 +00:00
teamol a55f68f957 fix: fix ppoll
1.modifications:
modified:   syscall/fs_syscall.c
2.modify 2 testcases:
IO/full/IO_test_ppoll_001.cpp
IO/full/IO_test_ppoll_002.cpp
3.influence:
none

Signed-off-by: pef <cyd1997@126.com>
Change-Id: I85fc091098a6dfef1a4694a3bbc489640ee6dda2
2021-10-28 11:54:19 +00:00
openharmony_ci 308750199f !682 fix: 修复进程process_test_045.cpp用例导致门禁概率失败
Merge pull request !682 from zhushengle/test
2021-10-28 08:18:42 +00:00
lnlan f2f5c5fdc3 fix(test): misc09用例因依赖hosts文件而失败
【背景】
1.etc/hosts文件不存在,misc09依赖hosts文件而失败

【修改方案】
1.用例执行前检查是否存在这些配置文件,不存在就跳过该用例

re#I48IZ0

Change-Id: I193cb03770932c1f681cd726ceb383816aa2257a

Signed-off-by: lnlan <lanleinan@163.com>
Change-Id: I3fb7ca1ed5f8cc79a56cd1872f3b303ab325a7a9
2021-10-28 02:06:08 +00:00
openharmony_ci 557f4ccb66 !666 复sys部分用例因依赖passwd、group文件而失败
Merge pull request !666 from lnlan/sys_test_fixed
2021-10-28 01:36:46 +00:00
zhushengle 1ed28b4c80 fix: 修复进程用例导致门禁概率失败
Close #I4FO0N
Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: I9dc9819f2ebceaceea337651cc747d737e437661
2021-10-28 09:26:30 +08:00
lnlan 614cdccf91 fix(test): 修复sys部分用例因依赖passwd、group文件而失败
【背景】
1.sys部分用例因依赖passwd、group文件而失败

【修改方案】
1.用例执行前检查是否存在这些配置文件,不存在就跳过该用例

re#I48IUC

Change-Id: I787ce4b200f2a7546e57290b7dd073127caa07bb
Signed-off-by: lnlan <lanleinan@163.com>
2021-10-27 01:25:38 +00:00
openharmony_ci d6f48477a4 !658 增加内核pselect系统调用适配musl pselect接口并增加测试用例。
Merge pull request !658 from wangchen/pselect
2021-10-26 01:44:20 +00:00
zhushengle f6ac03d3e3 fix: 修复进程线程不稳定用例
Close #I4F1XL
Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: Ifdde21a2ff4213218a0fa44ad17af0c15a426758
2021-10-25 10:15:53 +08:00
teamol f601c16b9e fix: 增加pselect SYSCALL函数及测试用例
1.modifications:
modified:   syscall/fs_syscall.c
modified:   syscall/los_syscall.h
modified:   syscall/syscall_lookup.h
2.add 1 testcases:
modified:   testsuites/unittest/IO/BUILD.gn
modified:   testsuites/unittest/IO/full/IO_test_pselect_001.cpp
modified:   testsuites/unittest/IO/io_test.cpp
3.influence:
none

re #I45SXU
Signed-off-by: wangchen <253227059@qq.com>
Change-Id: I03a5d464fd5423c360e42f7d141035ce0d83d8a8
2021-10-22 09:25:20 +00:00
zhushengle 2be59680f2 fix: 添加进程线程冒烟用例
Close #I4EOGA
Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: I0f10f81d41564d4d34fc2f89692da0b3211f5918
2021-10-21 14:39:13 +08:00
arvinzzz 33d0c1bd0b refactor: 内核目录结构整理
1. 原kernel/common目录下属于内核拓展组件,统一移入kernel/extend管理
2. Kconfig分层,各模块自己的配置放到自己目录下管理
3. 原platform下不属于平台的公共代码抽到kernel/common下,只留板级链接脚本和一些编译脚本指向device目录下触发平台相关的编译
4. 对外公共头文件统一抽到对外include路径
5. 废弃宏,头文件清理

close: #I48KI4

Signed-off-by: arvinzzz <zhaotianyu9@huawei.com>
Change-Id: I0cf5ea81c92a8fa7b113da9cbdc8b7bc935f5aae
2021-09-08 16:36:28 +08:00
LiteOS2021 dc9ec6856f feat: L0-L1 支持Trace
1.【需求描述】
            L0~L1 支持Trace,提供两种工作模式:在线模式、离线缓存模式, 用于按时间线追踪系统事件,如任务切换、中断、ipc等。
        2.【方案描述】
            L0:
            (1).在内核模块预置静态代码桩
            (2).触发桩后,收集系统上下文信息
            (3).离线模式则写入内存,用户可通过dump导出;
            (4).在线模式通过pipeline对接IDE进行可视化解析和展示;
            L1:
            新增trace字符设备,位于"/dev/trace",通过对设备节点的read\write\ioctl,实现用户态trace;

        BREAKING CHANGE:
        1.新增一系列trace的对外API,位于los_trace.h中.
        LOS_TRACE_EASY简易插桩
        LOS_TRACE标准插桩
        LOS_TraceInit配置Trace缓冲区的地址和大小
        LOS_TraceStart开启事件记录
        LOS_TraceStop停止事件记录
        LOS_TraceRecordDump输出Trace缓冲区数据
        LOS_TraceRecordGet获取Trace缓冲区的首地址
        LOS_TraceReset清除Trace缓冲区中的事件
        LOS_TraceEventMaskSet设置事件掩码,仅记录某些模块的事件
        LOS_TraceHwiFilterHookReg注册过滤特定中断号事件的钩子函数

        Close #I46WA0

    Signed-off-by: LiteOS2021 <dinglu@huawei.com>

Change-Id: I6a8e64794c4852f2c2980993a06180e09ec6ee0d
2021-08-31 20:29:45 +08:00
openharmony_ci 7cb2ad67bf !570 fix ppoll & add 2 testcases
Merge pull request !570 from guweijie/gwj-kernel-ppoll-20210825
2021-08-30 02:06:24 +00:00
openharmony_ci 7661aedcc9 !571 支持sys模块api接口:ftok、nice、getlogin、getgrgid、getgrnam等
Merge pull request !571 from wangjianjun/sys
2021-08-27 07:51:08 +00:00
openharmony_ci c97178f2f6 !561 fix SYSCALL faccessat,fstatfs,fstatat & add 6 testcases
Merge pull request !561 from guweijie/gwj-kernel-20210819
2021-08-27 07:49:20 +00:00
openharmony_ci 8839fdd399 !544 fix killpg and waitid
Merge pull request !544 from wangjianjun/waitid
2021-08-27 07:48:25 +00:00
openharmony_ci a3b480b18e !543 fix:fchdir
Merge pull request !543 from wcc/fs
2021-08-27 07:47:34 +00:00
teamol defedb6fdf fix: add syscall for ppoll & add 2 testcases
1.modifications:
modified:   syscall/los_syscall.h
modified:   syscall/misc_syscall.c
modified:   syscall/syscall_lookup.h
2.add 3 testcases:
testsuites/unittest/IO/full/IO_test_ppoll_001.cpp
testsuites/unittest/IO/full/IO_test_ppoll_002.cpp
3.influence:
none

Signed-off-by: teamol <28105285@qq.com>
2021-08-27 15:37:42 +08:00
wjj 7c577d8963 test: 添加sys模块接口的测试用例
把测试用例放在full中,需要依赖文件group和passwd,放在/etc下

Change-Id: Ie038b64db96180b52ee10d70d494da42207d3b92
Signed-off-by: wjj <502004968@qq.com>
2021-08-25 15:48:54 +08:00
wcc0 e828cbdeac fix: add fchdir api
add fchdir and testcases

Change-Id: Iad724944e727c4a08b8801f109acbbe48f55c283
Signed-off-by: wcc0 <917033401@qq.com>
2021-08-24 17:02:40 +08:00
openharmony_ci 45a128a4f0 !504 clock模块内核unittest用例调整
Merge pull request !504 from phchang/updateclock
2021-08-24 02:33:32 +00:00
Caoruihong 0e260949c9 feat(make): optimize makefiles and remove some unused files
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: Ie2dfa7334417ccd55bd56a19a7882a982ce49cab
2021-08-22 04:23:40 +08:00
teamol aa1cd245a5 fix: fix syscall faccessat,fstatfs,fstatat & add 6 testcases
1.modifications:
modified:   testsuites/unittest/fs/BUILD.gn
modified:   testsuites/unittest/fs/jffs/It_vfs_jffs.h
renamed:    testsuites/unittest/fs/jffs/smoke/It_test_faccessat_001.cpp -> testsuites/unittest/fs/jffs/full/It_test_faccessat_001.cpp
renamed:    testsuites/unittest/fs/jffs/smoke/It_test_faccessat_002.cpp -> testsuites/unittest/fs/jffs/full/It_test_faccessat_002.cpp
renamed:    testsuites/unittest/fs/jffs/smoke/It_test_fstatat_001.cpp -> testsuites/unittest/fs/jffs/full/It_test_fstatat_001.cpp
renamed:    testsuites/unittest/fs/jffs/smoke/It_test_fstatat_002.cpp -> testsuites/unittest/fs/jffs/full/It_test_fstatat_002.cpp
renamed:    testsuites/unittest/fs/jffs/smoke/It_test_fstatfs_001.cpp -> testsuites/unittest/fs/jffs/full/It_test_fstatfs_001.cpp
renamed:    testsuites/unittest/fs/jffs/smoke/It_test_fstatfs_002.cpp -> testsuites/unittest/fs/jffs/full/It_test_fstatfs_002.cpp
modified:   testsuites/unittest/fs/jffs/vfs_jffs_test.cpp
2.add 6 testcases:
It_test_faccessat_001.cpp
It_test_faccessat_002.cpp
It_test_fstatat_001.cpp
It_test_fstatat_002.cpp
It_test_fstatfs_001.cpp
It_test_fstatfs_002.cpp
3.influence:
none

Signed-off-by: teamol <28105285@qq.com>
2021-08-19 15:46:04 +08:00
vcbchang 555e0681be test: clock用例结构调整
【背景】当前kernel的unittest下的用例全量与门禁用例结构不合理,当前上传clock修改后版本

【修改方案】
1 原来没有测试clock模块的基本场景,这里补上基本场景作为smoke用例,并命名为clock_test_smoke.cpp
2 将原来smoke用例移到full中
3 删除与xts测试重复的用例和标记宏TEST_ON_LINUX的用例(即原来版本的clock_test_002,003,004用例)
4 原来clock_test_012用例用于测试进程的运行时间,里面存在正常场景和异常场景,现在将其分成两个用例
5 对所有用例重新排序,使得结构完整

re #I44170

Signed-off-by: vcbchang <vcbchang@qq.com>

Change-Id: I30852a5f9c414668c00eddbcc9631d70818514a1
2021-08-13 16:29:38 +08:00
wjj dc3cc094a7 feat: 支持killpg和waitid
killpg:给进程组发信号
waitid:等待进程结束
修改测试用例到full里面

Change-Id: Ice058ab4a6eede8ecbaacea0894c2161e3b9dce2
Signed-off-by: wjj <502004968@qq.com>
2021-08-12 18:06:55 +08:00
wcc0 2f214bf4de fix: add fchmod api
add fchmod api and testcases

Change-Id: I310e9e9d79bbe3fa8dbab6080bbfce8a77b79bb3
Signed-off-by: wcc0 <917033401@qq.com>
2021-08-11 14:12:37 +08:00
openharmony_ci 76507c05a8 !477 fix fstatfs api
Merge pull request !477 from wcc/fstatfs
2021-08-11 03:34:39 +00:00
openharmony_ci 9b24cc4915 !388 fix mutex&pthread mould musl api:pthread_mutexattr_getrobust/pthread_mutexattr_setrobust/pthread_mutex_consistent/pthread_getconcurrency/pthread_setconcurrency
Merge pull request !388 from 王建军/mutex
2021-08-11 03:33:17 +00:00
zhushengle 6917e08431 fix: 修改DoNanoSleep 以纳秒为单位
DoNanoSleep 接口以微秒为单位,纳秒级别的在转换成微秒时被整除为0,
导致转换成tick时为0,导致延时时触发yield,导致延时时间超大
Close #I3Z9DP

Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: Ib662fdc80707be6040b2bb06a1b457344bd48b30
2021-08-10 11:25:49 +08:00
wcc0 4c57aa26ad fix: add fststfs api and unitest
add fststfs api and unitest

Change-Id: I5e9fedd1bc26b77f080faf2fd3f5bf2f4a1dd9f7
Signed-off-by: wcc0 <917033401@qq.com>
2021-08-10 09:35:33 +08:00
SimonLi 7a98cad11a chore(oat): 删除二进制文件,并且新增oat屏蔽
Signed-off-by: SimonLi <likailong@huawei.com>
2021-08-06 01:41:09 +08:00
openharmony_ci 827e060606 !514 修复license
Merge pull request !514 from lnlan/fix_stl
2021-08-05 15:16:54 +00:00
openharmony_ci 78e8d86611 !512 style:修改 liteos_a unittest 测试文件的 licence 注释
Merge pull request !512 from phchang/fixlience
2021-08-05 15:16:51 +00:00
lnlan a23b491f8c style:修改 liteos_a unittest 测试文件的 licence 注释
【背景】解除告警
【修改方案】
 格式化修改告警文件的文件头注释格式

re #I44497

Signed-off-by: lanleinan <lanleinan@163.com>

Change-Id: If9fa5de0f896ddf8c3fc88408c8f88f633fdb3e7
2021-08-05 14:57:02 +00:00
Kiita 626b6600c0 style: 格式化修改liteos_a unittest 测试文件头的许可注释
【背景】解除告警
【修改方案】
 格式化修改告警文件的文件头注释格式

re #I44497

Signed-off-by: yansira <yansira@hotmail.com>
Change-Id: I88c7ade73b086fd0ee13574229d2a4b9795580ec
2021-08-05 22:11:59 +08:00
vcbchang e8037dc56a style:修改 liteos_a unittest 测试文件的 licence 注释
【背景】解除告警
【修改方案】
 格式化修改告警文件的文件头注释格式

re #I44497

Signed-off-by: vcbchang <vcbchang@qq.com>
Change-Id: I7a0d31e11603f591a5370e64505879e1a324d72d
2021-08-05 21:51:30 +08:00
openharmony_ci 1e5d01360b !394 fix apis: setrlimit,gethostname,gethostid
Merge pull request !394 from wcc/misc
2021-07-31 03:17:22 +00:00
openharmony_ci a7a25bb0a3 !382 fix mq by enable mq_notify API
Merge pull request !382 from guweijie/master
2021-07-31 03:08:14 +00:00
wcc 09d5bcc22d Merge branch 'master' of gitee.com:openharmony/kernel_liteos_a into misc 2021-07-27 01:40:59 +00:00
teamol 4427142d73 fix: fix mq function by enable mq_notify api
1.modifications:
modified:   compat/posix/include/mqueue.h
modified:   compat/posix/src/mqueue.c
modified:   syscall/ipc_syscall.c
modified:   syscall/los_syscall.h
modified:   syscall/syscall_lookup.h
modified:   testsuites/unittest/posix/mqueue/posix_mqueue_test.cpp

2.add 5 testcases:
It_posix_queue_205.cpp
It_posix_queue_206.cpp
It_posix_queue_207.cpp
It_posix_queue_208.cpp
It_posix_queue_209.cpp

3.influence:
none

Signed-off-by: teamol <28105285@qq.com>
2021-07-23 16:52:21 +08:00
Caoruihong a8805a65aa feat: add support for gn build system
add BUILD.gn for all kernel modules

Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I018446427bf64615f2596d47862b219659b58b34
2021-07-21 15:52:40 +08:00
Far 8729f6ee57 feat: 增加mount的MS_RDONLY标志的支持
增加mount的MS_RDONLY标志的支持,并修改vfs主要接口相关支持。
1. fatfs lseek接口在分区以MS_RDONLY方式和文件以只读打开时不再能够扩大文件的大小。
2. 直接在镜像中创建storage目录,而不是在挂载根文件系统时创建storage目录。
3. 增加了MS_RDONLY的测试用例。

Close #I3Z1W6

Signed-off-by: Far <yesiyuan2@huawei.com>
2021-07-20 16:21:08 +08:00
wcc0 c9d69e2d1b fix: add capability and amend smoke testcase
add setrlimit,gethostname,gethostid and capability

Change-Id: I0d5f23cb87ec2731fb79e7c5cfbe1ce109ac158a
2021-07-16 09:24:44 +08:00