Compare commits
2 Commits
master
...
OpenHarmon
Author | SHA1 | Date |
---|---|---|
|
f077f09c35 | |
|
2a752d45d5 |
8
BUILD.gn
8
BUILD.gn
|
@ -299,7 +299,7 @@ config("public") {
|
||||||
|
|
||||||
configs += [
|
configs += [
|
||||||
"$HDFTOPDIR:public",
|
"$HDFTOPDIR:public",
|
||||||
"$DRIVERS_LITEOS_DIR:public",
|
"//drivers/liteos:public",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (HAVE_DEVICE_SDK) {
|
if (HAVE_DEVICE_SDK) {
|
||||||
|
@ -324,8 +324,8 @@ group("modules") {
|
||||||
]
|
]
|
||||||
|
|
||||||
deps += [
|
deps += [
|
||||||
"$DRIVERS_LITEOS_DIR",
|
"//drivers/liteos",
|
||||||
"$HDFTOPDIR",
|
HDFTOPDIR,
|
||||||
]
|
]
|
||||||
|
|
||||||
if (HAVE_DEVICE_SDK) {
|
if (HAVE_DEVICE_SDK) {
|
||||||
|
@ -351,7 +351,7 @@ group("liteos_a") {
|
||||||
deps += [
|
deps += [
|
||||||
":apps",
|
":apps",
|
||||||
":tests",
|
":tests",
|
||||||
"$THIRDPARTY_MUSL_DIR/scripts/build_lite:strip",
|
"//third_party/musl/scripts/build_lite:strip",
|
||||||
]
|
]
|
||||||
if (liteos_skip_make == false) {
|
if (liteos_skip_make == false) {
|
||||||
deps += [ ":make" ]
|
deps += [ ":make" ]
|
||||||
|
|
2
OAT.xml
2
OAT.xml
|
@ -65,8 +65,6 @@
|
||||||
<!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
|
<!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
|
||||||
</filefilter>
|
</filefilter>
|
||||||
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
|
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
|
||||||
<filteritem type="filepath" name="figures/architecture-of-the-openharmony-liteos-cortex-a-kernel.png" desc="architecture-of-the-openharmony-liteos-cortex-a-kernel"/>
|
|
||||||
<filteritem type="filepath" name="figures/OpenHarmony-LiteOS-A内核架构图.png" desc="LiteOS-A内核架构图"/>
|
|
||||||
<!--filteritem type="filename" name="*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
|
<!--filteritem type="filename" name="*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
|
||||||
<!--filteritem type="filepath" name="abcdefg/.*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
|
<!--filteritem type="filepath" name="abcdefg/.*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
|
||||||
<!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
|
<!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
|
||||||
|
|
|
@ -87,8 +87,6 @@ OpenHarmony LiteOS-A内核支持[Hi3516DV300](https://gitee.com/openharmony/docs
|
||||||
|
|
||||||
编译可以参考:[编译指导](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-pkg-3516-build.md)
|
编译可以参考:[编译指导](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-pkg-3516-build.md)
|
||||||
|
|
||||||
测试参考:[单元测试](testsuites/unittest/tools/README.md)
|
|
||||||
|
|
||||||
## 贡献<a name="section1371123476304"></a>
|
## 贡献<a name="section1371123476304"></a>
|
||||||
|
|
||||||
[如何贡献](https://gitee.com/openharmony/docs/blob/HEAD/zh-cn/contribute/%E5%8F%82%E4%B8%8E%E8%B4%A1%E7%8C%AE.md)
|
[如何贡献](https://gitee.com/openharmony/docs/blob/HEAD/zh-cn/contribute/%E5%8F%82%E4%B8%8E%E8%B4%A1%E7%8C%AE.md)
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
import("//build/lite/config/component/lite_component.gni")
|
import("//build/lite/config/component/lite_component.gni")
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
import("//kernel/liteos_a/liteos.gni")
|
||||||
import("$THIRDPARTY_MKSH_DIR/mksh.gni")
|
import("//third_party/mksh/mksh.gni")
|
||||||
|
|
||||||
group("mksh") {
|
group("mksh") {
|
||||||
deps = [ ":build_mksh" ]
|
deps = [ ":build_mksh" ]
|
||||||
|
@ -42,7 +42,7 @@ copy("copy_mksh_src") {
|
||||||
|
|
||||||
build_ext_component("build_mksh") {
|
build_ext_component("build_mksh") {
|
||||||
deps = [ ":copy_mksh_src" ]
|
deps = [ ":copy_mksh_src" ]
|
||||||
deps += [ "$THIRDPARTY_MUSL_DIR:sysroot_lite" ]
|
deps += [ "//third_party/musl:sysroot_lite" ]
|
||||||
exec_path = rebase_path("$target_out_dir/mksh_build")
|
exec_path = rebase_path("$target_out_dir/mksh_build")
|
||||||
|
|
||||||
cflags = [
|
cflags = [
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
import("//build/lite/config/component/lite_component.gni")
|
import("//build/lite/config/component/lite_component.gni")
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
import("//kernel/liteos_a/liteos.gni")
|
||||||
import("$THIRDPARTY_TOYBOX_DIR/toybox.gni")
|
import("//third_party/toybox/toybox.gni")
|
||||||
|
|
||||||
group("toybox") {
|
group("toybox") {
|
||||||
deps = [ ":build_toybox" ]
|
deps = [ ":build_toybox" ]
|
||||||
|
@ -51,7 +51,7 @@ build_ext_component("build_toybox") {
|
||||||
":copy_toybox_config",
|
":copy_toybox_config",
|
||||||
":copy_toybox_src",
|
":copy_toybox_src",
|
||||||
]
|
]
|
||||||
deps += [ "$THIRDPARTY_MUSL_DIR:sysroot_lite" ]
|
deps += [ "//third_party/musl:sysroot_lite" ]
|
||||||
exec_path = rebase_path("$target_out_dir/toybox_build")
|
exec_path = rebase_path("$target_out_dir/toybox_build")
|
||||||
|
|
||||||
cflags = [
|
cflags = [
|
||||||
|
|
|
@ -27,6 +27,9 @@
|
||||||
"component": {
|
"component": {
|
||||||
"name": "liteos_a",
|
"name": "liteos_a",
|
||||||
"subsystem": "kernel",
|
"subsystem": "kernel",
|
||||||
|
"syscap": [
|
||||||
|
"SystemCapability.Kernel.Liteos-A"
|
||||||
|
],
|
||||||
"features": [],
|
"features": [],
|
||||||
"adapted_system_type": [
|
"adapted_system_type": [
|
||||||
"small"
|
"small"
|
||||||
|
|
|
@ -270,7 +270,6 @@ STATIC INT32 DoMqueueClose(struct mqpersonal *privateMqPersonal)
|
||||||
{
|
{
|
||||||
struct mqarray *mqueueCB = NULL;
|
struct mqarray *mqueueCB = NULL;
|
||||||
struct mqpersonal *tmp = NULL;
|
struct mqpersonal *tmp = NULL;
|
||||||
INT32 ret;
|
|
||||||
|
|
||||||
mqueueCB = privateMqPersonal->mq_posixdes;
|
mqueueCB = privateMqPersonal->mq_posixdes;
|
||||||
if (mqueueCB == NULL || mqueueCB->mq_personal == NULL) {
|
if (mqueueCB == NULL || mqueueCB->mq_personal == NULL) {
|
||||||
|
@ -278,12 +277,6 @@ STATIC INT32 DoMqueueClose(struct mqpersonal *privateMqPersonal)
|
||||||
return LOS_NOK;
|
return LOS_NOK;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mqueueCB->unlinkflag == TRUE) && (privateMqPersonal->mq_next == NULL)) {
|
|
||||||
ret = DoMqueueDelete(mqueueCB);
|
|
||||||
if (ret < 0) {
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* find the personal and remove */
|
/* find the personal and remove */
|
||||||
if (mqueueCB->mq_personal == privateMqPersonal) {
|
if (mqueueCB->mq_personal == privateMqPersonal) {
|
||||||
mqueueCB->mq_personal = privateMqPersonal->mq_next;
|
mqueueCB->mq_personal = privateMqPersonal->mq_next;
|
||||||
|
@ -305,6 +298,9 @@ STATIC INT32 DoMqueueClose(struct mqpersonal *privateMqPersonal)
|
||||||
/* free the personal */
|
/* free the personal */
|
||||||
(VOID)LOS_MemFree(OS_SYS_MEM_ADDR, privateMqPersonal);
|
(VOID)LOS_MemFree(OS_SYS_MEM_ADDR, privateMqPersonal);
|
||||||
|
|
||||||
|
if ((mqueueCB->unlinkflag == TRUE) && (mqueueCB->mq_personal == NULL)) {
|
||||||
|
return DoMqueueDelete(mqueueCB);
|
||||||
|
}
|
||||||
return LOS_OK;
|
return LOS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -608,19 +604,17 @@ int OsMqGetAttr(mqd_t personal, struct mq_attr *mqAttr)
|
||||||
struct mqarray *mqueueCB = NULL;
|
struct mqarray *mqueueCB = NULL;
|
||||||
struct mqpersonal *privateMqPersonal = NULL;
|
struct mqpersonal *privateMqPersonal = NULL;
|
||||||
|
|
||||||
(VOID)pthread_mutex_lock(&IPC_QUEUE_MUTEX);
|
|
||||||
privateMqPersonal = MqGetPrivDataBuff(personal);
|
privateMqPersonal = MqGetPrivDataBuff(personal);
|
||||||
if (privateMqPersonal == NULL) {
|
if (privateMqPersonal == NULL) {
|
||||||
(VOID)pthread_mutex_unlock(&IPC_QUEUE_MUTEX);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mqAttr == NULL) {
|
if (mqAttr == NULL) {
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
(VOID)pthread_mutex_unlock(&IPC_QUEUE_MUTEX);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(VOID)pthread_mutex_lock(&IPC_QUEUE_MUTEX);
|
||||||
if (privateMqPersonal->mq_status != MQ_USE_MAGIC) {
|
if (privateMqPersonal->mq_status != MQ_USE_MAGIC) {
|
||||||
errno = EBADF;
|
errno = EBADF;
|
||||||
(VOID)pthread_mutex_unlock(&IPC_QUEUE_MUTEX);
|
(VOID)pthread_mutex_unlock(&IPC_QUEUE_MUTEX);
|
||||||
|
@ -640,19 +634,17 @@ int OsMqSetAttr(mqd_t personal, const struct mq_attr *mqSetAttr, struct mq_attr
|
||||||
{
|
{
|
||||||
struct mqpersonal *privateMqPersonal = NULL;
|
struct mqpersonal *privateMqPersonal = NULL;
|
||||||
|
|
||||||
(VOID)pthread_mutex_lock(&IPC_QUEUE_MUTEX);
|
|
||||||
privateMqPersonal = MqGetPrivDataBuff(personal);
|
privateMqPersonal = MqGetPrivDataBuff(personal);
|
||||||
if (privateMqPersonal == NULL) {
|
if (privateMqPersonal == NULL) {
|
||||||
(VOID)pthread_mutex_unlock(&IPC_QUEUE_MUTEX);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mqSetAttr == NULL) {
|
if (mqSetAttr == NULL) {
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
(VOID)pthread_mutex_unlock(&IPC_QUEUE_MUTEX);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(VOID)pthread_mutex_lock(&IPC_QUEUE_MUTEX);
|
||||||
if (privateMqPersonal->mq_status != MQ_USE_MAGIC) {
|
if (privateMqPersonal->mq_status != MQ_USE_MAGIC) {
|
||||||
errno = EBADF;
|
errno = EBADF;
|
||||||
(VOID)pthread_mutex_unlock(&IPC_QUEUE_MUTEX);
|
(VOID)pthread_mutex_unlock(&IPC_QUEUE_MUTEX);
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
import("//kernel/liteos_a/liteos.gni")
|
||||||
import("$THIRDPARTY_NUTTX_DIR/NuttX.gni")
|
import("//third_party/NuttX/NuttX.gni")
|
||||||
|
|
||||||
module_switch = defined(LOSCFG_FS_VFS_BLOCK_DEVICE)
|
module_switch = defined(LOSCFG_FS_VFS_BLOCK_DEVICE)
|
||||||
module_name = get_path_info(rebase_path("."), "name")
|
module_name = get_path_info(rebase_path("."), "name")
|
||||||
|
|
|
@ -61,7 +61,7 @@ static ssize_t MemMap(struct file *filep, LosVmMapRegion *region)
|
||||||
VADDR_T vaddr = region->range.base;
|
VADDR_T vaddr = region->range.base;
|
||||||
LosVmSpace *space = LOS_SpaceGet(vaddr);
|
LosVmSpace *space = LOS_SpaceGet(vaddr);
|
||||||
|
|
||||||
if (((paddr + size) >= SYS_MEM_BASE) && (paddr < SYS_MEM_END)) {
|
if ((paddr >= SYS_MEM_BASE) && (paddr < SYS_MEM_END)) {
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,5 +97,5 @@ static const struct file_operations_vfs g_memDevOps = {
|
||||||
|
|
||||||
int DevMemRegister(void)
|
int DevMemRegister(void)
|
||||||
{
|
{
|
||||||
return register_driver("/dev/mem", &g_memDevOps, 0644, 0); /* 0644: file mode */
|
return register_driver("/dev/mem", &g_memDevOps, 0666, 0); /* 0666: file mode */
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
import("//kernel/liteos_a/liteos.gni")
|
||||||
import("$THIRDPARTY_NUTTX_DIR/NuttX.gni")
|
import("//third_party/NuttX/NuttX.gni")
|
||||||
|
|
||||||
module_switch = defined(LOSCFG_DRIVERS_VIDEO)
|
module_switch = defined(LOSCFG_DRIVERS_VIDEO)
|
||||||
module_name = get_path_info(rebase_path("."), "name")
|
module_name = get_path_info(rebase_path("."), "name")
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
import("//kernel/liteos_a/liteos.gni")
|
||||||
import("$THIRDPARTY_FATFS_DIR/FatFs.gni")
|
import("//third_party/FatFs/FatFs.gni")
|
||||||
|
|
||||||
module_switch = defined(LOSCFG_FS_FAT)
|
module_switch = defined(LOSCFG_FS_FAT)
|
||||||
module_name = get_path_info(rebase_path("."), "name")
|
module_name = get_path_info(rebase_path("."), "name")
|
||||||
|
|
|
@ -31,7 +31,7 @@ import("//kernel/liteos_a/liteos.gni")
|
||||||
|
|
||||||
module_switch = defined(LOSCFG_FS_JFFS)
|
module_switch = defined(LOSCFG_FS_JFFS)
|
||||||
module_name = get_path_info(rebase_path("."), "name")
|
module_name = get_path_info(rebase_path("."), "name")
|
||||||
linux_path = rebase_path("$KERNEL_LINUX_DIR")
|
linux_path = rebase_path("//kernel/linux/linux-5.10")
|
||||||
out_path = rebase_path(target_out_dir)
|
out_path = rebase_path(target_out_dir)
|
||||||
|
|
||||||
kernel_module(module_name) {
|
kernel_module(module_name) {
|
||||||
|
|
|
@ -2311,7 +2311,7 @@ diff -Nupr old/fs/jffs2/erase.c new/fs/jffs2/erase.c
|
||||||
diff -Nupr old/fs/jffs2/file.c new/fs/jffs2/file.c
|
diff -Nupr old/fs/jffs2/file.c new/fs/jffs2/file.c
|
||||||
--- old/fs/jffs2/file.c 2022-05-09 17:22:53.000000000 +0800
|
--- old/fs/jffs2/file.c 2022-05-09 17:22:53.000000000 +0800
|
||||||
+++ new/fs/jffs2/file.c 2022-05-10 09:43:14.250000000 +0800
|
+++ new/fs/jffs2/file.c 2022-05-10 09:43:14.250000000 +0800
|
||||||
@@ -9,334 +9,31 @@
|
@@ -9,335 +9,30 @@
|
||||||
* For licensing information, see the file 'LICENCE' in this directory.
|
* For licensing information, see the file 'LICENCE' in this directory.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -2348,7 +2348,7 @@ diff -Nupr old/fs/jffs2/file.c new/fs/jffs2/file.c
|
||||||
- struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb);
|
- struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb);
|
||||||
+ /* FIXME: This works only with one file system mounted at a time */
|
+ /* FIXME: This works only with one file system mounted at a time */
|
||||||
int ret;
|
int ret;
|
||||||
|
-
|
||||||
- ret = file_write_and_wait_range(filp, start, end);
|
- ret = file_write_and_wait_range(filp, start, end);
|
||||||
+ ret = jffs2_read_inode_range(c, f, gc_buffer,
|
+ ret = jffs2_read_inode_range(c, f, gc_buffer,
|
||||||
+ offset & ~(PAGE_SIZE-1), PAGE_SIZE);
|
+ offset & ~(PAGE_SIZE-1), PAGE_SIZE);
|
||||||
|
@ -2361,10 +2361,8 @@ diff -Nupr old/fs/jffs2/file.c new/fs/jffs2/file.c
|
||||||
- inode_unlock(inode);
|
- inode_unlock(inode);
|
||||||
-
|
-
|
||||||
- return 0;
|
- return 0;
|
||||||
+ return ERR_PTR(ret);
|
-}
|
||||||
+ return gc_buffer;
|
-
|
||||||
}
|
|
||||||
|
|
||||||
-const struct file_operations jffs2_file_operations =
|
-const struct file_operations jffs2_file_operations =
|
||||||
-{
|
-{
|
||||||
- .llseek = generic_file_llseek,
|
- .llseek = generic_file_llseek,
|
||||||
|
@ -2389,10 +2387,7 @@ diff -Nupr old/fs/jffs2/file.c new/fs/jffs2/file.c
|
||||||
-};
|
-};
|
||||||
-
|
-
|
||||||
-const struct address_space_operations jffs2_file_address_operations =
|
-const struct address_space_operations jffs2_file_address_operations =
|
||||||
+void jffs2_gc_release_page(struct jffs2_sb_info *c,
|
-{
|
||||||
+ unsigned char *ptr,
|
|
||||||
+ unsigned long *priv)
|
|
||||||
{
|
|
||||||
- .readpage = jffs2_readpage,
|
- .readpage = jffs2_readpage,
|
||||||
- .write_begin = jffs2_write_begin,
|
- .write_begin = jffs2_write_begin,
|
||||||
- .write_end = jffs2_write_end,
|
- .write_end = jffs2_write_end,
|
||||||
|
@ -2448,29 +2443,35 @@ diff -Nupr old/fs/jffs2/file.c new/fs/jffs2/file.c
|
||||||
- ret = jffs2_do_readpage_unlock(pg->mapping->host, pg);
|
- ret = jffs2_do_readpage_unlock(pg->mapping->host, pg);
|
||||||
- mutex_unlock(&f->sem);
|
- mutex_unlock(&f->sem);
|
||||||
- return ret;
|
- return ret;
|
||||||
-}
|
+ return ERR_PTR(ret);
|
||||||
-
|
+ return gc_buffer;
|
||||||
|
}
|
||||||
|
|
||||||
-static int jffs2_write_begin(struct file *filp, struct address_space *mapping,
|
-static int jffs2_write_begin(struct file *filp, struct address_space *mapping,
|
||||||
- loff_t pos, unsigned len, unsigned flags,
|
- loff_t pos, unsigned len, unsigned flags,
|
||||||
- struct page **pagep, void **fsdata)
|
- struct page **pagep, void **fsdata)
|
||||||
-{
|
+void jffs2_gc_release_page(struct jffs2_sb_info *c,
|
||||||
|
+ unsigned char *ptr,
|
||||||
|
+ unsigned long *priv)
|
||||||
|
{
|
||||||
- struct page *pg;
|
- struct page *pg;
|
||||||
- struct inode *inode = mapping->host;
|
- struct inode *inode = mapping->host;
|
||||||
- struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode);
|
- struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode);
|
||||||
- struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb);
|
- struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb);
|
||||||
- pgoff_t index = pos >> PAGE_SHIFT;
|
- pgoff_t index = pos >> PAGE_SHIFT;
|
||||||
|
- uint32_t pageofs = index << PAGE_SHIFT;
|
||||||
- int ret = 0;
|
- int ret = 0;
|
||||||
-
|
-
|
||||||
- jffs2_dbg(1, "%s()\n", __func__);
|
- jffs2_dbg(1, "%s()\n", __func__);
|
||||||
-
|
-
|
||||||
- if (pos > inode->i_size) {
|
- if (pageofs > inode->i_size) {
|
||||||
- /* Make new hole frag from old EOF to new position */
|
- /* Make new hole frag from old EOF to new page */
|
||||||
- struct jffs2_raw_inode ri;
|
- struct jffs2_raw_inode ri;
|
||||||
- struct jffs2_full_dnode *fn;
|
- struct jffs2_full_dnode *fn;
|
||||||
- uint32_t alloc_len;
|
- uint32_t alloc_len;
|
||||||
-
|
-
|
||||||
- jffs2_dbg(1, "Writing new hole frag 0x%x-0x%x between current EOF and new position\n",
|
- jffs2_dbg(1, "Writing new hole frag 0x%x-0x%x between current EOF and new page\n",
|
||||||
- (unsigned int)inode->i_size, (uint32_t)pos);
|
- (unsigned int)inode->i_size, pageofs);
|
||||||
-
|
-
|
||||||
- ret = jffs2_reserve_space(c, sizeof(ri), &alloc_len,
|
- ret = jffs2_reserve_space(c, sizeof(ri), &alloc_len,
|
||||||
- ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE);
|
- ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE);
|
||||||
|
@ -2490,10 +2491,10 @@ diff -Nupr old/fs/jffs2/file.c new/fs/jffs2/file.c
|
||||||
- ri.mode = cpu_to_jemode(inode->i_mode);
|
- ri.mode = cpu_to_jemode(inode->i_mode);
|
||||||
- ri.uid = cpu_to_je16(i_uid_read(inode));
|
- ri.uid = cpu_to_je16(i_uid_read(inode));
|
||||||
- ri.gid = cpu_to_je16(i_gid_read(inode));
|
- ri.gid = cpu_to_je16(i_gid_read(inode));
|
||||||
- ri.isize = cpu_to_je32((uint32_t)pos);
|
- ri.isize = cpu_to_je32(max((uint32_t)inode->i_size, pageofs));
|
||||||
- ri.atime = ri.ctime = ri.mtime = cpu_to_je32(JFFS2_NOW());
|
- ri.atime = ri.ctime = ri.mtime = cpu_to_je32(JFFS2_NOW());
|
||||||
- ri.offset = cpu_to_je32(inode->i_size);
|
- ri.offset = cpu_to_je32(inode->i_size);
|
||||||
- ri.dsize = cpu_to_je32((uint32_t)pos - inode->i_size);
|
- ri.dsize = cpu_to_je32(pageofs - inode->i_size);
|
||||||
- ri.csize = cpu_to_je32(0);
|
- ri.csize = cpu_to_je32(0);
|
||||||
- ri.compr = JFFS2_COMPR_ZERO;
|
- ri.compr = JFFS2_COMPR_ZERO;
|
||||||
- ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri)-8));
|
- ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri)-8));
|
||||||
|
@ -2523,7 +2524,7 @@ diff -Nupr old/fs/jffs2/file.c new/fs/jffs2/file.c
|
||||||
- goto out_err;
|
- goto out_err;
|
||||||
- }
|
- }
|
||||||
- jffs2_complete_reservation(c);
|
- jffs2_complete_reservation(c);
|
||||||
- inode->i_size = pos;
|
- inode->i_size = pageofs;
|
||||||
- mutex_unlock(&f->sem);
|
- mutex_unlock(&f->sem);
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
|
@ -6340,7 +6341,7 @@ diff -Nupr old/fs/jffs2/summary.h new/fs/jffs2/summary.h
|
||||||
diff -Nupr old/fs/jffs2/super.c new/fs/jffs2/super.c
|
diff -Nupr old/fs/jffs2/super.c new/fs/jffs2/super.c
|
||||||
--- old/fs/jffs2/super.c 2022-05-09 17:22:53.000000000 +0800
|
--- old/fs/jffs2/super.c 2022-05-09 17:22:53.000000000 +0800
|
||||||
+++ new/fs/jffs2/super.c 2022-05-09 20:09:32.170000000 +0800
|
+++ new/fs/jffs2/super.c 2022-05-09 20:09:32.170000000 +0800
|
||||||
@@ -9,434 +9,188 @@
|
@@ -9,433 +9,188 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -6418,7 +6419,6 @@ diff -Nupr old/fs/jffs2/super.c new/fs/jffs2/super.c
|
||||||
+ c->cleanmarker_size = sizeof(struct jffs2_unknown_node);
|
+ c->cleanmarker_size = sizeof(struct jffs2_unknown_node);
|
||||||
|
|
||||||
- mutex_init(&f->sem);
|
- mutex_init(&f->sem);
|
||||||
- f->target = NULL;
|
|
||||||
- inode_init_once(&f->vfs_inode);
|
- inode_init_once(&f->vfs_inode);
|
||||||
-}
|
-}
|
||||||
+ ret = jffs2_do_mount_fs(c);
|
+ ret = jffs2_do_mount_fs(c);
|
||||||
|
@ -8668,7 +8668,7 @@ diff -Nupr old/fs/jffs2/writev.c new/fs/jffs2/writev.c
|
||||||
diff -Nupr old/fs/jffs2/xattr.c new/fs/jffs2/xattr.c
|
diff -Nupr old/fs/jffs2/xattr.c new/fs/jffs2/xattr.c
|
||||||
--- old/fs/jffs2/xattr.c 2022-05-09 17:15:24.360000000 +0800
|
--- old/fs/jffs2/xattr.c 2022-05-09 17:15:24.360000000 +0800
|
||||||
+++ new/fs/jffs2/xattr.c 1970-01-01 08:00:00.000000000 +0800
|
+++ new/fs/jffs2/xattr.c 1970-01-01 08:00:00.000000000 +0800
|
||||||
@@ -1,1352 +0,0 @@
|
@@ -1,1347 +0,0 @@
|
||||||
-/*
|
-/*
|
||||||
- * JFFS2 -- Journalling Flash File System, Version 2.
|
- * JFFS2 -- Journalling Flash File System, Version 2.
|
||||||
- *
|
- *
|
||||||
|
@ -9443,10 +9443,10 @@ diff -Nupr old/fs/jffs2/xattr.c new/fs/jffs2/xattr.c
|
||||||
-}
|
-}
|
||||||
-
|
-
|
||||||
-#define XREF_TMPHASH_SIZE (128)
|
-#define XREF_TMPHASH_SIZE (128)
|
||||||
-int jffs2_build_xattr_subsystem(struct jffs2_sb_info *c)
|
-void jffs2_build_xattr_subsystem(struct jffs2_sb_info *c)
|
||||||
-{
|
-{
|
||||||
- struct jffs2_xattr_ref *ref, *_ref;
|
- struct jffs2_xattr_ref *ref, *_ref;
|
||||||
- struct jffs2_xattr_ref **xref_tmphash;
|
- struct jffs2_xattr_ref *xref_tmphash[XREF_TMPHASH_SIZE];
|
||||||
- struct jffs2_xattr_datum *xd, *_xd;
|
- struct jffs2_xattr_datum *xd, *_xd;
|
||||||
- struct jffs2_inode_cache *ic;
|
- struct jffs2_inode_cache *ic;
|
||||||
- struct jffs2_raw_node_ref *raw;
|
- struct jffs2_raw_node_ref *raw;
|
||||||
|
@ -9455,12 +9455,9 @@ diff -Nupr old/fs/jffs2/xattr.c new/fs/jffs2/xattr.c
|
||||||
-
|
-
|
||||||
- BUG_ON(!(c->flags & JFFS2_SB_FLAG_BUILDING));
|
- BUG_ON(!(c->flags & JFFS2_SB_FLAG_BUILDING));
|
||||||
-
|
-
|
||||||
- xref_tmphash = kcalloc(XREF_TMPHASH_SIZE,
|
|
||||||
- sizeof(struct jffs2_xattr_ref *), GFP_KERNEL);
|
|
||||||
- if (!xref_tmphash)
|
|
||||||
- return -ENOMEM;
|
|
||||||
-
|
|
||||||
- /* Phase.1 : Merge same xref */
|
- /* Phase.1 : Merge same xref */
|
||||||
|
- for (i=0; i < XREF_TMPHASH_SIZE; i++)
|
||||||
|
- xref_tmphash[i] = NULL;
|
||||||
- for (ref=c->xref_temp; ref; ref=_ref) {
|
- for (ref=c->xref_temp; ref; ref=_ref) {
|
||||||
- struct jffs2_xattr_ref *tmp;
|
- struct jffs2_xattr_ref *tmp;
|
||||||
-
|
-
|
||||||
|
@ -9558,8 +9555,6 @@ diff -Nupr old/fs/jffs2/xattr.c new/fs/jffs2/xattr.c
|
||||||
- "%u of xref (%u dead, %u orphan) found.\n",
|
- "%u of xref (%u dead, %u orphan) found.\n",
|
||||||
- xdatum_count, xdatum_unchecked_count, xdatum_orphan_count,
|
- xdatum_count, xdatum_unchecked_count, xdatum_orphan_count,
|
||||||
- xref_count, xref_dead_count, xref_orphan_count);
|
- xref_count, xref_dead_count, xref_orphan_count);
|
||||||
- kfree(xref_tmphash);
|
|
||||||
- return 0;
|
|
||||||
-}
|
-}
|
||||||
-
|
-
|
||||||
-struct jffs2_xattr_datum *jffs2_setup_xattr_datum(struct jffs2_sb_info *c,
|
-struct jffs2_xattr_datum *jffs2_setup_xattr_datum(struct jffs2_sb_info *c,
|
||||||
|
|
|
@ -490,14 +490,14 @@ off_t VfsJffs2Seek(struct file *filep, off_t offset, int whence)
|
||||||
filePos = filep->f_pos;
|
filePos = filep->f_pos;
|
||||||
|
|
||||||
switch (whence) {
|
switch (whence) {
|
||||||
case SEEK_CUR:
|
|
||||||
filePos += offset;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case SEEK_SET:
|
case SEEK_SET:
|
||||||
filePos = offset;
|
filePos = offset;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SEEK_CUR:
|
||||||
|
filePos += offset;
|
||||||
|
break;
|
||||||
|
|
||||||
case SEEK_END:
|
case SEEK_END:
|
||||||
filePos = node->i_size + offset;
|
filePos = node->i_size + offset;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
import("//kernel/liteos_a/liteos.gni")
|
||||||
import("$THIRDPARTY_NUTTX_DIR/NuttX.gni")
|
import("//third_party/NuttX/NuttX.gni")
|
||||||
|
|
||||||
module_switch = defined(LOSCFG_FS_NFS)
|
module_switch = defined(LOSCFG_FS_NFS)
|
||||||
module_name = get_path_info(rebase_path("."), "name")
|
module_name = get_path_info(rebase_path("."), "name")
|
||||||
|
|
|
@ -207,7 +207,7 @@ static const struct ProcFileOperations FS_CACHE_PROC_FOPS = {
|
||||||
|
|
||||||
void ProcFsCacheInit(void)
|
void ProcFsCacheInit(void)
|
||||||
{
|
{
|
||||||
struct ProcDirEntry *pde = CreateProcEntry("fs_cache", 0400, NULL);
|
struct ProcDirEntry *pde = CreateProcEntry("fs_cache", 0, NULL);
|
||||||
if (pde == NULL) {
|
if (pde == NULL) {
|
||||||
PRINT_ERR("create fs_cache error!\n");
|
PRINT_ERR("create fs_cache error!\n");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
import("//kernel/liteos_a/liteos.gni")
|
||||||
import("$THIRDPARTY_NUTTX_DIR/NuttX.gni")
|
import("//third_party/NuttX/NuttX.gni")
|
||||||
|
|
||||||
module_switch = defined(LOSCFG_FS_RAMFS)
|
module_switch = defined(LOSCFG_FS_RAMFS)
|
||||||
module_name = get_path_info(rebase_path("."), "name")
|
module_name = get_path_info(rebase_path("."), "name")
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
import("//kernel/liteos_a/liteos.gni")
|
||||||
import("$THIRDPARTY_NUTTX_DIR/NuttX.gni")
|
import("//third_party/NuttX/NuttX.gni")
|
||||||
|
|
||||||
module_switch = defined(LOSCFG_FS_ROMFS)
|
module_switch = defined(LOSCFG_FS_ROMFS)
|
||||||
module_name = get_path_info(rebase_path("."), "name")
|
module_name = get_path_info(rebase_path("."), "name")
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
import("//kernel/liteos_a/liteos.gni")
|
||||||
import("$THIRDPARTY_NUTTX_DIR/NuttX.gni")
|
import("//third_party/NuttX/NuttX.gni")
|
||||||
|
|
||||||
module_switch = defined(LOSCFG_FS_VFS)
|
module_switch = defined(LOSCFG_FS_VFS)
|
||||||
module_name = get_path_info(rebase_path("."), "name")
|
module_name = get_path_info(rebase_path("."), "name")
|
||||||
|
|
|
@ -220,18 +220,14 @@ int epoll_close(int epfd)
|
||||||
{
|
{
|
||||||
struct epoll_head *epHead = NULL;
|
struct epoll_head *epHead = NULL;
|
||||||
|
|
||||||
(VOID)pthread_mutex_lock(&g_epollMutex);
|
|
||||||
epHead = EpollGetDataBuff(epfd);
|
epHead = EpollGetDataBuff(epfd);
|
||||||
if (epHead == NULL) {
|
if (epHead == NULL) {
|
||||||
(VOID)pthread_mutex_unlock(&g_epollMutex);
|
|
||||||
set_errno(EBADF);
|
set_errno(EBADF);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
DoEpollClose(epHead);
|
DoEpollClose(epHead);
|
||||||
int ret = EpollFreeSysFd(epfd);
|
return EpollFreeSysFd(epfd);
|
||||||
(VOID)pthread_mutex_unlock(&g_epollMutex);
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int epoll_ctl(int epfd, int op, int fd, struct epoll_event *ev)
|
int epoll_ctl(int epfd, int op, int fd, struct epoll_event *ev)
|
||||||
|
@ -240,16 +236,15 @@ int epoll_ctl(int epfd, int op, int fd, struct epoll_event *ev)
|
||||||
int i;
|
int i;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
(VOID)pthread_mutex_lock(&g_epollMutex);
|
|
||||||
epHead = EpollGetDataBuff(epfd);
|
epHead = EpollGetDataBuff(epfd);
|
||||||
if (epHead == NULL) {
|
if (epHead == NULL) {
|
||||||
set_errno(EBADF);
|
set_errno(EBADF);
|
||||||
goto OUT_RELEASE;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ev == NULL) {
|
if (ev == NULL) {
|
||||||
set_errno(EINVAL);
|
set_errno(EINVAL);
|
||||||
goto OUT_RELEASE;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (op) {
|
switch (op) {
|
||||||
|
@ -257,19 +252,18 @@ int epoll_ctl(int epfd, int op, int fd, struct epoll_event *ev)
|
||||||
ret = CheckFdExist(epHead, fd);
|
ret = CheckFdExist(epHead, fd);
|
||||||
if (ret == -1) {
|
if (ret == -1) {
|
||||||
set_errno(EEXIST);
|
set_errno(EEXIST);
|
||||||
goto OUT_RELEASE;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (epHead->nodeCount == EPOLL_DEFAULT_SIZE) {
|
if (epHead->nodeCount == EPOLL_DEFAULT_SIZE) {
|
||||||
set_errno(ENOMEM);
|
set_errno(ENOMEM);
|
||||||
goto OUT_RELEASE;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
epHead->evs[epHead->nodeCount].events = ev->events | POLLERR | POLLHUP;
|
epHead->evs[epHead->nodeCount].events = ev->events | POLLERR | POLLHUP;
|
||||||
epHead->evs[epHead->nodeCount].data.fd = fd;
|
epHead->evs[epHead->nodeCount].data.fd = fd;
|
||||||
epHead->nodeCount++;
|
epHead->nodeCount++;
|
||||||
ret = 0;
|
return 0;
|
||||||
break;
|
|
||||||
case EPOLL_CTL_DEL:
|
case EPOLL_CTL_DEL:
|
||||||
for (i = 0; i < epHead->nodeCount; i++) {
|
for (i = 0; i < epHead->nodeCount; i++) {
|
||||||
if (epHead->evs[i].data.fd != fd) {
|
if (epHead->evs[i].data.fd != fd) {
|
||||||
|
@ -281,29 +275,23 @@ int epoll_ctl(int epfd, int op, int fd, struct epoll_event *ev)
|
||||||
epHead->nodeCount - i);
|
epHead->nodeCount - i);
|
||||||
}
|
}
|
||||||
epHead->nodeCount--;
|
epHead->nodeCount--;
|
||||||
ret = 0;
|
return 0;
|
||||||
goto OUT_RELEASE;
|
|
||||||
}
|
}
|
||||||
set_errno(ENOENT);
|
set_errno(ENOENT);
|
||||||
break;
|
return -1;
|
||||||
case EPOLL_CTL_MOD:
|
case EPOLL_CTL_MOD:
|
||||||
for (i = 0; i < epHead->nodeCount; i++) {
|
for (i = 0; i < epHead->nodeCount; i++) {
|
||||||
if (epHead->evs[i].data.fd == fd) {
|
if (epHead->evs[i].data.fd == fd) {
|
||||||
epHead->evs[i].events = ev->events | POLLERR | POLLHUP;
|
epHead->evs[i].events = ev->events | POLLERR | POLLHUP;
|
||||||
ret = 0;
|
return 0;
|
||||||
goto OUT_RELEASE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set_errno(ENOENT);
|
set_errno(ENOENT);
|
||||||
break;
|
return -1;
|
||||||
default:
|
default:
|
||||||
set_errno(EINVAL);
|
set_errno(EINVAL);
|
||||||
break;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
OUT_RELEASE:
|
|
||||||
(VOID)pthread_mutex_unlock(&g_epollMutex);
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int epoll_wait(int epfd, FAR struct epoll_event *evs, int maxevents, int timeout)
|
int epoll_wait(int epfd, FAR struct epoll_event *evs, int maxevents, int timeout)
|
||||||
|
@ -338,7 +326,7 @@ int epoll_wait(int epfd, FAR struct epoll_event *evs, int maxevents, int timeout
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < pollSize; i++) {
|
for (i = 0; i < epHead->nodeCount; i++) {
|
||||||
pFd[i].fd = epHead->evs[i].data.fd;
|
pFd[i].fd = epHead->evs[i].data.fd;
|
||||||
pFd[i].events = (short)epHead->evs[i].events;
|
pFd[i].events = (short)epHead->evs[i].events;
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,51 @@ config PAGE_TABLE_FINE_LOCK
|
||||||
help
|
help
|
||||||
This option will enable fine lock for page table.
|
This option will enable fine lock for page table.
|
||||||
|
|
||||||
|
######################### config options of container ####################
|
||||||
|
config KERNEL_CONTAINER
|
||||||
|
bool "Enable container Feature"
|
||||||
|
default n
|
||||||
|
depends on KERNEL_VM
|
||||||
|
|
||||||
|
config PID_CONTAINER
|
||||||
|
bool "Enable pid container Feature"
|
||||||
|
default n
|
||||||
|
depends on KERNEL_CONTAINER
|
||||||
|
|
||||||
|
config UTS_CONTAINER
|
||||||
|
bool "Enable uts container Feature"
|
||||||
|
default n
|
||||||
|
depends on KERNEL_CONTAINER
|
||||||
|
|
||||||
|
config MNT_CONTAINER
|
||||||
|
bool "Enable mnt container Feature"
|
||||||
|
default n
|
||||||
|
depends on KERNEL_CONTAINER
|
||||||
|
|
||||||
|
config CHROOT
|
||||||
|
bool "Enable chroot"
|
||||||
|
default n
|
||||||
|
depends on MNT_CONTAINER
|
||||||
|
|
||||||
|
config IPC_CONTAINER
|
||||||
|
bool "Enable ipc container Feature"
|
||||||
|
default n
|
||||||
|
depends on KERNEL_CONTAINER
|
||||||
|
|
||||||
|
config TIME_CONTAINER
|
||||||
|
bool "Enable time container"
|
||||||
|
default n
|
||||||
|
depends on KERNEL_CONTAINER
|
||||||
|
|
||||||
|
config USER_CONTAINER
|
||||||
|
bool "Enable user container"
|
||||||
|
default n
|
||||||
|
depends on KERNEL_CONTAINER
|
||||||
|
|
||||||
|
config NET_CONTAINER
|
||||||
|
bool "Enable net container"
|
||||||
|
default n
|
||||||
|
depends on KERNEL_CONTAINER
|
||||||
|
|
||||||
######################### config options of extended #####################
|
######################### config options of extended #####################
|
||||||
source "kernel/extended/Kconfig"
|
source "kernel/extended/Kconfig"
|
||||||
|
|
|
@ -32,6 +32,15 @@ import("//kernel/liteos_a/liteos.gni")
|
||||||
module_name = get_path_info(rebase_path("."), "name")
|
module_name = get_path_info(rebase_path("."), "name")
|
||||||
kernel_module(module_name) {
|
kernel_module(module_name) {
|
||||||
sources = [
|
sources = [
|
||||||
|
"container/los_container.c",
|
||||||
|
"container/los_credentials.c",
|
||||||
|
"container/los_ipc_container.c",
|
||||||
|
"container/los_mnt_container.c",
|
||||||
|
"container/los_net_container.c",
|
||||||
|
"container/los_pid_container.c",
|
||||||
|
"container/los_time_container.c",
|
||||||
|
"container/los_user_container.c",
|
||||||
|
"container/los_uts_container.c",
|
||||||
"core/los_bitmap.c",
|
"core/los_bitmap.c",
|
||||||
"core/los_info.c",
|
"core/los_info.c",
|
||||||
"core/los_process.c",
|
"core/los_process.c",
|
||||||
|
|
|
@ -39,6 +39,7 @@ LOCAL_SRCS := $(wildcard ipc/*.c) $(wildcard core/*.c) $(wildcard mem/membox/*.
|
||||||
$(wildcard mp/*.c) \
|
$(wildcard mp/*.c) \
|
||||||
$(wildcard sched/*.c) \
|
$(wildcard sched/*.c) \
|
||||||
$(wildcard vm/*.c) \
|
$(wildcard vm/*.c) \
|
||||||
|
$(wildcard container/*.c)
|
||||||
|
|
||||||
|
|
||||||
LOCAL_FLAGS := $(LITEOS_CFLAGS_INTERWORK) -Wno-frame-address
|
LOCAL_FLAGS := $(LITEOS_CFLAGS_INTERWORK) -Wno-frame-address
|
||||||
|
|
|
@ -583,7 +583,7 @@ STATIC INLINE BOOL SwtmrRunqueueFind(SortLinkAttribute *swtmrSortLink, SCHED_TL_
|
||||||
STATIC BOOL SwtmrTimeListFind(SCHED_TL_FIND_FUNC checkFunc, UINTPTR arg)
|
STATIC BOOL SwtmrTimeListFind(SCHED_TL_FIND_FUNC checkFunc, UINTPTR arg)
|
||||||
{
|
{
|
||||||
for (UINT16 cpuid = 0; cpuid < LOSCFG_KERNEL_CORE_NUM; cpuid++) {
|
for (UINT16 cpuid = 0; cpuid < LOSCFG_KERNEL_CORE_NUM; cpuid++) {
|
||||||
SortLinkAttribute *swtmrSortLink = &g_swtmrRunqueue[cpuid].swtmrSortLink;
|
SortLinkAttribute *swtmrSortLink = &g_swtmrRunqueue[ArchCurrCpuid()].swtmrSortLink;
|
||||||
if (SwtmrRunqueueFind(swtmrSortLink, checkFunc, arg)) {
|
if (SwtmrRunqueueFind(swtmrSortLink, checkFunc, arg)) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,8 +157,7 @@ typedef struct VmSpace {
|
||||||
#define VM_MAP_REGION_FLAG_SHM (1<<16)
|
#define VM_MAP_REGION_FLAG_SHM (1<<16)
|
||||||
#define VM_MAP_REGION_FLAG_FIXED (1<<17)
|
#define VM_MAP_REGION_FLAG_FIXED (1<<17)
|
||||||
#define VM_MAP_REGION_FLAG_FIXED_NOREPLACE (1<<18)
|
#define VM_MAP_REGION_FLAG_FIXED_NOREPLACE (1<<18)
|
||||||
#define VM_MAP_REGION_FLAG_LITEIPC (1<<19)
|
#define VM_MAP_REGION_FLAG_INVALID (1<<19) /* indicates that flags are not specified */
|
||||||
#define VM_MAP_REGION_FLAG_INVALID (1<<20) /* indicates that flags are not specified */
|
|
||||||
|
|
||||||
STATIC INLINE UINT32 OsCvtProtFlagsToRegionFlags(unsigned long prot, unsigned long flags)
|
STATIC INLINE UINT32 OsCvtProtFlagsToRegionFlags(unsigned long prot, unsigned long flags)
|
||||||
{
|
{
|
||||||
|
|
|
@ -103,7 +103,7 @@ STATIC VOID SortQueueIndexArray(UINT32 *indexArray, UINT32 count)
|
||||||
IpcSortParam queueSortParam;
|
IpcSortParam queueSortParam;
|
||||||
queueSortParam.buf = (CHAR *)g_queueDebugArray;
|
queueSortParam.buf = (CHAR *)g_queueDebugArray;
|
||||||
queueSortParam.ipcDebugCBSize = sizeof(QueueDebugCB);
|
queueSortParam.ipcDebugCBSize = sizeof(QueueDebugCB);
|
||||||
queueSortParam.ipcDebugCBCnt = LOSCFG_BASE_IPC_QUEUE_LIMIT;
|
queueSortParam.ipcDebugCBCnt = LOSCFG_BASE_IPC_SEM_LIMIT;
|
||||||
queueSortParam.sortElemOff = LOS_OFF_SET_OF(QueueDebugCB, lastAccessTime);
|
queueSortParam.sortElemOff = LOS_OFF_SET_OF(QueueDebugCB, lastAccessTime);
|
||||||
|
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
|
|
|
@ -887,7 +887,7 @@ STATIC UINT32 OsMemPoolInit(VOID *pool, UINT32 size)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LOSCFG_MEM_MUL_POOL
|
#ifdef LOSCFG_MEM_MUL_POOL
|
||||||
STATIC VOID OsMemPoolDeInit(const VOID *pool, UINT32 size)
|
STATIC VOID OsMemPoolDeinit(const VOID *pool, UINT32 size)
|
||||||
{
|
{
|
||||||
#ifdef LOSCFG_KERNEL_LMS
|
#ifdef LOSCFG_KERNEL_LMS
|
||||||
if (g_lms != NULL) {
|
if (g_lms != NULL) {
|
||||||
|
|
|
@ -379,7 +379,6 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsShellCmdTskInfoGet(UINT32 processID, VOID *seqBu
|
||||||
(VOID)memset_s(threadInfo, sizeof(ProcessThreadInfo), 0, sizeof(ProcessThreadInfo));
|
(VOID)memset_s(threadInfo, sizeof(ProcessThreadInfo), 0, sizeof(ProcessThreadInfo));
|
||||||
|
|
||||||
if (OsGetProcessThreadInfo(processID, threadInfo) != LOS_OK) {
|
if (OsGetProcessThreadInfo(processID, threadInfo) != LOS_OK) {
|
||||||
(VOID)LOS_MemFree(m_aucSysMem1, threadInfo);
|
|
||||||
return LOS_NOK;
|
return LOS_NOK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,8 +76,6 @@ const CHAR *OsGetRegionNameOrFilePath(LosVmMapRegion *region)
|
||||||
return "MMAP";
|
return "MMAP";
|
||||||
} else if (region->regionFlags & VM_MAP_REGION_FLAG_SHM) {
|
} else if (region->regionFlags & VM_MAP_REGION_FLAG_SHM) {
|
||||||
return "SHM";
|
return "SHM";
|
||||||
} else if (region->regionFlags & VM_MAP_REGION_FLAG_LITEIPC) {
|
|
||||||
return "LITEIPC";
|
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -261,7 +261,7 @@ STATIC UINT32 GetDirtySize(LosFilePage *fpage, struct Vnode *vnode)
|
||||||
|
|
||||||
STATIC INT32 OsFlushDirtyPage(LosFilePage *fpage)
|
STATIC INT32 OsFlushDirtyPage(LosFilePage *fpage)
|
||||||
{
|
{
|
||||||
ssize_t ret;
|
UINT32 ret;
|
||||||
size_t len;
|
size_t len;
|
||||||
char *buff = NULL;
|
char *buff = NULL;
|
||||||
struct Vnode *vnode = fpage->mapping->host;
|
struct Vnode *vnode = fpage->mapping->host;
|
||||||
|
|
|
@ -273,8 +273,6 @@ STATIC UINT32 OsInheritOldRegionName(UINT32 oldRegionFlags)
|
||||||
vmFlags |= VM_MAP_REGION_FLAG_MMAP;
|
vmFlags |= VM_MAP_REGION_FLAG_MMAP;
|
||||||
} else if (oldRegionFlags & VM_MAP_REGION_FLAG_SHM) {
|
} else if (oldRegionFlags & VM_MAP_REGION_FLAG_SHM) {
|
||||||
vmFlags |= VM_MAP_REGION_FLAG_SHM;
|
vmFlags |= VM_MAP_REGION_FLAG_SHM;
|
||||||
} else if (oldRegionFlags & VM_MAP_REGION_FLAG_LITEIPC) {
|
|
||||||
vmFlags |= VM_MAP_REGION_FLAG_LITEIPC;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return vmFlags;
|
return vmFlags;
|
||||||
|
@ -300,9 +298,7 @@ INT32 LOS_DoMprotect(VADDR_T vaddr, size_t len, unsigned long prot)
|
||||||
goto OUT_MPROTECT;
|
goto OUT_MPROTECT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((region->regionFlags & VM_MAP_REGION_FLAG_VDSO) ||
|
if ((region->regionFlags & VM_MAP_REGION_FLAG_VDSO) || (region->regionFlags & VM_MAP_REGION_FLAG_HEAP)) {
|
||||||
(region->regionFlags & VM_MAP_REGION_FLAG_HEAP) ||
|
|
||||||
(region->regionFlags & VM_MAP_REGION_FLAG_LITEIPC)) {
|
|
||||||
ret = -EPERM;
|
ret = -EPERM;
|
||||||
goto OUT_MPROTECT;
|
goto OUT_MPROTECT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -689,9 +689,6 @@ INT32 ShmCtl(INT32 shmid, INT32 cmd, struct shmid_ds *buf)
|
||||||
(shm_perm.mode & ACCESSPERMS);
|
(shm_perm.mode & ACCESSPERMS);
|
||||||
seg->ds.shm_ctime = time(NULL);
|
seg->ds.shm_ctime = time(NULL);
|
||||||
#ifdef LOSCFG_SHELL
|
#ifdef LOSCFG_SHELL
|
||||||
if (OsProcessIDUserCheckInvalid(shm_perm.uid)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
(VOID)memcpy_s(seg->ownerName, OS_PCB_NAME_LEN, OS_PCB_FROM_PID(shm_perm.uid)->processName,
|
(VOID)memcpy_s(seg->ownerName, OS_PCB_NAME_LEN, OS_PCB_FROM_PID(shm_perm.uid)->processName,
|
||||||
OS_PCB_NAME_LEN);
|
OS_PCB_NAME_LEN);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -687,7 +687,7 @@ STATIC ssize_t ConsoleRead(struct file *filep, CHAR *buffer, size_t bufLen)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userBuf) {
|
if (userBuf) {
|
||||||
if (LOS_ArchCopyToUser(buffer, sbuffer, ret) != 0) {
|
if (LOS_ArchCopyToUser(buffer, sbuffer, bufLen) != 0) {
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
goto ERROUT;
|
goto ERROUT;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,6 @@ import("//kernel/liteos_a/liteos.gni")
|
||||||
group("extended") {
|
group("extended") {
|
||||||
deps = [
|
deps = [
|
||||||
"blackbox",
|
"blackbox",
|
||||||
"container",
|
|
||||||
"cppsupport",
|
"cppsupport",
|
||||||
"cpup",
|
"cpup",
|
||||||
"dynload",
|
"dynload",
|
||||||
|
@ -53,7 +52,6 @@ group("extended") {
|
||||||
config("public") {
|
config("public") {
|
||||||
configs = [
|
configs = [
|
||||||
"blackbox:public",
|
"blackbox:public",
|
||||||
"container:public",
|
|
||||||
"cpup:public",
|
"cpup:public",
|
||||||
"dynload:public",
|
"dynload:public",
|
||||||
"hidumper:public",
|
"hidumper:public",
|
||||||
|
|
|
@ -113,54 +113,6 @@ config KERNEL_HOOK
|
||||||
default n
|
default n
|
||||||
depends on KERNEL_EXTKERNEL && DEBUG_VERSION
|
depends on KERNEL_EXTKERNEL && DEBUG_VERSION
|
||||||
|
|
||||||
|
|
||||||
######################### config options of container ####################
|
|
||||||
config KERNEL_CONTAINER
|
|
||||||
bool "Enable container Feature"
|
|
||||||
default n
|
|
||||||
depends on KERNEL_VM
|
|
||||||
|
|
||||||
config PID_CONTAINER
|
|
||||||
bool "Enable pid container Feature"
|
|
||||||
default n
|
|
||||||
depends on KERNEL_CONTAINER
|
|
||||||
|
|
||||||
config UTS_CONTAINER
|
|
||||||
bool "Enable uts container Feature"
|
|
||||||
default n
|
|
||||||
depends on KERNEL_CONTAINER
|
|
||||||
|
|
||||||
config MNT_CONTAINER
|
|
||||||
bool "Enable mnt container Feature"
|
|
||||||
default n
|
|
||||||
depends on KERNEL_CONTAINER
|
|
||||||
|
|
||||||
config CHROOT
|
|
||||||
bool "Enable chroot"
|
|
||||||
default n
|
|
||||||
depends on MNT_CONTAINER
|
|
||||||
|
|
||||||
config IPC_CONTAINER
|
|
||||||
bool "Enable ipc container Feature"
|
|
||||||
default n
|
|
||||||
depends on KERNEL_CONTAINER
|
|
||||||
|
|
||||||
config TIME_CONTAINER
|
|
||||||
bool "Enable time container"
|
|
||||||
default n
|
|
||||||
depends on KERNEL_CONTAINER
|
|
||||||
|
|
||||||
config USER_CONTAINER
|
|
||||||
bool "Enable user container"
|
|
||||||
default n
|
|
||||||
depends on KERNEL_CONTAINER
|
|
||||||
|
|
||||||
config NET_CONTAINER
|
|
||||||
bool "Enable net container"
|
|
||||||
default n
|
|
||||||
depends on KERNEL_CONTAINER
|
|
||||||
|
|
||||||
|
|
||||||
######################### config options of trace #########################
|
######################### config options of trace #########################
|
||||||
source "kernel/extended/trace/Kconfig"
|
source "kernel/extended/trace/Kconfig"
|
||||||
|
|
||||||
|
|
|
@ -1,65 +0,0 @@
|
||||||
# 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.
|
|
||||||
|
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
|
||||||
|
|
||||||
module_switch = defined(LOSCFG_KERNEL_CONTAINER)
|
|
||||||
module_name = get_path_info(rebase_path("."), "name")
|
|
||||||
kernel_module(module_name) {
|
|
||||||
sources = [ "los_container.c" ]
|
|
||||||
if (defined(LOSCFG_IPC_CONTAINER)) {
|
|
||||||
sources += [ "los_ipc_container.c" ]
|
|
||||||
}
|
|
||||||
if (defined(LOSCFG_MNT_CONTAINER)) {
|
|
||||||
sources += [ "los_mnt_container.c" ]
|
|
||||||
}
|
|
||||||
if (defined(LOSCFG_NET_CONTAINER)) {
|
|
||||||
sources += [ "los_net_container.c" ]
|
|
||||||
}
|
|
||||||
if (defined(LOSCFG_PID_CONTAINER)) {
|
|
||||||
sources += [ "los_pid_container.c" ]
|
|
||||||
}
|
|
||||||
if (defined(LOSCFG_TIME_CONTAINER)) {
|
|
||||||
sources += [ "los_time_container.c" ]
|
|
||||||
}
|
|
||||||
if (defined(LOSCFG_USER_CONTAINER)) {
|
|
||||||
sources += [
|
|
||||||
"los_credentials.c",
|
|
||||||
"los_user_container.c",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
if (defined(LOSCFG_UTS_CONTAINER)) {
|
|
||||||
sources += [ "los_uts_container.c" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
public_configs = [ ":public" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
config("public") {
|
|
||||||
include_dirs = [ "." ]
|
|
||||||
}
|
|
|
@ -1,63 +0,0 @@
|
||||||
# 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 $(LITEOSTOPDIR)/config.mk
|
|
||||||
|
|
||||||
MODULE_NAME := $(notdir $(shell pwd))
|
|
||||||
|
|
||||||
LOCAL_SRCS := $(wildcard *.c)
|
|
||||||
|
|
||||||
ifneq ($(LOSCFG_IPC_CONTAINER), y)
|
|
||||||
LOCAL_SRCS += $(filter-out los_ipc_container.c, $(LOCAL_SRCS))
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(LOSCFG_MNT_CONTAINER), y)
|
|
||||||
LOCAL_SRCS += $(filter-out los_mnt_container.c, $(LOCAL_SRCS))
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(LOSCFG_NET_CONTAINER), y)
|
|
||||||
LOCAL_SRCS += $(filter-out los_net_container.c, $(LOCAL_SRCS))
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(LOSCFG_PID_CONTAINER), y)
|
|
||||||
LOCAL_SRCS += $(filter-out los_pid_container.c, $(LOCAL_SRCS))
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(LOSCFG_TIME_CONTAINER), y)
|
|
||||||
LOCAL_SRCS += $(filter-out los_time_container.c, $(LOCAL_SRCS))
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(LOSCFG_USER_CONTAINER), y)
|
|
||||||
LOCAL_SRCS += $(filter-out los_credentials.c los_user_container.c, $(LOCAL_SRCS))
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(LOSCFG_UTS_CONTAINER), y)
|
|
||||||
LOCAL_SRCS += $(filter-out los_uts_container.c, $(LOCAL_SRCS))
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(MODULE)
|
|
|
@ -278,6 +278,7 @@ static void DumpFaultLog(void)
|
||||||
|
|
||||||
static void DumpMemData(struct MemDumpParam *param)
|
static void DumpMemData(struct MemDumpParam *param)
|
||||||
{
|
{
|
||||||
|
PRINTK("\nDumpType: %d\n", param->type);
|
||||||
PRINTK("Unsupported now!\n");
|
PRINTK("Unsupported now!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ module_switch = defined(LOSCFG_BASE_CORE_HILOG)
|
||||||
module_name = get_path_info(rebase_path("."), "name")
|
module_name = get_path_info(rebase_path("."), "name")
|
||||||
kernel_module(module_name) {
|
kernel_module(module_name) {
|
||||||
sources = [
|
sources = [
|
||||||
"$HIVIEWDFX_HILOG_LITE_DIR/frameworks/featured/hiview_log.c",
|
"//base/hiviewdfx/hilog_lite/frameworks/featured/hiview_log.c",
|
||||||
"los_hilog.c",
|
"los_hilog.c",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -42,8 +42,8 @@ kernel_module(module_name) {
|
||||||
|
|
||||||
config("public") {
|
config("public") {
|
||||||
include_dirs = [
|
include_dirs = [
|
||||||
"$HIVIEWDFX_HILOG_LITE_DIR/interfaces/native/kits",
|
"//base/hiviewdfx/hilog_lite/interfaces/native/kits",
|
||||||
"$HIVIEWDFX_HILOG_LITE_DIR/interfaces/native/kits/hilog",
|
"//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog",
|
||||||
".",
|
".",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,7 +239,6 @@ LITE_OS_SEC_TEXT STATIC int LiteIpcMmap(struct file *filep, LosVmMapRegion *regi
|
||||||
goto ERROR_MAP_OUT;
|
goto ERROR_MAP_OUT;
|
||||||
}
|
}
|
||||||
ipcInfo->pool.poolSize = region->range.size;
|
ipcInfo->pool.poolSize = region->range.size;
|
||||||
region->regionFlags |= VM_MAP_REGION_FLAG_LITEIPC;
|
|
||||||
return 0;
|
return 0;
|
||||||
ERROR_MAP_OUT:
|
ERROR_MAP_OUT:
|
||||||
LOS_VFree(ipcInfo->pool.kvaddr);
|
LOS_VFree(ipcInfo->pool.kvaddr);
|
||||||
|
@ -758,10 +757,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 HandlePtr(LosProcessCB *pcb, SpecialObj *obj, BOO
|
||||||
obj->content.ptr.buff = (VOID *)GetIpcUserAddr(pcb, (INTPTR)buf);
|
obj->content.ptr.buff = (VOID *)GetIpcUserAddr(pcb, (INTPTR)buf);
|
||||||
EnableIpcNodeFreeByUser(pcb, (VOID *)buf);
|
EnableIpcNodeFreeByUser(pcb, (VOID *)buf);
|
||||||
} else {
|
} else {
|
||||||
buf = (VOID *)GetIpcKernelAddr(pcb, (INTPTR)obj->content.ptr.buff);
|
(VOID)LiteIpcNodeFree(pcb, (VOID *)GetIpcKernelAddr(pcb, (INTPTR)obj->content.ptr.buff));
|
||||||
if (IsIpcNode(pcb, buf) == TRUE) {
|
|
||||||
(VOID)LiteIpcNodeFree(pcb, buf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return LOS_OK;
|
return LOS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
import("//kernel/liteos_a/liteos.gni")
|
||||||
import("$THIRDPARTY_NUTTX_DIR/NuttX.gni")
|
import("//third_party/NuttX/NuttX.gni")
|
||||||
|
|
||||||
module_switch = defined(LOSCFG_KERNEL_PIPE)
|
module_switch = defined(LOSCFG_KERNEL_PIPE)
|
||||||
module_name = get_path_info(rebase_path("."), "name")
|
module_name = get_path_info(rebase_path("."), "name")
|
||||||
|
|
|
@ -485,35 +485,29 @@ UINT32 OsDevLimitWriteDeny(ProcLimitSet *plimit, const CHAR *buf, UINT32 size)
|
||||||
return DevLimitUpdateAccess(plimit, buf, DEVLIMIT_DENY);
|
return DevLimitUpdateAccess(plimit, buf, DEVLIMIT_DENY);
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC VOID DevLimitItemSetAccess(CHAR *accArray, INT16 access)
|
STATIC VOID DevLimitItemSetAccess(CHAR *acc, INT16 access)
|
||||||
{
|
{
|
||||||
INT32 index = 0;
|
INT32 index = 0;
|
||||||
(VOID)memset_s(accArray, ACCLEN, 0, ACCLEN);
|
(VOID)memset_s(acc, ACCLEN, 0, ACCLEN);
|
||||||
if (access & DEVLIMIT_ACC_READ) {
|
if (access & DEVLIMIT_ACC_READ) {
|
||||||
accArray[index] = 'r';
|
acc[index++] = 'r';
|
||||||
index++;
|
|
||||||
}
|
}
|
||||||
if (access & DEVLIMIT_ACC_WRITE) {
|
if (access & DEVLIMIT_ACC_WRITE) {
|
||||||
accArray[index] = 'w';
|
acc[index++] = 'w';
|
||||||
index++;
|
|
||||||
}
|
}
|
||||||
if (access & DEVLIMIT_ACC_MKNOD) {
|
if (access & DEVLIMIT_ACC_MKNOD) {
|
||||||
accArray[index] = 'm';
|
acc[index++] = 'm';
|
||||||
index++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC CHAR DevLimitItemTypeToChar(INT16 type)
|
STATIC CHAR DevLimitItemTypeToChar(INT16 type)
|
||||||
{
|
{
|
||||||
switch (type) {
|
if (type == DEVLIMIT_DEV_ALL) {
|
||||||
case DEVLIMIT_DEV_ALL:
|
return 'a';
|
||||||
return 'a';
|
} else if (type == DEVLIMIT_DEV_CHAR) {
|
||||||
case DEVLIMIT_DEV_CHAR:
|
return 'c';
|
||||||
return 'c';
|
} else if (type == DEVLIMIT_DEV_BLOCK) {
|
||||||
case DEVLIMIT_DEV_BLOCK:
|
return 'b';
|
||||||
return 'b';
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return 'X';
|
return 'X';
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,8 +28,11 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
import("//kernel/liteos_a/liteos.gni")
|
||||||
import("$THIRDPARTY_MUSL_DIR/porting/liteos_a/kernel/musl.gni")
|
|
||||||
import("$THIRDPARTY_OPTIMIZED_ROUTINES_DIR/optimized-routines.gni")
|
MUSLDIR = "$LITEOSTHIRDPARTY/musl"
|
||||||
|
|
||||||
|
import("//third_party/optimized-routines/optimized-routines.gni")
|
||||||
|
import("$MUSLDIR/porting/liteos_a/kernel/musl.gni")
|
||||||
|
|
||||||
module_switch = defined(LOSCFG_LIBC_MUSL)
|
module_switch = defined(LOSCFG_LIBC_MUSL)
|
||||||
module_name = get_path_info(rebase_path("."), "name")
|
module_name = get_path_info(rebase_path("."), "name")
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
import("//kernel/liteos_a/liteos.gni")
|
||||||
import("$THIRDPARTY_MUSL_DIR/porting/liteos_a_newlib/kernel/newlib.gni")
|
import("//third_party/musl/porting/liteos_a_newlib/kernel/newlib.gni")
|
||||||
|
|
||||||
module_switch = defined(LOSCFG_LIBC_NEWLIB)
|
module_switch = defined(LOSCFG_LIBC_NEWLIB)
|
||||||
module_name = get_path_info(rebase_path("."), "name")
|
module_name = get_path_info(rebase_path("."), "name")
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
import("//kernel/liteos_a/liteos.gni")
|
||||||
import("$THIRDPARTY_FREEBSD_DIR/FreeBSD.gni")
|
import("//third_party/FreeBSD/FreeBSD.gni")
|
||||||
|
|
||||||
module_name = get_path_info(rebase_path("."), "name")
|
module_name = get_path_info(rebase_path("."), "name")
|
||||||
kernel_module(module_name) {
|
kernel_module(module_name) {
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
import("//kernel/liteos_a/liteos.gni")
|
||||||
import("$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR/libsec_src.gni")
|
import("//third_party/bounds_checking_function/libsec_src.gni")
|
||||||
|
|
||||||
module_switch = defined(LOSCFG_LIB_LIBC)
|
module_switch = defined(LOSCFG_LIB_LIBC)
|
||||||
module_name = get_path_info(rebase_path("."), "name")
|
module_name = get_path_info(rebase_path("."), "name")
|
||||||
|
|
15
liteos.gni
15
liteos.gni
|
@ -32,19 +32,6 @@ import("$root_out_dir/config.gni")
|
||||||
LITEOSTOPDIR = "//kernel/liteos_a"
|
LITEOSTOPDIR = "//kernel/liteos_a"
|
||||||
LITEOSTHIRDPARTY = "//third_party"
|
LITEOSTHIRDPARTY = "//third_party"
|
||||||
HDFTOPDIR = "//drivers/hdf_core/adapter/khdf/liteos"
|
HDFTOPDIR = "//drivers/hdf_core/adapter/khdf/liteos"
|
||||||
HIVIEWDFX_HILOG_LITE_DIR = "//base/hiviewdfx/hilog_lite"
|
|
||||||
DRIVERS_LITEOS_DIR = "//drivers/liteos"
|
|
||||||
THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR =
|
|
||||||
"//third_party/bounds_checking_function"
|
|
||||||
THIRDPARTY_FATFS_DIR = "//third_party/FatFs"
|
|
||||||
THIRDPARTY_NUTTX_DIR = "//third_party/NuttX"
|
|
||||||
THIRDPARTY_MUSL_DIR = "//third_party/musl"
|
|
||||||
THIRDPARTY_TOYBOX_DIR = "//third_party/toybox"
|
|
||||||
THIRDPARTY_MKSH_DIR = "//third_party/mksh"
|
|
||||||
THIRDPARTY_FREEBSD_DIR = "//third_party/FreeBSD"
|
|
||||||
THIRDPARTY_OPTIMIZED_ROUTINES_DIR = "//third_party/optimized-routines"
|
|
||||||
THIRDPARTY_GOOGLETEST_DIR = "//third_party/googletest"
|
|
||||||
KERNEL_LINUX_DIR = "//kernel/linux/linux-5.10"
|
|
||||||
|
|
||||||
ARCH = ""
|
ARCH = ""
|
||||||
if (defined(LOSCFG_ARCH_ARM_AARCH32)) {
|
if (defined(LOSCFG_ARCH_ARM_AARCH32)) {
|
||||||
|
@ -148,8 +135,8 @@ set_defaults("kernel_module") {
|
||||||
"$LITEOSTOPDIR:los_config",
|
"$LITEOSTOPDIR:los_config",
|
||||||
]
|
]
|
||||||
visibility = [
|
visibility = [
|
||||||
":*",
|
|
||||||
"$LITEOSTOPDIR:*",
|
"$LITEOSTOPDIR:*",
|
||||||
|
":*",
|
||||||
"..:*",
|
"..:*",
|
||||||
"../..:*",
|
"../..:*",
|
||||||
]
|
]
|
||||||
|
|
|
@ -154,6 +154,7 @@ INT32 CmdLog(INT32 argc, const CHAR **argv)
|
||||||
PRINTK("not support yet\n");
|
PRINTK("not support yet\n");
|
||||||
}
|
}
|
||||||
} else if (!strncmp(argv[0], "path", strlen(argv[0]) + 1)) {
|
} else if (!strncmp(argv[0], "path", strlen(argv[0]) + 1)) {
|
||||||
|
OsLkLogFileSet(argv[1]);
|
||||||
PRINTK("not support yet\n");
|
PRINTK("not support yet\n");
|
||||||
} else {
|
} else {
|
||||||
PRINTK("Usage: log level <num>\n");
|
PRINTK("Usage: log level <num>\n");
|
||||||
|
|
|
@ -94,15 +94,9 @@ int SysMqClose(mqd_t personal)
|
||||||
int SysMqNotify(mqd_t personal, const struct sigevent *sigev)
|
int SysMqNotify(mqd_t personal, const struct sigevent *sigev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct sigevent ksigev;
|
|
||||||
|
|
||||||
ret = LOS_ArchCopyFromUser(&ksigev, sigev, sizeof(struct sigevent));
|
|
||||||
if (ret != 0) {
|
|
||||||
return -EFAULT;
|
|
||||||
}
|
|
||||||
|
|
||||||
MQUEUE_FD_U2K(personal);
|
MQUEUE_FD_U2K(personal);
|
||||||
ret = OsMqNotify(personal, &ksigev);
|
ret = OsMqNotify(personal, sigev);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
return -get_errno();
|
return -get_errno();
|
||||||
}
|
}
|
||||||
|
|
|
@ -401,7 +401,7 @@ ssize_t SysSendMsg(int s, const struct msghdr *message, int flags)
|
||||||
CHECK_ASPACE(message, sizeof(struct msghdr));
|
CHECK_ASPACE(message, sizeof(struct msghdr));
|
||||||
CPY_FROM_CONST_USER(struct msghdr, message);
|
CPY_FROM_CONST_USER(struct msghdr, message);
|
||||||
|
|
||||||
if (message && (size_t)message->msg_iovlen > IOV_MAX) {
|
if (message && message->msg_iovlen > IOV_MAX) {
|
||||||
set_errno(EMSGSIZE);
|
set_errno(EMSGSIZE);
|
||||||
return -get_errno();
|
return -get_errno();
|
||||||
}
|
}
|
||||||
|
@ -449,7 +449,7 @@ ssize_t SysRecvMsg(int s, struct msghdr *message, int flags)
|
||||||
CHECK_ASPACE(message, sizeof(struct msghdr));
|
CHECK_ASPACE(message, sizeof(struct msghdr));
|
||||||
CPY_FROM_NONCONST_USER(message);
|
CPY_FROM_NONCONST_USER(message);
|
||||||
|
|
||||||
if (message && (size_t)message->msg_iovlen > IOV_MAX) {
|
if (message && message->msg_iovlen > IOV_MAX) {
|
||||||
set_errno(EMSGSIZE);
|
set_errno(EMSGSIZE);
|
||||||
return -get_errno();
|
return -get_errno();
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,8 +45,8 @@ config("liteos_kernel_test_public") {
|
||||||
"$LITEOSTOPDIR/arch/arm/arm/include",
|
"$LITEOSTOPDIR/arch/arm/arm/include",
|
||||||
"$LITEOSTOPDIR/arch/arm/include",
|
"$LITEOSTOPDIR/arch/arm/include",
|
||||||
"$LITEOSTOPDIR/extended/include",
|
"$LITEOSTOPDIR/extended/include",
|
||||||
"$THIRDPARTY_MUSL_DIR/porting/liteos_a/kernel/include",
|
"//third_party/musl/porting/liteos_a/kernel/include",
|
||||||
"$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR/include/",
|
"//third_party/bounds_checking_function/include/",
|
||||||
"$LITEOSTOPDIR/lib/libscrew/include",
|
"$LITEOSTOPDIR/lib/libscrew/include",
|
||||||
"$LITEOSTOPDIR/fs/vfs",
|
"$LITEOSTOPDIR/fs/vfs",
|
||||||
"$LITEOSTOPDIR/fs/proc/include",
|
"$LITEOSTOPDIR/fs/proc/include",
|
||||||
|
|
|
@ -67,8 +67,6 @@ config("public_config_for_pressure") {
|
||||||
group("unittest") {
|
group("unittest") {
|
||||||
deps = []
|
deps = []
|
||||||
if (ohos_build_type == "debug") {
|
if (ohos_build_type == "debug") {
|
||||||
deps += [ "tools:liteos_unittest_run" ]
|
|
||||||
|
|
||||||
# basic test
|
# basic test
|
||||||
if (LOSCFG_USER_TEST_BASIC == true) {
|
if (LOSCFG_USER_TEST_BASIC == true) {
|
||||||
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# 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("//build/lite/config/test.gni")
|
||||||
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
import("./config.gni")
|
import("./config.gni")
|
||||||
|
|
||||||
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
|
@ -38,7 +40,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
sources_full = []
|
sources_full = []
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "..:public_config_for_door" ]
|
configs = [ "..:public_config_for_door" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,6 +53,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
|
||||||
sources += sources_smoke
|
sources += sources_smoke
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "..:public_config_for_all" ]
|
configs = [ "..:public_config_for_all" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,10 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//build/lite/config/test.gni")
|
import("//build/lite/config/test.gni")
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
|
||||||
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
|
|
||||||
common_include_dirs = [
|
common_include_dirs = [
|
||||||
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
|
"//third_party/googletest/googletest/include",
|
||||||
"../common/include",
|
"../common/include",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# 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("//build/lite/config/test.gni")
|
||||||
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
import("./config.gni")
|
import("./config.gni")
|
||||||
|
|
||||||
config("container_config") {
|
config("container_config") {
|
||||||
|
@ -67,7 +69,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
"..:public_config_for_door",
|
"..:public_config_for_door",
|
||||||
":container_config",
|
":container_config",
|
||||||
]
|
]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,6 +85,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
|
||||||
"..:public_config_for_all",
|
"..:public_config_for_all",
|
||||||
":container_config",
|
":container_config",
|
||||||
]
|
]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,12 +26,10 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# 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("//build/lite/config/test.gni")
|
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
|
||||||
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
|
|
||||||
common_include_dirs = [
|
common_include_dirs = [
|
||||||
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
|
"//third_party/googletest/googletest/include",
|
||||||
"../common/include",
|
"../common/include",
|
||||||
"$TEST_UNITTEST_DIR/container",
|
"$TEST_UNITTEST_DIR/container",
|
||||||
]
|
]
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# 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("//build/lite/config/test.gni")
|
||||||
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
import("./config.gni")
|
import("./config.gni")
|
||||||
|
|
||||||
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
|
@ -38,7 +40,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
sources_full = []
|
sources_full = []
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "..:public_config_for_door" ]
|
configs = [ "..:public_config_for_door" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,6 +53,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
|
||||||
sources += sources_smoke
|
sources += sources_smoke
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "..:public_config_for_all" ]
|
configs = [ "..:public_config_for_all" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,10 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//build/lite/config/test.gni")
|
import("//build/lite/config/test.gni")
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
|
||||||
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
|
|
||||||
common_include_dirs = [
|
common_include_dirs = [
|
||||||
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
|
"//third_party/googletest/googletest/include",
|
||||||
"../common/include",
|
"../common/include",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# 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("//build/lite/config/test.gni")
|
||||||
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
import("./config.gni")
|
import("./config.gni")
|
||||||
|
|
||||||
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
|
@ -38,7 +40,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
sources_full = []
|
sources_full = []
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "..:public_config_for_door" ]
|
configs = [ "..:public_config_for_door" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,6 +53,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
|
||||||
sources += sources_smoke
|
sources += sources_smoke
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "..:public_config_for_all" ]
|
configs = [ "..:public_config_for_all" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,10 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//build/lite/config/test.gni")
|
import("//build/lite/config/test.gni")
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
|
||||||
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
|
|
||||||
common_include_dirs = [
|
common_include_dirs = [
|
||||||
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
|
"//third_party/googletest/googletest/include",
|
||||||
"../common/include",
|
"../common/include",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = write(pipeFd[1], "hello world", 12); // 12, "hello world" length and '\0'
|
ret = write(pipeFd[1], "hello world", 12); // 12, "hello world" length and '\0'
|
||||||
printf("write first status: %d\n", ret);
|
printf("write first status: %d\n", ret);
|
||||||
if (ret != 12) { // 12, "hello world" length and '\0'
|
if (ret != 12) { // 12, "hello world" length and '\0'
|
||||||
exit(11); // 11, the value of son process unexpected exit, convenient to debug
|
exit(11); // 11, the value of son process unexpect exit, convenient to debug
|
||||||
}
|
}
|
||||||
*sharedflag = 1;
|
*sharedflag = 1;
|
||||||
close(pipeFd[1]);
|
close(pipeFd[1]);
|
||||||
|
|
|
@ -55,7 +55,7 @@ static UINT32 Testcase(VOID)
|
||||||
ret = write(pipeFd[1], "Hello world", TAR_STR_LEN);
|
ret = write(pipeFd[1], "Hello world", TAR_STR_LEN);
|
||||||
printf("write first status: %d\n", ret);
|
printf("write first status: %d\n", ret);
|
||||||
if (ret != TAR_STR_LEN) {
|
if (ret != TAR_STR_LEN) {
|
||||||
exit(11); // 11, the value of son process unexpected exit, convenient to debug
|
exit(11); // 11, the value of son process unexpect exit, convenient to debug
|
||||||
}
|
}
|
||||||
*sharedflag = 1;
|
*sharedflag = 1;
|
||||||
close(pipeFd[1]);
|
close(pipeFd[1]);
|
||||||
|
|
|
@ -69,7 +69,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
ret = sigaction(SIGCHLD, &oldact, NULL);
|
ret = sigaction(SIGCHLD, &oldact, NULL);
|
||||||
if (ret == -1) {
|
if (ret == -1) {
|
||||||
exit(6); // 6, the value of son process unexpected exit, convenient to debug
|
exit(6); // 6, the value of son process unexpect exit, convenient to debug
|
||||||
}
|
}
|
||||||
sleep(1);
|
sleep(1);
|
||||||
printf("---son--cnt check----%d--------\n", g_actionCnt1);
|
printf("---son--cnt check----%d--------\n", g_actionCnt1);
|
||||||
|
|
|
@ -90,31 +90,31 @@ static int TestCase(void)
|
||||||
printf("errline = %d\n", __LINE__);
|
printf("errline = %d\n", __LINE__);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
ret = kill(10, 31); // 10, kill process pid; 31, signal.
|
ret = kill(10, 31); // 10, kill process pid; 31, sigal.
|
||||||
if (retValue != -1 || errno != EINVAL) {
|
if (retValue != -1 || errno != EINVAL) {
|
||||||
printf("errline = %d\n", __LINE__);
|
printf("errline = %d\n", __LINE__);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
ret = kill(10, 32); // 10, kill process pid; 32, signal.
|
ret = kill(10, 32); // 10, kill process pid; 32, sigal.
|
||||||
if (retValue != -1 || errno != EINVAL) {
|
if (retValue != -1 || errno != EINVAL) {
|
||||||
printf("errline = %d\n", __LINE__);
|
printf("errline = %d\n", __LINE__);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = kill(2, 32); // 2, kill process pid; 32, signal.
|
ret = kill(2, 32); // 2, kill process pid; 32, sigal.
|
||||||
if (retValue != -1 || errno != EINVAL) {
|
if (retValue != -1 || errno != EINVAL) {
|
||||||
printf("errline = %d\n", __LINE__);
|
printf("errline = %d\n", __LINE__);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("test EPERM begin\n");
|
printf("test EPERM begin\n");
|
||||||
ret = kill(2, 5); // 2, kill process pid; 5, signal.
|
ret = kill(2, 5); // 2, kill process pid; 5, sigal.
|
||||||
if (retValue != -1 || errno != EPERM) {
|
if (retValue != -1 || errno != EPERM) {
|
||||||
printf("errline = %d\n", __LINE__);
|
printf("errline = %d\n", __LINE__);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = kill(3, 5); // 3, kill process pid; 5, signal.
|
ret = kill(3, 5); // 3, kill process pid; 5, sigal.
|
||||||
if (retValue != -1 || errno != EPERM) {
|
if (retValue != -1 || errno != EPERM) {
|
||||||
printf("errline = %d\n", __LINE__);
|
printf("errline = %d\n", __LINE__);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
@ -126,7 +126,7 @@ static int TestCase(void)
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = kill(1, 5); // 5, kill signal num .
|
ret = kill(1, 5); // 5, kill sigal num .
|
||||||
if (retValue != -1 || errno != EPERM) {
|
if (retValue != -1 || errno != EPERM) {
|
||||||
printf("errline = %d\n", __LINE__);
|
printf("errline = %d\n", __LINE__);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
|
|
@ -40,7 +40,7 @@ static void SigChildResponse(int signo)
|
||||||
wait(nullptr);
|
wait(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Register SIGCHLD, through signal to restore the child memory */
|
/* Register SIGCHLD, through signal to restore the child memery */
|
||||||
static int TestSigKillResp()
|
static int TestSigKillResp()
|
||||||
{
|
{
|
||||||
void (*ret)(int) = nullptr;
|
void (*ret)(int) = nullptr;
|
||||||
|
|
|
@ -38,7 +38,7 @@ void SigChildResponse(int signo)
|
||||||
wait(nullptr);
|
wait(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Register SIGCHLD, through signal to restore the child memory */
|
/* Register SIGCHLD, through signal to restore the child memery */
|
||||||
static int TestSigKillWaitFromSigChild()
|
static int TestSigKillWaitFromSigChild()
|
||||||
{
|
{
|
||||||
void (*ret)(int);
|
void (*ret)(int);
|
||||||
|
|
|
@ -88,7 +88,7 @@ static int TestBlock()
|
||||||
printf("\n\n");
|
printf("\n\n");
|
||||||
|
|
||||||
printf("Signal Pause(2)\n");
|
printf("Signal Pause(2)\n");
|
||||||
printf("To test whether pause can release the signal\n");
|
printf("To test whether pause can relese the signal\n");
|
||||||
alarm(clock);
|
alarm(clock);
|
||||||
retValue = sighold(sig);
|
retValue = sighold(sig);
|
||||||
if (retValue != 0) {
|
if (retValue != 0) {
|
||||||
|
|
|
@ -67,7 +67,7 @@ static UINT32 TestCase()
|
||||||
sigemptyset(&set);
|
sigemptyset(&set);
|
||||||
sigprocmask(SIG_SETMASK, &set, NULL);
|
sigprocmask(SIG_SETMASK, &set, NULL);
|
||||||
|
|
||||||
printf("check invalid sigset ...\n");
|
printf("check invlid sigset ...\n");
|
||||||
int rt = sigaddset(&set, 0);
|
int rt = sigaddset(&set, 0);
|
||||||
ICUNIT_ASSERT_EQUAL(rt, -1, rt);
|
ICUNIT_ASSERT_EQUAL(rt, -1, rt);
|
||||||
ICUNIT_ASSERT_EQUAL(errno, EINVAL, errno);
|
ICUNIT_ASSERT_EQUAL(errno, EINVAL, errno);
|
||||||
|
@ -79,19 +79,19 @@ static UINT32 TestCase()
|
||||||
|
|
||||||
siginfo_t si;
|
siginfo_t si;
|
||||||
time1.tv_sec = -1;
|
time1.tv_sec = -1;
|
||||||
printf("check invalid timespec: tv_sec=-1 ...\n");
|
printf("check invlid timespec: tv_sec=-1 ...\n");
|
||||||
ret = SigtimedwaitFailTest(&set, &si, &time1, EINVAL);
|
ret = SigtimedwaitFailTest(&set, &si, &time1, EINVAL);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||||
|
|
||||||
time1.tv_sec = 1;
|
time1.tv_sec = 1;
|
||||||
time1.tv_nsec = -1;
|
time1.tv_nsec = -1;
|
||||||
printf("check invalid timespec: tv_nsec=-1 ...\n");
|
printf("check invlid timespec: tv_nsec=-1 ...\n");
|
||||||
ret = SigtimedwaitFailTest(&set, &si, &time1, EINVAL);
|
ret = SigtimedwaitFailTest(&set, &si, &time1, EINVAL);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||||
|
|
||||||
time1.tv_sec = 1;
|
time1.tv_sec = 1;
|
||||||
time1.tv_nsec = 1000 * 1000 * 1000 + 1; // 1000, set the nsec of time.
|
time1.tv_nsec = 1000 * 1000 * 1000 + 1; // 1000, set the nsec of time.
|
||||||
printf("check invalid timespec: tv_nsec overflow ...\n");
|
printf("check invlid timespec: tv_nsec overflow ...\n");
|
||||||
ret = SigtimedwaitFailTest(&set, &si, &time1, EINVAL);
|
ret = SigtimedwaitFailTest(&set, &si, &time1, EINVAL);
|
||||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# 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("//build/lite/config/test.gni")
|
||||||
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
import("./config.gni")
|
import("./config.gni")
|
||||||
|
|
||||||
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
|
@ -41,7 +43,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
sources_pressure = []
|
sources_pressure = []
|
||||||
sources += sources_pressure
|
sources += sources_pressure
|
||||||
configs = [ "..:public_config_for_door" ]
|
configs = [ "..:public_config_for_door" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +58,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
|
||||||
sources_pressure = []
|
sources_pressure = []
|
||||||
sources += sources_pressure
|
sources += sources_pressure
|
||||||
configs = [ "..:public_config_for_all" ]
|
configs = [ "..:public_config_for_all" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,6 +74,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_HIGH) {
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
sources += sources_pressure
|
sources += sources_pressure
|
||||||
configs = [ "..:public_config_for_pressure" ]
|
configs = [ "..:public_config_for_pressure" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,10 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//build/lite/config/test.gni")
|
import("//build/lite/config/test.gni")
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
|
||||||
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
|
|
||||||
common_include_dirs = [
|
common_include_dirs = [
|
||||||
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
|
"//third_party/googletest/googletest/include",
|
||||||
"../common/include",
|
"../common/include",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# 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("//build/lite/config/test.gni")
|
||||||
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
import("./config.gni")
|
import("./config.gni")
|
||||||
|
|
||||||
config("libc_config") {
|
config("libc_config") {
|
||||||
|
@ -47,7 +49,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "../..:public_config_for_door" ]
|
configs = [ "../..:public_config_for_door" ]
|
||||||
configs += [ ":libc_config" ]
|
configs += [ ":libc_config" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,6 +63,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "../..:public_config_for_all" ]
|
configs = [ "../..:public_config_for_all" ]
|
||||||
configs += [ ":libc_config" ]
|
configs += [ ":libc_config" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,10 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//build/lite/config/test.gni")
|
import("//build/lite/config/test.gni")
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
|
||||||
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
|
|
||||||
common_include_dirs = [
|
common_include_dirs = [
|
||||||
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
|
"//third_party/googletest/googletest/include",
|
||||||
"../../common/include",
|
"../../common/include",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# 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("//build/lite/config/test.gni")
|
||||||
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
import("./config.gni")
|
import("./config.gni")
|
||||||
|
|
||||||
config("libc_config") {
|
config("libc_config") {
|
||||||
|
@ -47,7 +49,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "../..:public_config_for_door" ]
|
configs = [ "../..:public_config_for_door" ]
|
||||||
configs += [ ":libc_config" ]
|
configs += [ ":libc_config" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,6 +63,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "../..:public_config_for_all" ]
|
configs = [ "../..:public_config_for_all" ]
|
||||||
configs += [ ":libc_config" ]
|
configs += [ ":libc_config" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,10 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//build/lite/config/test.gni")
|
import("//build/lite/config/test.gni")
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
|
||||||
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
|
|
||||||
common_include_dirs = [
|
common_include_dirs = [
|
||||||
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
|
"//third_party/googletest/googletest/include",
|
||||||
"../../common/include",
|
"../../common/include",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# 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("//build/lite/config/test.gni")
|
||||||
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
import("./config.gni")
|
import("./config.gni")
|
||||||
|
|
||||||
config("libc_config") {
|
config("libc_config") {
|
||||||
|
@ -47,7 +49,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "../..:public_config_for_door" ]
|
configs = [ "../..:public_config_for_door" ]
|
||||||
configs += [ ":libc_config" ]
|
configs += [ ":libc_config" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,6 +63,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "../..:public_config_for_all" ]
|
configs = [ "../..:public_config_for_all" ]
|
||||||
configs += [ ":libc_config" ]
|
configs += [ ":libc_config" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,10 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//build/lite/config/test.gni")
|
import("//build/lite/config/test.gni")
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
|
||||||
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
|
|
||||||
common_include_dirs = [
|
common_include_dirs = [
|
||||||
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
|
"//third_party/googletest/googletest/include",
|
||||||
"../../common/include",
|
"../../common/include",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# 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("//build/lite/config/test.gni")
|
||||||
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
import("./config.gni")
|
import("./config.gni")
|
||||||
|
|
||||||
config("libc_config") {
|
config("libc_config") {
|
||||||
|
@ -47,7 +49,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "../..:public_config_for_door" ]
|
configs = [ "../..:public_config_for_door" ]
|
||||||
configs += [ ":libc_config" ]
|
configs += [ ":libc_config" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,6 +63,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "../..:public_config_for_all" ]
|
configs = [ "../..:public_config_for_all" ]
|
||||||
configs += [ ":libc_config" ]
|
configs += [ ":libc_config" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,10 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//build/lite/config/test.gni")
|
import("//build/lite/config/test.gni")
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
|
||||||
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
|
|
||||||
common_include_dirs = [
|
common_include_dirs = [
|
||||||
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
|
"//third_party/googletest/googletest/include",
|
||||||
"../../common/include",
|
"../../common/include",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# 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("//build/lite/config/test.gni")
|
||||||
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
import("./config.gni")
|
import("./config.gni")
|
||||||
|
|
||||||
config("libc_config") {
|
config("libc_config") {
|
||||||
|
@ -47,7 +49,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "../..:public_config_for_door" ]
|
configs = [ "../..:public_config_for_door" ]
|
||||||
configs += [ ":libc_config" ]
|
configs += [ ":libc_config" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,6 +63,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "../..:public_config_for_all" ]
|
configs = [ "../..:public_config_for_all" ]
|
||||||
configs += [ ":libc_config" ]
|
configs += [ ":libc_config" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,10 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//build/lite/config/test.gni")
|
import("//build/lite/config/test.gni")
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
|
||||||
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
|
|
||||||
common_include_dirs = [
|
common_include_dirs = [
|
||||||
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
|
"//third_party/googletest/googletest/include",
|
||||||
"../../common/include",
|
"../../common/include",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,26 @@ HWTEST_F(TimeTimerTest, TimerTest001, TestSize.Level0)
|
||||||
TimerTest001();
|
TimerTest001();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* *
|
||||||
|
* @tc.name: TimerTest002
|
||||||
|
* @tc.desc: function for TimeTimerTest
|
||||||
|
* @tc.type: FUNC
|
||||||
|
*/
|
||||||
|
HWTEST_F(TimeTimerTest, TimerTest002, TestSize.Level0)
|
||||||
|
{
|
||||||
|
TimerTest002();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* *
|
||||||
|
* @tc.name: TimerTest003
|
||||||
|
* @tc.desc: function for TimeTimerTest
|
||||||
|
* @tc.type: FUNC
|
||||||
|
*/
|
||||||
|
HWTEST_F(TimeTimerTest, TimerTest003, TestSize.Level0)
|
||||||
|
{
|
||||||
|
TimerTest003();
|
||||||
|
}
|
||||||
|
|
||||||
/* *
|
/* *
|
||||||
* @tc.name: TimerTest005
|
* @tc.name: TimerTest005
|
||||||
* @tc.desc: function for timer_create SIGEV_THREAD.
|
* @tc.desc: function for timer_create SIGEV_THREAD.
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# 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("//build/lite/config/test.gni")
|
||||||
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
import("./config.gni")
|
import("./config.gni")
|
||||||
|
|
||||||
config("libc_config") {
|
config("libc_config") {
|
||||||
|
@ -47,7 +49,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "../..:public_config_for_door" ]
|
configs = [ "../..:public_config_for_door" ]
|
||||||
configs += [ ":libc_config" ]
|
configs += [ ":libc_config" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,6 +63,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "../..:public_config_for_all" ]
|
configs = [ "../..:public_config_for_all" ]
|
||||||
configs += [ ":libc_config" ]
|
configs += [ ":libc_config" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,10 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//build/lite/config/test.gni")
|
import("//build/lite/config/test.gni")
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
|
||||||
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
|
|
||||||
common_include_dirs = [
|
common_include_dirs = [
|
||||||
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
|
"//third_party/googletest/googletest/include",
|
||||||
"../../common/include",
|
"../../common/include",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# 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("//build/lite/config/test.gni")
|
||||||
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
import("./config.gni")
|
import("./config.gni")
|
||||||
|
|
||||||
config("net_config") {
|
config("net_config") {
|
||||||
|
@ -53,7 +55,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "..:public_config_for_door" ]
|
configs = [ "..:public_config_for_door" ]
|
||||||
configs += [ ":net_config" ]
|
configs += [ ":net_config" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,6 +69,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "..:public_config_for_all" ]
|
configs = [ "..:public_config_for_all" ]
|
||||||
configs += [ ":net_config" ]
|
configs += [ ":net_config" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,10 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//build/lite/config/test.gni")
|
import("//build/lite/config/test.gni")
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
|
||||||
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
|
|
||||||
common_include_dirs = [
|
common_include_dirs = [
|
||||||
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
|
"//third_party/googletest/googletest/include",
|
||||||
"../common/include",
|
"../common/include",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# 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("//build/lite/config/test.gni")
|
||||||
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
import("./config.gni")
|
import("./config.gni")
|
||||||
|
|
||||||
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
|
@ -38,7 +40,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
sources_full = []
|
sources_full = []
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "../../..:public_config_for_door" ]
|
configs = [ "../../..:public_config_for_door" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,6 +53,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
|
||||||
sources += sources_smoke
|
sources += sources_smoke
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "../../..:public_config_for_all" ]
|
configs = [ "../../..:public_config_for_all" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,10 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//build/lite/config/test.gni")
|
import("//build/lite/config/test.gni")
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
|
||||||
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
|
|
||||||
common_include_dirs = [
|
common_include_dirs = [
|
||||||
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
|
"//third_party/googletest/googletest/include",
|
||||||
"../../../common/include",
|
"../../../common/include",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# 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("//build/lite/config/test.gni")
|
||||||
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
import("./config.gni")
|
import("./config.gni")
|
||||||
|
|
||||||
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
|
@ -38,7 +40,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
sources_full = []
|
sources_full = []
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "../../..:public_config_for_door" ]
|
configs = [ "../../..:public_config_for_door" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,6 +53,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
|
||||||
sources += sources_smoke
|
sources += sources_smoke
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "../../..:public_config_for_all" ]
|
configs = [ "../../..:public_config_for_all" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,10 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import("//build/lite/config/test.gni")
|
import("//build/lite/config/test.gni")
|
||||||
import("//kernel/liteos_a/liteos.gni")
|
|
||||||
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
|
|
||||||
common_include_dirs = [
|
common_include_dirs = [
|
||||||
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
|
"//third_party/googletest/googletest/include",
|
||||||
"../../../common/include",
|
"../../../common/include",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ void child1(void)
|
||||||
while (1) {
|
while (1) {
|
||||||
ret = pthread_getschedparam(pthread, &newPolicy, ¶m);
|
ret = pthread_getschedparam(pthread, &newPolicy, ¶m);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
printf("pthread_getschedparam failed ! %d error: %d\n", __LINE__, errno);
|
printf("pthread_getschedparam failed ! %d erro: %d\n", __LINE__, errno);
|
||||||
exit(255); // 255, set a special exit code.
|
exit(255); // 255, set a special exit code.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
# 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("//build/lite/config/test.gni")
|
||||||
|
import("//kernel/liteos_a/testsuites/unittest/config.gni")
|
||||||
import("./config.gni")
|
import("./config.gni")
|
||||||
|
|
||||||
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
|
@ -38,7 +40,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
|
||||||
sources_full = []
|
sources_full = []
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "../..:public_config_for_door" ]
|
configs = [ "../..:public_config_for_door" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,6 +53,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
|
||||||
sources += sources_smoke
|
sources += sources_smoke
|
||||||
sources += sources_full
|
sources += sources_full
|
||||||
configs = [ "../..:public_config_for_all" ]
|
configs = [ "../..:public_config_for_all" ]
|
||||||
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
|
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue