提交 34f35524 编写于 作者: O openharmony_ci 提交者: Gitee

!184 add testsuites

Merge pull request !184 from lnlan/master

要显示的变更太多。

To preserve performance only 1000 of 1000+ files are displayed.
# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020-2021 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.
#
# For a description of the syntax of this configuration file,
# see extra/config/Kconfig-language.txt
#
mainmenu "Huawei LiteOS Configuration"
menu "Enable Kernel TestSuit"
config KERNEL_TEST
bool "Enable Kernel Testsuit"
config TEST
bool "Enable Auto TestSuit"
default y
depends on KERNEL_TEST
source "./kernel/Kconfig"
source "./kernel/Kconfig_case"
endmenu
Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
Copyright (c) 2020-2021 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.
# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020-2021 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.
LITEOSTESTTOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
export OS=$(shell uname -s)
ifneq ($(OS), Linux)
LITEOSTESTTOPDIR := $(shell dirname $(subst \,/,$(LITEOSTESTTOPDIR))/./)
endif
LITEOSTOPDIR := $(LITEOSTESTTOPDIR)/..
export LITEOSTOPDIR
export LITEOSTESTTOPDIR
-include $(LITEOSTESTTOPDIR)/config.mk
RM = -rm -rf
MAKE = make
__LIBS = libs
APPS = apps
KERNEL = kernel
TEST = test
TEST_KERNEL = test_kernel
TEST_APPS = test_apps
ROOTFSDIR = rootfsdir
ROOTFS = rootfs
HIDE := @
LITEOS_TEST_TARGET = liteos_ktest
LITEOS_TEST_LIBC = test_libs
LITEOS_LIBS_TARGET = libs_target
LITEOS_TEST_AUTOCONFIG_H = $(LITEOSTESTTOPDIR)/include/generated/autoconf.h
LITEOS_TEST_KERNEL_MENUCONFIG_H = $(LITEOSTESTTOPDIR)/kernel/include
#######LITEOS_TEST_USER_MENUCONFIG_H = $(LITEOSTESTTOPDIR)/apps/include
ifeq ($(LOSCFG_KERNEL_TEST), y)
LITEOS_TEST_MENUCONFIG_H = $(LITEOS_TEST_KERNEL_MENUCONFIG_H)/test_menuconfig.h
#######else
#######LITEOS_TEST_MENUCONFIG_H = $(LITEOS_TEST_USER_MENUCONFIG_H)/test_menuconfig.h
endif
ifeq ($(LOSCFG_STORAGE_SPINOR), y)
FSTYPE = jffs2
endif
ifeq ($(LOSCFG_STORAGE_EMMC), y)
FSTYPE = vfat
endif
ROOTFS_DIR = $(OUT)/rootfs
ROOTFS_ZIP = $(OUT)/rootfs.zip
VERSION =
LITEOS_LIBDEP := $(LITEOS_BASELIB)
$(TEST_KERNEL): $(LITEOS_TEST_TARGET)
$(LITEOS_TEST_TARGET): $(LITEOS_TEST_LIBC)
$(LD) $(LITEOS_LDFLAGS) $(LITEOS_TABLES_LDFLAGS) $(LITEOS_DYNLDFLAGS) -Map=$(OUT)/$@.map -o $(OUT)/$@ --start-group $(LITEOS_LIBDEP) --end-group
$(OBJCOPY) -O binary $(OUT)/$@ $(LITEOS_TARGET_DIR)/$@.bin
$(OBJDUMP) -t $(OUT)/$@ |sort >$(OUT)/$@.sym.sorted
$(OBJDUMP) -d $(OUT)/$@ >$(OUT)/$@.asm
$(LITEOS_TEST_LIBC): $(KERNEL)
$(HIDE)for dir in $(TESTLIB_SUBDIRS); \
do $(MAKE) -C $$dir all || exit 1; \
done
$(HIDE)echo "=============== make lib done ==============="
$(KERNEL): $(LITEOS_TEST_AUTOCONFIG_H)
$(HIDE)$(MAKE) -C ../ lib || exit 1
#echo "LITEOS_CFLAGS : $(LITEOS_CFLAGS)"
##### make test menuconfig #####
export CONFIG_=LOSCFG_
MENUCONFIG_PATH = $(LITEOSTOPDIR)/tools/menuconfig
TEST_KCONFIG_FILE_PATH = $(LITEOSTESTTOPDIR)/Kconfig
menuconfig:$(MENUCONFIG_PATH)/mconf
$< $(TEST_KCONFIG_FILE_PATH)
genconfig:$(MENUCONFIG_PATH)/conf
$(HIDE)mkdir -p include/config include/generated
$< --silentoldconfig $(TEST_KCONFIG_FILE_PATH)
mv -f $(LITEOS_TEST_AUTOCONFIG_H) $(LITEOS_TEST_MENUCONFIG_H)
##### menuconfig end #######
genconfig:$(MENUCONFIG_PATH)/conf
$(LITEOS_TEST_AUTOCONFIG_H):
ifneq ($(LITEOS_TEST_MENUCONFIG_H), $(wildcard $(LITEOS_TEST_MENUCONFIG_H)))
$(HIDE)$(MAKE) genconfig
endif
clean:
$(HIDE)$(MAKE) -C ../ clean || exit 1
$(HIDE)for dir in $(TESTLIB_SUBDIRS); \
do $(MAKE) -C $$dir clean || exit 1; \
done
$(HIDE)$(RM) include
$(HIDE)$(RM) $(LITEOS_TEST_MENUCONFIG_H)
$(HIDE)$(RM) $(OUT)
.PHONY: test_apps test_kernel clean
# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020-2021 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.
TESTLIB_SUBDIRS :=
-include $(LITEOSTESTTOPDIR)/.config
ifeq ($(LOSCFG_KERNEL_TEST), y)
-include $(LITEOSTESTTOPDIR)/kernel/test.mk
endif
ifeq ($(LOSCFG_LLTREPORT) ,y)
# -fprofile-arcs may introduce false alarm on 'maybe-uninitialized'
LITEOS_GCOV_OPTS := -fprofile-arcs -ftest-coverage -Wno-maybe-uninitialized
LITEOS_BASELIB += -lgcov
endif
# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020-2021 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)/tools/build/config.mk
-include $(LITEOSTESTTOPDIR)/build/los_test_config.mk
LITEOS_CFLAGS += -I $(LITEOSTOPDIR)/lib/libc/musl/include \
-I $(LITEOSTOPDIR)/lib/libc/musl/obj/include \
-I $(LITEOSTOPDIR)/lib/libc/musl/arch/arm \
-I $(LITEOSTOPDIR)/lib/libc/musl/arch/generic \
-I $(LITEOSTHIRDPARTY)/bounds_checking_function/include \
-I $(LITEOSTOPDIR)/security/cap/ \
-I $(LITEOSTOPDIR)/security/vid/ \
-I $(LITEOSTOPDIR)/platform/include \
-I $(LITEOSTOPDIR)/kernel/base/include\
-I $(LITEOSTOPDIR)/kernel/include \
-I $(LITEOSTOPDIR)/kernel/extended/include \
-I $(LITEOSTOPDIR)/fs/vfs \
-I $(LITEOSTHIRDPARTY)/FatFs/source \
-I $(LITEOSTOPDIR)/fs/proc/include \
-I $(LITEOSTOPDIR)/fs/jffs2/os_adapt \
-I $(LITEOSTHIRDPARTY)/NuttX/fs/nfs/ \
-I $(LITEOSTOPDIR)/bsd/compat/linuxkpi/include
# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020-2021 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("//build/lite/config/component/lite_component.gni")
static_library("test_base") {
sources = [
"src/ChipTest.c",
"src/iCunit.c",
"src/osTest.c",
"src/testrun_shellcmd.c",
"src/testusb_shellcmd.c",
]
include_dirs = [
"../kernel/base/includ",
"../kernel/include",
"../kernel/extended/include",
"include",
"../fs/vfs",
"../fs/proc/include",
"../fs/jffs2/include",
"../fs/nfs/include",
"../bsd/compat/linuxkpi/include",
]
}
lite_component("test") {
features = [ ":test_base" ]
# KERNEL BASE TEST
if (LOSCFG_TEST_KERNEL_BASE_IPC) {
features += [ "sample/kernel_base/ipc:test_ipc" ]
}
if (LOSCFG_TEST_KERNEL_BASE_CORE) {
features += [ "sample/kernel_base/core:test_core" ]
}
if (LOSCFG_TEST_KERNEL_BASE_MP) {
features += [ "sample/kernel_base/mp:test_mp" ]
}
if (LOSCFG_TEST_KERNEL_BASE_MEM) {
features += [ "sample/kernel_base/mem:test_mem" ]
}
if (LOSCFG_TEST_KERNEL_BASE_MISC) {
features += [ "sample/kernel_base/misc:test_misc" ]
}
if (LOSCFG_TEST_KERNEL_BASE_OM) {
features += [ "sample/kernel_base/om:test_om" ]
}
if (LOSCFG_TEST_KERNEL_BASE_ATOMIC) {
features += [ "sample/kernel_base/atomic:test_atomic" ]
}
# KERNEL EXTEND TEST
if (LOSCFG_TEST_KERNEL_EXTEND_CPP) {
features += [ "sample/kernel_extend/cpp:test_cpp" ]
}
if (LOSCFG_TEST_KERNEL_EXTEND_CPUP) {
features += [ "sample/kernel_extend/cpup:test_cpup" ]
}
if (LOSCFG_TEST_KERNEL_EXTEND_MMU) {
features += [ "sample/kernel_extend/mmu:test_mmu" ]
}
# COMPAT TEST
if (LOSCFG_TEST_POSIX) {
features += [
"sample/posix:test_posix",
# "sample/posix/smp:test_posix_smp",
]
}
# if (LOSCFG_TEST_POSIX_MEM) {
# features += [ "sample/posix/mem:test_posix_mem" ]
# }
# if (LOSCFG_TEST_POSIX_MQUEUE) {
# features += [ "sample/posix/mqueue:test_posix_mqueue" ]
# }
# if (LOSCFG_TEST_POSIX_MUTEX) {
# features += [ "sample/posix/mutex:test_posix_mutex" ]
# }
# if (LOSCFG_TEST_POSIX_PTHREAD) {
# features += [ "sample/posix/pthread:test_posix_pthread" ]
# }
# if (LOSCFG_TEST_POSIX_SCHED) {
# features += [ "sample/posix/sched:test_posix_sched" ]
# }
# if (LOSCFG_TEST_POSIX_SEM) {
# features += [ "sample/posix/sem:test_posix_sem" ]
# }
# if (LOSCFG_TEST_POSIX_SWTMR) {
# features += [ "sample/posix/swtmr:test_posix_swtmr" ]
# }
if (LOSCFG_TEST_LINUX) {
features += [ "sample/linux:test_linux" ]
}
#if (LOSCFG_TEST_LINUX_HRTIMER) {
# features += [ "sample/linux/hrtimer:test_linux_hrtimer" ]
#}
# LIBC TEST
if (LOSCFG_TEST_LIBC) {
features += [ "sample/libc:test_libc" ]
}
# LIBM TEST
if (LOSCFG_TEST_LIBM) {
features += [ "sample/libm:test_libm" ]
}
# SHELL TEST
if (LOSCFG_TEST_SHELL) {
features += [ "sample/shell:test_shell" ]
}
}
# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020-2021 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.
config TEST_LEVEL
bool "Enable Test Level"
default y
depends on TEST
config TEST_SMOKE
bool "Enable Test smoke"
default y
depends on TEST && TEST_LEVEL
config TEST_FULL
bool "Enable Test full"
default y
depends on TEST && TEST_LEVEL
config TEST_PRESSURE
bool "Enable Test Pressure"
default n
depends on TEST && TEST_LEVEL
config TEST_LLT
bool "Enable Test LLT"
default n
depends on TEST && TEST_LEVEL
config TEST_MUTIL
bool "Enable Multi Testsuit"
default n
depends on KERNEL_TEST && TEST
config TEST_KERNEL_BASE
bool "Enable Kernel Testsuit"
default y
depends on KERNEL_TEST && TEST
config TEST_KERNEL_BASE_IPC
bool "Enable IPC Testsuit"
default y
depends on KERNEL_TEST && TEST_KERNEL_BASE && TEST
config TEST_KERNEL_BASE_CORE
bool "Enable CORE Testsuit"
default y
depends on KERNEL_TEST && TEST_KERNEL_BASE && TEST
config TEST_KERNEL_BASE_MP
bool "Enable MP Testsuit"
default n
depends on KERNEL_TEST && TEST_KERNEL_BASE && TEST && KERNEL_SMP
config TEST_KERNEL_BASE_MEM
bool "Enable MEM Testsuit"
default n
depends on KERNEL_TEST && TEST_KERNEL_BASE && TEST
config TEST_KERNEL_BASE_VM
bool "Enable VM Testsuit"
default n
depends on KERNEL_TEST && TEST_KERNEL_BASE && TEST
config TEST_KERNEL_BASE_MISC
bool "Enable MISC Testsuit"
default n
depends on KERNEL_TEST && TEST_KERNEL_BASE && TEST
config TEST_KERNEL_BASE_OM
bool "Enable OM Testsuit"
default n
depends on KERNEL_TEST && TEST_KERNEL_BASE && TEST
config TEST_KERNEL_BASE_ATOMIC
bool "Enable ATOMIC Testsuit"
default n
depends on KERNEL_TEST && TEST_KERNEL_BASE && TEST
config TEST_KERNEL_EXTEND
bool "Enable Extended Kernel Testsuit"
default y
depends on KERNEL_TEST && TEST
config TEST_KERNEL_EXTEND_CPP
bool "Enable CPP Testsuit"
default n
depends on KERNEL_TEST && TEST_KERNEL_EXTEND && TEST
config TEST_KERNEL_EXTEND_CPUP
bool "Enable CPUP Testsuit"
default y
depends on KERNEL_TEST && TEST_KERNEL_EXTEND && TEST
config TEST_KERNEL_EXTEND_EXC
bool "Enable EXC Testsuit"
default n
depends on KERNEL_TEST && TEST_KERNEL_EXTEND && TEST
config TEST_KERNEL_EXTEND_UNALIGNACCESS
bool "Enable UNALIGNACCESS Testsuit"
default n
depends on KERNEL_TEST && DO_ALIGN && TEST_KERNEL_EXTEND && TEST
config TEST_KERNEL_EXTEND_MMU
bool "Enable MMU Testsuit"
default n
depends on KERNEL_TEST && TEST_KERNEL_EXTEND && TEST
config TEST_KERNEL_EXTEND_DYNLOAD
bool "Enable DYNLOAD Testsuit"
default n
depends on KERNEL_TEST && TEST_KERNEL_EXTEND && TEST
config TEST_KERNEL_EXTEND_MPU
bool "Enable MPU Testsuit"
default n
depends on KERNEL_TEST && TEST_KERNEL_EXTEND && TEST
config TEST_KERNEL_EXTEND_RUNSTOP
bool "Enable RUNSTOP Testsuit"
default n
depends on KERNEL_TEST && TEST_KERNEL_EXTEND && KERNEL_RUNSTOP && TEST
config TEST_KERNEL_EXTEND_SCATTER
bool "Enable SCATTER Testsuit"
default n
depends on KERNEL_TEST && TEST_KERNEL_EXTEND && KERNEL_SCATTER && TEST
config TEST_KERNEL_EXTEND_TICKLESS
bool "Enable TICKLESS Testsuit"
default n
depends on KERNEL_TEST && TEST_KERNEL_EXTEND && TEST
config TEST_KERNEL_EXTEND_TRACE
bool "Enable TRACE Testsuit"
default n
depends on KERNEL_TEST && TEST_KERNEL_EXTEND && TEST
config TEST_POSIX
bool "Enable Posix Testsuit"
default y
depends on KERNEL_TEST && TEST
config TEST_POSIX_MEM
bool "Enable Mem Testsuit"
default n
depends on KERNEL_TEST && TEST_POSIX && TEST
config TEST_POSIX_MQUEUE
bool "Enable Mqueue Testsuit"
default n
depends on KERNEL_TEST && TEST_POSIX && TEST
config TEST_POSIX_MUTEX
bool "Enable Mutex Testsuit"
default y
depends on KERNEL_TEST && TEST_POSIX && TEST
config TEST_POSIX_PTHREAD
bool "Enable Pthread Testsuit"
default y
depends on KERNEL_TEST && TEST_POSIX && TEST
config TEST_POSIX_SCHED
bool "Enable Sched Testsuit"
default n
depends on KERNEL_TEST && TEST_POSIX && TEST
config TEST_POSIX_SEM
bool "Enable Sem Testsuit"
default n
depends on KERNEL_TEST && TEST_POSIX && TEST
config TEST_POSIX_SWTMR
bool "Enable Swtmr Testsuit"
default n
depends on KERNEL_TEST && TEST_POSIX && TEST
config TEST_LINUX
bool "Enable Linux Testsuit"
default n
depends on KERNEL_TEST && TEST
config TEST_LINUX_HRTIMER
bool "Enable Hrtimer Testsuit"
default n
depends on KERNEL_TEST && TEST_LINUX && TEST
config TEST_FS
bool "Enable FS Testsuit"
default n
depends on KERNEL_TEST && TEST
config TEST_FS_VFS
bool "Enable VFS Test"
default n
depends on KERNEL_TEST && TEST_FS && TEST
config TEST_FS_JFFS
bool "Enable JFFS Test"
default n
depends on KERNEL_TEST && TEST_FS && TEST
config TEST_FS_RAMFS
bool "Enable RAMFS Test"
default n
depends on KERNEL_TEST && TEST_FS && TEST
config TEST_FS_FAT
bool "Enable FAT Test"
default n
depends on KERNEL_TEST && TEST_FS && TEST
config TEST_FS_FAT_FAT32
bool "Enable FAT32 Test"
default n
depends on KERNEL_TEST && TEST_FS_FAT && TEST
config TEST_FAT32_FSCK
bool "Enable FAT32 Fsck Test"
default n
depends on KERNEL_TEST && TEST_FS_FAT && TEST
config TEST_FS_VIRPART
bool "Enable FAT virtual partition test"
default n
depends on KERNEL_TEST && FS_FAT_VIRTUAL_PARTITION && TEST_FS && TEST
config TEST_FS_PROC
bool "Enable PROC Test"
default n
depends on KERNEL_TEST && TEST_FS && TEST
config TEST_FS_NFS
bool "Enable NFS Test"
default n
depends on KERNEL_TEST && TEST_FS && TEST
config TEST_MTD
bool "Enable MTD Testsuit"
default n
depends on KERNEL_TEST && TEST
config TEST_MTD_JFFS
bool "Enable JFFS MTD Testsuit"
default n
depends on KERNEL_TEST && TEST_MTD && TEST
config TEST_MTD_FAT
bool "Enable FAT MTD Testsuit"
default n
depends on KERNEL_TEST && TEST_MTD && !FS_FAT_VIRTUAL_PARTITION && TEST
config TEST_MTD_DISK
bool "Enable FAT MTD DISK Test"
default n
depends on KERNEL_TEST && TEST_MTD && !FS_FAT_VIRTUAL_PARTITION && TEST
config TEST_MTD_FAT_VIRPART
bool "Enable FAT virtual partition MTD test"
default n
depends on KERNEL_TEST && TEST_MTD && FS_FAT_VIRTUAL_PARTITION && TEST
config TEST_DRIVERBASE
bool "Enable DriverBase Testsuit"
default n
depends on KERNEL_TEST && TEST
config TEST_LIBC
bool "Enable LIBC Testsuit"
default n
depends on KERNEL_TEST && TEST
config TEST_LIBM
bool "Enable LIBM Testsuit"
default n
depends on KERNEL_TEST && TEST
config TEST_SHELL
bool "Enable Shell Testsuit"
default n
depends on KERNEL_TEST && TEST
config TEST_USB
bool "Enable Usb Manual Testsuit"
default n
depends on KERNEL_TEST && TEST && DRIVERS_USB
help
config TEST_HOST_MASS_DEVICE
bool "Enable Host Mass Testsuit"
default n
depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_MASS_STORAGE && TEST
config TEST_HOST_UVC
bool "Enable Host UVC Testsuit"
default n
depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_HOST_UVC && TEST
config TEST_DEVICE_MASS_GADGET
bool "Enable Device Mass Testsuit"
default n
depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_MASS_STORAGE_GADGET && TEST
config TEST_UVC_GADGET
bool "Enable UVC Gadget Testsuit"
default n
depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_UVC_GADGET && TEST
config TEST_UAC_GADGET
bool "Enable UAC Gadget Testsuit"
default n
depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_UAC_GADGET && TEST
config TEST_CAMERA_GADGET
bool "Enable Camera Gadget Testsuit"
default n
depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_CAMERA_GADGET && TEST
config TEST_HUB_GADGET
bool "Enable HUB Gadget Testsuit"
default n
depends on KERNEL_TEST && TEST_USB && TEST
config TEST_SERIAL_GADGET
bool "Enable Serial Gadget Testsuit"
default n
depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_SERIAL_GADGET && TEST
config TEST_HID_GADGET
bool "Enable HID Gadget Testsuit"
default n
depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_HID_GADGET && TEST
config TEST_ETHERNET_GADGET
bool "Enable Ethernet Gadget Testsuit"
default n
depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_ETHERNET_GADGET && TEST
config TEST_MULTI_GADGET
bool "Enable Ethernet & Serial Gadget Testsuit"
default n
depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_ETH_SER_GADGET && TEST
config TEST_DFU_GADGET
bool "Enable Drivers DFU Testsuit"
default n
depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_DFU_GADGET && TEST
config TEST_MUTILDEVICE_GADGET
bool "Enable Drivers Multidevices Testsuit"
default n
depends on KERNEL_TEST && TEST_USB && TEST
config TEST_SMP_USB
bool "Enable Usb SMP Testsuit"
default n
depends on KERNEL_TEST && TEST_USB && TEST && KERNEL_SMP
config TEST_HOST_ETH
bool "Enable Host Eth Testsuit"
default n
depends on KERNEL_TEST && TEST_USB && TEST
config TEST_AUTO_USB
bool "Enable Usb Auto Testsuit"
default n
depends on KERNEL_TEST && TEST && DRIVERS_USB
config TEST_MMC
bool "Enable MMC Testsuit"
default n
depends on KERNEL_TEST && DRIVERS_MMC && TEST
config TEST_SD
bool "Enable SD Testsuit"
default n
depends on KERNEL_TEST && DRIVERS_MMC && TEST_MMC && TEST
config TEST_SDIO
bool "Enable SDIO Testsuit"
default n
depends on KERNEL_TEST && DRIVERS_MMC && TEST_MMC && TEST
comment "Only one platform can be selected"
depends on KERNEL_TEST && DRIVERS_MMC && TEST_MMC && TEST && TEST_SDIO
config TEST_SDIO_1131S
depends on KERNEL_TEST && DRIVERS_MMC && TEST_MMC && TEST && TEST_SDIO
bool "1131s"
config TEST_SDIO_RTL8189
depends on KERNEL_TEST && DRIVERS_MMC && TEST_MMC && TEST && TEST_SDIO
bool "RTL8189"
config TEST_PERFORMANCE
bool "Enable Performance Testsuit"
default n
depends on KERNEL_TEST && TEST
config TEST_PERFORMANCE_CORE
bool "Enable Performance CORE Testsuit"
default n
depends on KERNEL_TEST && TEST_PERFORMANCE && TEST
config TEST_PERFORMANCE_MEM
bool "Enable Performance MEM Testsuit"
default n
depends on KERNEL_TEST && TEST_PERFORMANCE && TEST
config TEST_PERFORMANCE_FS
bool "Enable Performance FS Testsuit"
default n
depends on KERNEL_TEST && TEST_PERFORMANCE && TEST
config TEST_PERFORMANCE_USB
bool "Enable Performance USB Testsuit"
default n
depends on KERNEL_TEST && TEST_PERFORMANCE && TEST
config TEST_PERFORMANCE_NET
bool "Enable Performance NET Testsuit"
default n
depends on KERNEL_TEST && TEST_PERFORMANCE && TEST
config TEST_NET
bool "Enable NET Test"
default n
depends on KERNEL_TEST && TEST
help
Attention: if this option turns on, other test suits will be ignored.
config TEST_LWIP
bool "Enable LWIP Testsuit"
default n
depends on KERNEL_TEST && TEST_NET && TEST
config AR6K3_WIFI_TEST
bool "Enable AR6K3_WIFI Test"
default n
depends on KERNEL_TEST && TEST && DRIVERS_WIFI_QRD
help
Attention: if this option turns on, other test suits will be ignored.
config BCM_WIFI_TEST
bool "Enable BCM_WIFI Test"
default n
depends on KERNEL_TEST && TEST && DRIVERS_WIFI_BCM
help
Attention: if this option turns on, other test suits will be ignored.
config TEST_PLATFORM
bool "Enable Platform Testsuit"
default n
depends on KERNEL_TEST && TEST
config 3RDPARTY_TEST
bool "Enable 3rdParty Test"
default n
depends on KERNEL_TEST && TEST && 3RDPARTY
help
Attention: 3rdParty tools and libs test
# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020-2021 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.
config LOSCFG_TEST_LEVEL
int "Test Level"
default 2
depends on LOSCFG_TESTSUIT_SHELL
help
Attention:
0:smoke test
1:llt test
2:full test
3:presssure test
config LOSCFG_TEST_KERNEL_BASE
bool "Enable Kernel Testsuit"
default n
depends on LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_KERNEL_BASE_IPC
bool "Enable IPC Testsuit"
default n
depends on LOSCFG_TEST_KERNEL_BASE && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_KERNEL_BASE_CORE
bool "Enable CORE Testsuit"
default n
depends on LOSCFG_TEST_KERNEL_BASE && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_KERNEL_BASE_MEM
bool "Enable MEM Testsuit"
default n
depends on LOSCFG_TEST_KERNEL_BASE && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_KERNEL_BASE_VM
bool "Enable VM Testsuit"
default n
depends on LOSCFG_TEST_KERNEL_BASE && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_KERNEL_BASE_MISC
bool "Enable MISC Testsuit"
default n
depends on LOSCFG_TEST_KERNEL_BASE && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_KERNEL_BASE_OM
bool "Enable OM Testsuit"
default n
depends on LOSCFG_TEST_KERNEL_BASE && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_KERNEL_BASE_ATOMIC
bool "Enable ATOMIC Testsuit"
default n
depends on LOSCFG_TEST_KERNEL_BASE && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_KERNEL_EXTEND
bool "Enable Extended Kernel Testsuit"
default n
depends on LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_KERNEL_EXTEND_CPP
bool "Enable CPP Testsuit"
default n
depends on LOSCFG_TEST_KERNEL_EXTEND && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_KERNEL_EXTEND_CPUP
bool "Enable CPUP Testsuit"
default n
depends on LOSCFG_TEST_KERNEL_EXTEND && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_KERNEL_EXTEND_EXC
bool "Enable EXC Testsuit"
default n
depends on LOSCFG_TEST_KERNEL_EXTEND && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_KERNEL_EXTEND_UNALIGNACCESS
bool "Enable UNALIGNACCESS Testsuit"
default n
depends on LOSCFG_DO_ALIGN && LOSCFG_TEST_KERNEL_EXTEND && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_KERNEL_EXTEND_MMU
bool "Enable MMU Testsuit"
default n
depends on LOSCFG_TEST_KERNEL_EXTEND && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_KERNEL_EXTEND_DYNLOAD
bool "Enable DYNLOAD Testsuit"
default n
depends on LOSCFG_TEST_KERNEL_EXTEND && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_KERNEL_EXTEND_MPU
bool "Enable MPU Testsuit"
default n
depends on LOSCFG_TEST_KERNEL_EXTEND && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_KERNEL_EXTEND_TICKLESS
bool "Enable TICKLESS Testsuit"
default n
depends on LOSCFG_TEST_KERNEL_EXTEND && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_KERNEL_EXTEND_TRACE
bool "Enable TRACE Testsuit"
default n
depends on LOSCFG_TEST_KERNEL_EXTEND && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_POSIX
bool "Enable Posix Testsuit"
default n
depends on LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_POSIX_MEM
bool "Enable Mem Testsuit"
default n
depends on LOSCFG_TEST_POSIX && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_POSIX_MQUEUE
bool "Enable Mqueue Testsuit"
default n
depends on LOSCFG_TEST_POSIX && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_POSIX_MUTEX
bool "Enable Mutex Testsuit"
default n
depends on LOSCFG_TEST_POSIX && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_POSIX_PTHREAD
bool "Enable Pthread Testsuit"
default n
depends on LOSCFG_TEST_POSIX && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_POSIX_SCHED
bool "Enable Sched Testsuit"
default n
depends on LOSCFG_TEST_POSIX && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_POSIX_SEM
bool "Enable Sem Testsuit"
default n
depends on LOSCFG_TEST_POSIX && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_POSIX_SWTMR
bool "Enable Swtmr Testsuit"
default n
depends on LOSCFG_TEST_POSIX && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_LINUX
bool "Enable Linux Testsuit"
default n
depends on LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_LINUX_HRTIMER
bool "Enable Hrtimer Testsuit"
default n
depends on LOSCFG_TEST_LINUX && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_FS
bool "Enable FS Testsuit"
default n
depends on LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_FS_VFS
bool "Enable VFS Test"
default n
depends on LOSCFG_TEST_FS && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_FS_JFFS
bool "Enable JFFS Test"
default n
depends on LOSCFG_TEST_FS && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_FS_RAMFS
bool "Enable RAMFS Test"
default n
depends on LOSCFG_TEST_FS && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_FS_FAT
bool "Enable FAT Test"
default n
depends on LOSCFG_TEST_FS && !LOSCFG_FS_FAT_VIRTUAL_PARTITION && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_FS_FAT_FAT32
bool "Enable FAT32 Test"
default n
depends on LOSCFG_TEST_FS_FAT && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_FS_FAT_EXFAT
bool "Enable exFAT Test"
default n
depends on LOSCFG_TEST_FS_FAT && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_FAT32_FSCK
bool "Enable FAT32 Fsck Test"
default n
depends on LOSCFG_TEST_FS_FAT && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_FS_VIRPART
bool "Enable FAT virtual partition test"
default n
depends on LOSCFG_FS_FAT_VIRTUAL_PARTITION && LOSCFG_TEST_FS && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_FS_PROC
bool "Enable PROC Test"
default n
depends on LOSCFG_TEST_FS && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_FS_NFS
bool "Enable NFS Test"
default n
depends on LOSCFG_TEST_FS && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_MTD
bool "Enable MTD Testsuit"
default n
depends on LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_MTD_JFFS
bool "Enable JFFS MTD Testsuit"
default n
depends on LOSCFG_TEST_MTD && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_MTD_FAT
bool "Enable FAT MTD Testsuit"
default n
depends on LOSCFG_TEST_MTD && !LOSCFG_FS_FAT_VIRTUAL_PARTITION && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_MTD_FAT_VIRPART
bool "Enable FAT virtual partition MTD test"
default n
depends on LOSCFG_TEST_MTD && LOSCFG_FS_FAT_VIRTUAL_PARTITION && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_DRIVERBASE
bool "Enable DriverBase Testsuit"
default n
depends on LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_LIBC
bool "Enable LIBC Testsuit"
default n
depends on LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_LIBM
bool "Enable LIBM Testsuit"
default n
depends on LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_SHELL
bool "Enable Shell Testsuit"
default n
depends on LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_USB
bool "Enable Usb Testsuit"
default n
depends on LOSCFG_TESTSUIT_SHELL && LOSCFG_DRIVERS_USB
help
config LOSCFG_TEST_HOST_MASS_DEVICE
bool "Enable Host Mass Testsuit"
default n
depends on LOSCFG_TEST_USB && LOSCFG_DRIVERS_USB_MASS_STORAGE && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_DEVICE_MASS_GADGET
bool "Enable Device Mass Testsuit"
default n
depends on LOSCFG_TEST_USB && LOSCFG_DRIVERS_USB_MASS_STORAGE_GADGET && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_UVC_GADGET
bool "Enable UVC Gadget Testsuit"
default n
depends on LOSCFG_TEST_USB && LOSCFG_DRIVERS_USB_UVC_GADGET && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_UAC_GADGET
bool "Enable UAC Gadget Testsuit"
default n
depends on LOSCFG_TEST_USB && LOSCFG_DRIVERS_USB_UAC_GADGET && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_CAMERA_GADGET
bool "Enable Camera Gadget Testsuit"
default n
depends on LOSCFG_TEST_USB && LOSCFG_DRIVERS_USB_CAMERA_GADGET && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_HUB_GADGET
bool "Enable HUB Gadget Testsuit"
default n
depends on LOSCFG_TEST_USB && LOSCFG_DRIVERS_USB_MASS_STORAGE && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_SERIAL_GADGET
bool "Enable Serial Gadget Testsuit"
default n
depends on LOSCFG_TEST_USB && LOSCFG_DRIVERS_USB_SERIAL_GADGET && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_ETHERNET_GADGET
bool "Enable Ethernet Gadget Testsuit"
default n
depends on LOSCFG_TEST_USB && LOSCFG_DRIVERS_USB_ETHERNET_GADGET && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_MULTI_GADGET
bool "Enable Ethernet & Serial Gadget Testsuit"
default n
depends on LOSCFG_TEST_USB && LOSCFG_DRIVERS_USB_ETH_SER_GADGET && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_DFU_GADGET
bool "Enable Drivers DFU Testsuit"
default n
depends on LOSCFG_TEST_USB && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_MUTILDEVICE_GADGET
bool "Enable Drivers Multidevices Testsuit"
default n
depends on LOSCFG_TEST_USB && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_HOST_ETH
bool "Enable Host Eth Testsuit"
default n
depends on LOSCFG_TEST_USB && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_AUTO_USB
bool "Enable Usb auto Testsuit"
default n
depends on LOSCFG_TEST_USB && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_MMC
bool "Enable MMC Testsuit"
default n
depends on LOSCFG_TESTSUIT_SHELL && LOSCFG_DRIVERS_MMC
config LOSCFG_TEST_SD
bool "Enable SD Testsuit"
default n
depends on LOSCFG_TEST_MMC && LOSCFG_DRIVERS_MMC && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_SDIO
bool "Enable SDIO Testsuit"
default n
depends on LOSCFG_TEST_MMC && LOSCFG_DRIVERS_MMC && LOSCFG_TESTSUIT_SHELL
comment "Only one platform can be selected"
depends on LOSCFG_TEST_SDIO && LOSCFG_TEST_MMC && LOSCFG_DRIVERS_MMC && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_SDIO_1131S
depends on LOSCFG_TEST_SDIO && LOSCFG_TEST_MMC && LOSCFG_DRIVERS_MMC && LOSCFG_TESTSUIT_SHELL
bool "1131s"
config LOSCFG_TEST_SDIO_RTL8189
depends on LOSCFG_TEST_SDIO && LOSCFG_TEST_MMC && LOSCFG_DRIVERS_MMC && LOSCFG_TESTSUIT_SHELL
bool "RTL8189"
config LOSCFG_TEST_PERFORMANCE
bool "Enable Performance Testsuit"
default n
depends on LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_PERFORMANCE_CORE
bool "Enable Performance CORE Testsuit"
default n
depends on LOSCFG_TEST_PERFORMANCE && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_PERFORMANCE_MEM
bool "Enable Performance MEM Testsuit"
default n
depends on LOSCFG_TEST_PERFORMANCE && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_PERFORMANCE_FS
bool "Enable Performance FS Testsuit"
default n
depends on LOSCFG_TEST_PERFORMANCE && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_PERFORMANCE_USB
bool "Enable Performance USB Testsuit"
default n
depends on LOSCFG_TEST_PERFORMANCE && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_PERFORMANCE_NET
bool "Enable Performance NET Testsuit"
default n
depends on LOSCFG_TEST_PERFORMANCE && LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_PLATFORM
bool "Enable Platform Testsuit"
default n
depends on LOSCFG_TESTSUIT_SHELL
config LOSCFG_TEST_NET
bool "Enable NET Test"
default n
depends on LOSCFG_TESTSUIT_SHELL
help
Attention: if this option turns on, other test suits will be ignored.
config LOSCFG_TEST_LWIP
bool "Enable LWIP Testsuit"
default n
depends on LOSCFG_TEST_NET && LOSCFG_TESTSUIT_SHELL
config AR6K3_WIFI_TEST
bool "Enable AR6K3_WIFI Test"
default n
depends on LOSCFG_TESTSUIT_SHELL && LOSCFG_DRIVERS_WIFI_QRD
help
Attention: if this option turns on, other test suits will be ignored.
config BCM_WIFI_TEST
bool "Enable BCM_WIFI Test"
default n
depends on LOSCFG_TESTSUIT_SHELL && LOSCFG_DRIVERS_WIFI_BCM
help
Attention: if this option turns on, other test suits will be ignored.
config LOSCFG_3RDPARTY_TEST
bool "Enable 3rdParty Test"
default n
depends on LOSCFG_TESTSUIT_SHELL && LOSCFG_3RDPARTY
help
Attention: 3rdParty tools and libs test
config LOSCFG_TEST_MANUAL_SHELL
bool "Enable Manual Test"
default n
depends on LOSCFG_TESTSUIT_SHELL
# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
# Copyright (c) 2020-2021 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 $(LITEOSTESTTOPDIR)/config.mk
MODULE_NAME := ktest
LOCAL_INCLUDE := -I $(LITEOSTESTTOPDIR)/kernel/include
LOCAL_SRCS := $(wildcard src/osTest.c) \
$(wildcard src/runstop_osTest.c) \
$(wildcard src/scatter_osTest.c) \
$(wildcard src/iCunit.c) \
$(wildcard src/ChipTest.c) \
$(wildcard src/testusb_shellcmd.c) \
$(wildcard src/testrun_shellcmd.c)
LOCAL_FLAGS := $(LOCAL_INCLUDE) -Wno-error -I $(LITEOSTOPDIR)/../../$(LOSCFG_BOARD_CONFIG_PATH)/include \
-I $(LITEOSTOPDIR)/fs/fat/os_adapt
include $(MODULE)
此差异已折叠。
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _ICUNIT_ICUNIT_INC
#define _ICUNIT_ICUNIT_INC
#include "iCunit_config.h"
#include "los_builddef.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
ICUNIT_CASE_S g_iCunitRandArray[1];
ICUNIT_CASE_S g_iCunitCaseArray[ICUNIT_CASE_SIZE];
iUINT32 g_iCunitInitSuccess = 0x0000FFFF;
iUINT32 g_iCunitCaseCnt = 0xFFFF;
iUINT32 g_iCunitCaseFailedCnt = 0;
iUINT32 g_iCunitErrLogAddCase = 0;
iUINT16 g_iCunitErrLineNo;
iiUINT32 g_iCunitErrCode;
iUINT32 g_iCunitCaseRun = 0;
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#endif /* _UNI_ICUNIT_INC */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "los_builddef.h"
#ifndef _ICUNIT_CONFIG_H
#define _ICUNIT_CONFIG_H
#include "los_builddef.h"
#include "los_config.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if defined(LITEOS_TEST_AUTO) && !defined(LOSCFG_TEST_MUTIL)
#define ICUNIT_CASE_SIZE LOSCFG_BASE_CORE_TSK_LIMIT
#else
#define ICUNIT_CASE_SIZE 20000
#endif
#define ICUNIT_SUIT_SIZE 1
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#endif
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _LOS_TEST_PRI_H
#define _LOS_TEST_PRI_H
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
extern UINT32 OsTestInit(VOID);
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cplusplus */
#endif /* __cplusplus */
#endif /* _LOS_TEST_PRI_H */
\ No newline at end of file
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _OSTEST_H
#define _OSTEST_H
#ifndef SWTMR_TEST
#define SWTMR_TEST
#endif
#include "test_menuconfig.h"
#include "stdarg.h"
#include "los_config.h"
#include "iCunit.h"
#include "stdio.h"
#include "stdlib.h"
#include "limits.h"
#include "string.h"
#include "los_base.h"
#include "los_config.h"
#include "los_typedef.h"
#include "los_hwi.h"
#include "los_vm_map.h"
#include "los_task.h"
#include "los_sched_pri.h"
#include "los_task_pri.h"
#include "los_sys_pri.h"
#include "los_sem_pri.h"
#include "los_event.h"
#include "los_memory.h"
#include "los_queue.h"
#include "los_swtmr.h"
#include "los_mux.h"
#include "los_queue_pri.h"
#include "los_atomic.h"
#if !defined(TEST1980) && !defined(TESTISP)
#include "console.h"
#endif
#ifndef LOSCFG_AARCH64
#ifdef LOSCFG_LIB_LIBC
#include "time.h"
#endif
#include "target_config.h"
#endif
#include "los_process_pri.h"
#include "pthread.h"
#ifdef LOSCFG_PLATFORM_HI3516DV300
#define TEST3516DV300
#elif LOSCFG_PLATFORM_HI3518EV300
#define TEST3518EV300
#endif
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#define TEST_TASK_PARAM_INIT(testTask, task_name, entry, prio) \
do { \
memset(&testTask, 0, sizeof(TSK_INIT_PARAM_S)); \
testTask.pfnTaskEntry = (TSK_ENTRY_FUNC)entry; \
testTask.uwStackSize = LOS_TASK_MIN_STACK_SIZE; \
testTask.pcName = task_name; \
testTask.usTaskPrio = prio; \
testTask.uwResved = LOS_TASK_STATUS_DETACHED; \
} while (0)
#if (LOSCFG_KERNEL_SMP == YES)
#define TEST_TASK_PARAM_INIT_AFFI(testTask, task_name, entry, prio, affi) \
TEST_TASK_PARAM_INIT(testTask, task_name, entry, prio) \
testTask.usCpuAffiMask = affi;
#else
#define TEST_TASK_PARAM_INIT_AFFI(stTestTask, task_name, entry, prio, affi) \
TEST_TASK_PARAM_INIT(stTestTask, task_name, entry, prio)
#endif
#define JFFS_BASE_MTD_ADDR 0x100000
#define JFFS_BASE_MTD_LEN 0x600000
#define TASK_PRIO_TEST 25
#define TASK_PRIO_TEST_TASK 4
#define TASK_PRIO_TEST_SWTMR 4
#ifdef LOSCFG_AARCH64
#define TASK_STACK_SIZE_TEST (LOS_TASK_MIN_STACK_SIZE * 3)
#else
#define TASK_STACK_SIZE_TEST LOS_TASK_MIN_STACK_SIZE
#endif
#define LOS_MS_PER_TICK (OS_SYS_MS_PER_SECOND / LOSCFG_BASE_CORE_TICK_PER_SECOND)
#define HWI_NUM_INTVALID OS_HWI_MAX_NUM
#define writel(g_value, address) WRITE_UINT32(g_value, address)
#ifdef TESTPBXA9
extern int vsnprintf(char *str, size_t n, const char *fmt, va_list ap);
#endif
#if defined(LOSCFG_TEST_POSIX)
extern UINT32 PosixPthreadInit(pthread_attr_t *attr, int pri);
extern UINT32 PosixPthreadDestroy(pthread_attr_t *attr, pthread_t thread);
#endif
extern UINT32 TaskCountGetTest(VOID);
extern UINT32 SemCountGetTest(VOID);
extern UINT32 QueueCountGetTest(VOID);
extern UINT32 SwtmrCountGetTest(VOID);
extern void hal_interrupt_set_affinity(uint32_t irq, uint32_t cpuMask);
#define TASK_EXISTED_NUM (TaskCountGetTest())
#define QUEUE_EXISTED_NUM (QueueCountGetTest())
#define SWTMR_EXISTED_NUM (SwtmrCountGetTest())
#define SEM_EXISTED_NUM (SemCountGetTest())
extern void TestTestHwiDelete(unsigned int irq, void *devId);
extern void TestHwiTrigger(unsigned int irq);
extern void TestExtraTaskDelay(UINT32 tick);
extern UINT64 TestTickCountGet(void);
extern UINT64 TestTickCountByCurrCpuid(void);
extern void TestBusyTaskDelay(UINT32 tick);
extern void *malloc(size_t size);
extern void TestDumpCpuid(void);
extern u_long TRandom(void);
#define TEST_HwiDelete(ID) TestTestHwiDelete(ID, NULL)
#define TEST_HwiClear(ID) HalIrqMask(ID)
#define TEST_HwiTriggerDelay LOS_TaskDelay(200 * LOSCFG_BASE_CORE_TICK_PER_SECOND / 1000)
#define TEST_HwiCreate(ID, prio, mode, Func, arg) LOS_HwiCreate(ID, prio, mode, Func, arg)
#define HWI_NUM_INT0 0
#define HWI_NUM_INT1 1
#define HWI_NUM_INT2 2
#define HWI_NUM_INT3 3
#define HWI_NUM_INT4 4
#define HWI_NUM_INT5 5
#define HWI_NUM_INT6 6
#define HWI_NUM_INT7 7
#define HWI_NUM_INT11 11
#define HWI_NUM_INT12 12
#define HWI_NUM_INT13 13
#define HWI_NUM_INT14 14
#define HWI_NUM_INT15 15
#define HWI_NUM_INT16 16
#define HWI_NUM_INT17 17
#define HWI_NUM_INT18 18
#define HWI_NUM_INT19 19
#define HWI_NUM_INT21 21
#define HWI_NUM_INT22 22
#define HWI_NUM_INT23 23
#define HWI_NUM_INT24 24
#define HWI_NUM_INT25 25
#define HWI_NUM_INT26 26
#define HWI_NUM_INT27 27
#define HWI_NUM_INT28 28
#define HWI_NUM_INT30 30
#define HWI_NUM_INT31 31
#define HWI_NUM_INT32 32
#define HWI_NUM_INT33 33
#define HWI_NUM_INT34 34
#define HWI_NUM_INT35 35
#define HWI_NUM_INT42 42
#define HWI_NUM_INT45 45
#define HWI_NUM_INT46 46
#define HWI_NUM_INT50 50
#define HWI_NUM_INT55 55
#define HWI_NUM_INT56 56
#define HWI_NUM_INT57 57
#define HWI_NUM_INT58 58
#define HWI_NUM_INT59 59
#define HWI_NUM_INT60 60
#define HWI_NUM_INT61 61
#define HWI_NUM_INT63 63
#define HWI_NUM_INT62 62
#define HWI_NUM_INT68 68
#define HWI_NUM_INT69 69
#define HWI_NUM_INT95 95
#define HWI_NUM_INT114 114
#define HWI_NUM_INT169 169
#if defined TESTPBXA9
#define HWI_NUM_TEST HWI_NUM_INT56
#define HWI_NUM_TEST1 HWI_NUM_INT57
#define HWI_NUM_TEST0 HWI_NUM_INT58
#define HWI_NUM_TEST2 HWI_NUM_INT59
#define HWI_NUM_TEST3 HWI_NUM_INT60
#elif defined TEST3518EV300
#define HWI_NUM_TEST0 HWI_NUM_INT58
#define HWI_NUM_TEST HWI_NUM_INT59
#define HWI_NUM_TEST1 HWI_NUM_INT60
#define HWI_NUM_TEST2 HWI_NUM_INT61
#define HWI_NUM_TEST3 HWI_NUM_INT68
#elif defined TEST3516DV300
#define HWI_NUM_TEST HWI_NUM_INT56
#define HWI_NUM_TEST1 HWI_NUM_INT57
#define HWI_NUM_TEST0 HWI_NUM_INT58
#define HWI_NUM_TEST2 HWI_NUM_INT59
#define HWI_NUM_TEST3 HWI_NUM_INT60
#endif
#define TEST_TASKDELAY_1TICK 1
#define TEST_TASKDELAY_2TICK 2
#define TEST_TASKDELAY_4TICK 4
#define TEST_TASKDELAY_10TICK 10
#define TEST_TASKDELAY_20TICK 20
#define TEST_TASKDELAY_50TICK 50
#ifdef TEST3731
#define TestTimer2ValueGet(temp) READ_UINT32(temp, TIMER1_REG_BASE + TIMER_VALUE)
#elif defined TEST3559
#define TestTimer2ValueGet(temp) READ_UINT32(temp, TIMER3_REG_BASE + TIMER_VALUE)
#else
#define TestTimer2ValueGet(temp) READ_UINT32(temp, TIMER2_REG_BASE + TIMER_VALUE)
#endif
#define REALTIME(time) (UINT32)((UINT64)(0xffffffff - time) * 1000 / OS_SYS_CLOCK) /* accuracy:ms */
#define HW_TMI(time) (UINT32)((UINT64)(0xffffffff - time) * 1000 / (OS_SYS_CLOCK / 1000000)) /* accuracy:ns */
#define uart_printf_func dprintf
#ifndef VFS_STAT_PRINTF
#define VFS_STAT_PRINTF 0
#endif
#ifndef VFS_STATFS_PRINTF
#define VFS_STATFS_PRINTF 0
#endif
#define OPEN_FILE_MAX 20
#define HUAWEI_ENV_NFS 0
#ifndef TEST_RESOURCELEAK_CHECK
#define TEST_RESOURCELEAK_CHECK YES
#endif
#ifndef TEST_MODULE_CHECK
#define TEST_MODULE_CHECK YES
#endif
#define OS_PROCESS_STATUS_PEND OS_PROCESS_STATUS_PENDING
#define OS_TASK_STATUS_SUSPEND OS_TASK_STATUS_SUSPENDED
#define OS_TASK_STATUS_PEND OS_TASK_STATUS_PENDING
extern UINT32 volatile g_testCount;
extern UINT32 g_testCount1;
extern UINT32 g_testCount2;
extern UINT32 g_testCount3;
extern UINT32 g_flowcheck;
extern UINT32 g_failResult;
extern UINT32 g_passResult;
extern UINT32 g_testTskHandle;
extern UINT32 g_testTaskID01;
extern UINT32 g_testTaskID02;
extern UINT32 g_testTaskID03;
extern UINT32 g_testTaskID04;
extern UINT32 g_hwiNum1;
extern UINT32 g_hwiNum2;
extern UINT32 g_semID;
extern UINT32 g_semID2;
extern LosMux g_mutexkernelTest;
extern UINT32 g_cpupTestCount;
extern UINT16 g_swTmrID;
extern UINT32 g_semID;
extern UINT32 g_testQueueID01;
extern UINT32 g_testQueueID02;
extern UINT32 g_testQueueID03;
extern UINT32 g_testTskHandle;
extern UINT32 g_leavingTaskNum;
extern UINT32 g_semID3[];
extern EVENT_CB_S g_eventCB;
extern EVENT_CB_S g_event;
extern UINT32 g_testPeriod;
extern BOOL g_isAddArray;
extern BOOL g_isSdInit;
extern BOOL g_isSpinorInit;
extern UINT32 g_getTickConsume;
extern UINT32 g_waitTestCount;
extern INT32 g_libFileSystem;
extern UINT32 LosMuxCreate(LosMux *mutex);
extern INT32 g_performanceStart;
extern void msleep(unsigned int msecs);
extern unsigned int sleep(unsigned int seconds);
extern int usleep(unsigned useconds);
#define OS_TASK_STATUS_DETACHED OS_TASK_FLAG_DETACHED
extern UINT32 LOS_MemTotalUsedGet(VOID *pool);
extern VOID ptestTickConsume(VOID);
extern UINT32 TEST_TskDelete(UINT32 taskID);
extern UINT32 TEST_SemDelete(UINT32 semHandle);
extern VOID ItSuiteLosQueue(VOID);
extern VOID ItSuiteLosSwtmr(VOID);
extern VOID ItSuiteLosTask(VOID);
extern VOID ItSuiteLosEvent(VOID);
extern VOID ItSuiteLosMux(VOID);
extern VOID ItSuiteLosRwlock(VOID);
extern VOID ItSuiteLosSem(VOID);
extern VOID ItSuiteSmpHwi(VOID);
extern VOID ItSuiteHwiNesting(VOID);
extern VOID ItSuiteExtendCpup(VOID);
extern VOID ItSuitePosixMutex(VOID);
extern VOID ItSuitePosixPthread(VOID);
extern VOID TestRunShell(VOID);
extern UINT32 OsTestInit(VOID);
extern void TEST_DT_COMMON(void);
extern VOID dprintf(const char *fmt, ...);
#define BIG_FD 512
typedef struct testrunParam {
CHAR testcase_sequence[16];
CHAR testcase_num[16];
CHAR testcase_layer[32];
CHAR testcase_module[32];
CHAR testcase_level[16];
CHAR testcase_type[16];
CHAR testcase_id[128];
} TEST_RUN_PARAM;
#define LOSCFG_BASE_CORE_TSK_CONFIG LOSCFG_BASE_CORE_TSK_LIMIT
#define LOSCFG_BASE_IPC_SEM_CONFIG LOSCFG_BASE_IPC_SEM_LIMIT
#define LOSCFG_BASE_IPC_QUEUE_CONFIG LOSCFG_BASE_IPC_QUEUE_LIMIT
#define LOSCFG_BASE_CORE_SWTMR_CONFIG LOSCFG_BASE_CORE_SWTMR_LIMIT
#define HAL_READ_UINT8(addr, data) READ_UINT8(data, addr)
#define HAL_WRITE_UINT8(addr, data) WRITE_UINT8(data, addr)
#define HAL_READ_UINT32(addr, data) READ_UINT32(data, addr)
#define HAL_WRITE_UINT32(addr, data) WRITE_UINT32(data, addr)
extern void InitRebootHook(void);
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#endif /* _OSTEST_H */
static_library("test_core") {
sources = [
"task/It_los_task.c",
"swtmr/It_los_swtmr.c",
"hwi/It_smp_hwi.c",
"hwi_nesting/It_hwi_nesting.c",
]
if (LOSCFG_TEST_SMOKE) {
sources += [
"task/smoke/It_los_task_045.c",
"task/smoke/It_los_task_046.c",
"task/smoke/It_los_task_049.c",
"task/smoke/It_los_task_081.c",
"task/smoke/It_los_task_089.c",
"task/smoke/It_los_task_097.c",
"task/smoke/It_los_task_099.c",
"task/smoke/It_los_task_101.c",
"task/smoke/It_los_task_105.c",
"task/smoke/It_los_task_timeslice_001.c",
"swtmr/smoke/It_los_swtmr_053.c",
"swtmr/smoke/It_los_swtmr_058.c",
]
}
include_dirs = [
"../../../include/",
"task",
"swtmr",
"hwi",
"hwi_nesting",
]
cflags = [ "-Wno-error" ]
}
include $(LITEOSTESTTOPDIR)/config.mk
MODULE_NAME := coretest
LOCAL_INCLUDE := \
-I $(LITEOSTESTTOPDIR)/kernel/include \
-I $(LITEOSTESTTOPDIR)/kernel/sample/kernel_base/core/task \
-I $(LITEOSTESTTOPDIR)/kernel/sample/kernel_base/core/swtmr \
-I $(LITEOSTESTTOPDIR)/kernel/sample/kernel_base/core/hwi \
-I $(LITEOSTESTTOPDIR)/kernel/sample/kernel_base/core/hwi_nesting
SRC_MODULES := task swtmr hwi hwi_nesting
ifeq ($(LOSCFG_KERNEL_SMP), y)
SMP_MODULES := task/smp swtmr/smp hwi/smp task/float
endif
ifeq ($(LOSCFG_TEST_LLT), y)
LLT_MODULES := task/llt swtmr/llt
endif
ifeq ($(LOSCFG_TEST_PRESSURE), y)
PRESSURE_MODULES := task/pressure swtmr/pressure
endif
ifeq ($(LOSCFG_TEST_SMOKE), y)
SMOKE_MODULES := task/smoke swtmr/smoke
endif
ifeq ($(LOSCFG_TEST_FULL), y)
FULL_MODULES := task/full swtmr/full hwi_nesting/full
endif
ifeq ($(LOSCFG_TEST_MANUAL_SHELL), y)
MANUAL_MODULES :=task/manual
endif
LOCAL_MODULES := $(SRC_MODULES) $(LLT_MODULES) $(PRESSURE_MODULES) $(SMOKE_MODULES) $(FULL_MODULES) $(SMP_MODULES) $(MANUAL_MODULES)
LOCAL_SRCS := $(foreach dir,$(LOCAL_MODULES),$(wildcard $(dir)/*.c))
LOCAL_CHS := $(foreach dir,$(LOCAL_MODULES),$(wildcard $(dir)/*.h))
LOCAL_FLAGS := $(LOCAL_INCLUDE) -Wno-error
include $(MODULE)
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
VOID ItSuiteSmpHwi(VOID)
{
#if (LOSCFG_KERNEL_SMP == YES)
ItSmpLosHwi001();
ItSmpLosHwi002();
ItSmpLosHwi003();
ItSmpLosHwi004();
ItSmpLosHwi005();
ItSmpLosHwi006();
ItSmpLosHwi007();
ItSmpLosHwi008();
ItSmpLosHwi009();
ItSmpLosHwi010();
ItSmpLosHwi011();
ItSmpLosHwi012();
ItSmpLosHwi013();
#ifndef LOSCFG_NO_SHARED_IRQ
ItSmpLosHwiShare001();
ItSmpLosHwiShare002();
ItSmpLosHwiShare003();
ItSmpLosHwiShare004();
ItSmpLosHwiShare005();
ItSmpLosHwiShare006();
ItSmpLosHwiShare007();
ItSmpLosHwiShare008();
ItSmpLosHwiShare009();
ItSmpLosHwiShare010();
#endif
ItSmpLosHwiIpi001();
ItSmpLosHwiIpi002();
ItSmpLosHwiIpi003();
ItSmpLosHwiIpi004();
ItSmpLosHwiIpi005();
ItSmpLosHwiIpi006();
ItSmpLosHwiIpi007();
ItSmpLosHwiIpi008();
ItSmpLosHwiNest001();
ItSmpLosHwiNest002();
ItSmpLosHwiNest003();
ItSmpLosHwiNest004();
ItSmpLosHwiNest005();
ItSmpLosHwiNest006();
ItSmpLosHwiNest007();
ItSmpLosHwiNest008();
#endif
#if (LOSCFG_KERNEL_SMP == YES)
HalIrqSetAffinity(HWI_NUM_TEST, 1);
HalIrqSetAffinity(HWI_NUM_TEST1, 1);
HalIrqSetAffinity(HWI_NUM_TEST2, 1);
HalIrqSetAffinity(HWI_NUM_TEST3, 1);
#endif
}
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LOS_SMP_HWI_H
#define LOS_SMP_HWI_H
#include "los_hwi.h"
#include "osTest.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#define LOOP 100
#if defined(LOSCFG_TEST_SMP)
VOID ItSmpLosHwi001(VOID);
VOID ItSmpLosHwi002(VOID);
VOID ItSmpLosHwi003(VOID);
VOID ItSmpLosHwi004(VOID);
VOID ItSmpLosHwi005(VOID);
VOID ItSmpLosHwi006(VOID);
VOID ItSmpLosHwi007(VOID);
VOID ItSmpLosHwi008(VOID);
VOID ItSmpLosHwi009(VOID);
VOID ItSmpLosHwi010(VOID);
VOID ItSmpLosHwi011(VOID);
VOID ItSmpLosHwi012(VOID);
VOID ItSmpLosHwi013(VOID);
#ifndef LOSCFG_NO_SHARED_IRQ
VOID ItSmpLosHwiShare001(VOID);
VOID ItSmpLosHwiShare002(VOID);
VOID ItSmpLosHwiShare003(VOID);
VOID ItSmpLosHwiShare004(VOID);
VOID ItSmpLosHwiShare005(VOID);
VOID ItSmpLosHwiShare006(VOID);
VOID ItSmpLosHwiShare007(VOID);
VOID ItSmpLosHwiShare008(VOID);
VOID ItSmpLosHwiShare009(VOID);
VOID ItSmpLosHwiShare010(VOID);
#endif
VOID ItSmpLosHwiIpi001(VOID);
VOID ItSmpLosHwiIpi002(VOID);
VOID ItSmpLosHwiIpi003(VOID);
VOID ItSmpLosHwiIpi004(VOID);
VOID ItSmpLosHwiIpi005(VOID);
VOID ItSmpLosHwiIpi006(VOID);
VOID ItSmpLosHwiIpi007(VOID);
VOID ItSmpLosHwiIpi008(VOID);
VOID ItSmpLosHwiNest001(VOID);
VOID ItSmpLosHwiNest002(VOID);
VOID ItSmpLosHwiNest003(VOID);
VOID ItSmpLosHwiNest004(VOID);
VOID ItSmpLosHwiNest005(VOID);
VOID ItSmpLosHwiNest006(VOID);
VOID ItSmpLosHwiNest007(VOID);
VOID ItSmpLosHwiNest008(VOID);
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#endif /* LOS_SMP_HWI_H */
\ No newline at end of file
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static UINT32 g_testTimes;
static VOID HwiF01(void)
{
LOS_AtomicInc(&g_testCount);
}
static VOID TaskF01(void)
{
#ifdef TEST1980
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
TestHwiTrigger(HWI_NUM_TEST);
TestDumpCpuid();
return;
}
static UINT32 Testcase(void)
{
TSK_INIT_PARAM_S testTask;
UINT32 ret, testid;
g_testCount = 0;
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
TEST_TASK_PARAM_INIT_AFFI(testTask, "it_hwi_001_task", TaskF01, TASK_PRIO_TEST - 1,
CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
ret = LOS_TaskCreate(&testid, &testTask);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);
EXIT:
TEST_HwiDelete(HWI_NUM_TEST);
return LOS_OK;
}
VOID ItSmpLosHwi001(VOID)
{
TEST_ADD_CASE("ItSmpLosHwi001", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static VOID HwiF01(void)
{
LOS_AtomicInc(&g_testCount);
}
static VOID TaskF01(void)
{
#ifdef TEST1980
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(0));
#endif
TestHwiTrigger(HWI_NUM_TEST);
TestDumpCpuid();
return;
}
static UINT32 Testcase(void)
{
TSK_INIT_PARAM_S testTask;
UINT32 ret, testid, currCpuid;
g_testCount = 0;
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
currCpuid = (ArchCurrCpuid() + 1) % (LOSCFG_KERNEL_CORE_NUM);
TEST_TASK_PARAM_INIT_AFFI(testTask, "it_hwi_002_task", TaskF01, TASK_PRIO_TEST - 1,
CPUID_TO_AFFI_MASK(currCpuid)); // cross task
ret = LOS_TaskCreate(&testid, &testTask);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
do {
__asm__ volatile("nop");
} while (g_testCount != 1);
TEST_HwiDelete(HWI_NUM_TEST);
return LOS_OK;
}
VOID ItSmpLosHwi002(VOID)
{
TEST_ADD_CASE("ItSmpLosHwi002", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static UINT32 g_testTimes;
static VOID HwiF01(void)
{
LOS_AtomicInc(&g_testCount);
}
static VOID TaskF01(void)
{
UINT32 ret;
TestDumpCpuid();
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
#ifndef LOSCFG_NO_SHARED_IRQ
ICUNIT_ASSERT_EQUAL_VOID(ret, OS_ERRNO_HWI_SHARED_ERROR, ret);
#else
ICUNIT_ASSERT_EQUAL_VOID(ret, OS_ERRNO_HWI_ALREADY_CREATED, ret);
#endif
return;
EXIT:
TEST_HwiDelete(HWI_NUM_TEST);
return;
}
static UINT32 Testcase(void)
{
TSK_INIT_PARAM_S testTask;
UINT32 ret, testid;
g_testCount = 0;
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
TestDumpCpuid();
TEST_TASK_PARAM_INIT_AFFI(testTask, "it_hwi_001_task", TaskF01, TASK_PRIO_TEST - 1,
CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
LOS_TaskDelay(1);
#ifdef TEST1980
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
TestHwiTrigger(HWI_NUM_TEST);
LOS_TaskDelay(1);
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);
EXIT:
TEST_HwiDelete(HWI_NUM_TEST);
return LOS_OK;
}
VOID ItSmpLosHwi003(VOID)
{
TEST_ADD_CASE("ItSmpLosHwi003", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static UINT32 g_testTimes;
static VOID HwiF01(void)
{
LOS_AtomicInc(&g_testCount);
}
static VOID TaskF01(void)
{
UINT32 ret;
TestDumpCpuid();
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
#ifndef LOSCFG_NO_SHARED_IRQ
ICUNIT_ASSERT_EQUAL_VOID(ret, OS_ERRNO_HWI_SHARED_ERROR, ret);
#else
ICUNIT_ASSERT_EQUAL_VOID(ret, OS_ERRNO_HWI_ALREADY_CREATED, ret);
#endif
return;
EXIT:
TEST_HwiDelete(HWI_NUM_TEST);
return;
}
static UINT32 Testcase(void)
{
TSK_INIT_PARAM_S testTask;
UINT32 ret, testid, currCpuid;
g_testCount = 0;
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
currCpuid = (ArchCurrCpuid() + 1) % (LOSCFG_KERNEL_CORE_NUM);
TestDumpCpuid();
TEST_TASK_PARAM_INIT_AFFI(testTask, "it_hwi_002_task", TaskF01, TASK_PRIO_TEST - 1,
CPUID_TO_AFFI_MASK(currCpuid)); // cross task
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
LOS_TaskDelay(1);
#ifdef TEST1980
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
TestHwiTrigger(HWI_NUM_TEST);
LOS_TaskDelay(1);
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);
EXIT:
TEST_HwiDelete(HWI_NUM_TEST);
return LOS_OK;
}
VOID ItSmpLosHwi004(VOID)
{
TEST_ADD_CASE("ItSmpLosHwi004", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static VOID HwiF01(void)
{
LOS_AtomicInc(&g_testCount);
}
static VOID TaskF01(void)
{
UINT32 ret;
TestDumpCpuid();
TEST_HwiDelete(HWI_NUM_TEST);
return;
}
static UINT32 Testcase(void)
{
TSK_INIT_PARAM_S testTask;
UINT32 ret, testid;
g_testCount = 0;
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
TestDumpCpuid();
TEST_TASK_PARAM_INIT_AFFI(testTask, "it_hwi_001_task", TaskF01, TASK_PRIO_TEST - 1,
CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
LOS_TaskDelay(1);
#ifdef TEST1980
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
TestHwiTrigger(HWI_NUM_TEST);
LOS_TaskDelay(1);
ICUNIT_GOTO_EQUAL(g_testCount, 0, g_testCount, EXIT);
EXIT:
TEST_HwiDelete(HWI_NUM_TEST);
return LOS_OK;
}
VOID ItSmpLosHwi005(VOID)
{
TEST_ADD_CASE("ItSmpLosHwi005", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static VOID HwiF01(void)
{
LOS_AtomicInc(&g_testCount);
}
static VOID TaskF01(void)
{
UINT32 ret;
TestDumpCpuid();
TEST_HwiDelete(HWI_NUM_TEST);
LOS_AtomicInc(&g_testCount);
return;
}
static UINT32 Testcase(void)
{
TSK_INIT_PARAM_S testTask;
UINT32 ret, testid, currCpuid;
g_testCount = 0;
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
currCpuid = (ArchCurrCpuid() + 1) % (LOSCFG_KERNEL_CORE_NUM);
TestDumpCpuid();
TEST_TASK_PARAM_INIT_AFFI(testTask, "it_hwi_002_task", TaskF01, TASK_PRIO_TEST - 1,
CPUID_TO_AFFI_MASK(currCpuid)); // cross task
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
TestAssertBusyTaskDelay(100, 1); // 100, Set the timeout of runtime;
#ifdef TEST1980
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
TestHwiTrigger(HWI_NUM_TEST);
TestAssertBusyTaskDelay(100, 2); // 100, Set the timeout of runtime; 2, test runing count
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);
EXIT:
TEST_HwiDelete(HWI_NUM_TEST);
return LOS_OK;
}
VOID ItSmpLosHwi006(VOID)
{
TEST_ADD_CASE("ItSmpLosHwi006", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static VOID HwiF01(void)
{
LOS_AtomicInc(&g_testCount);
}
static VOID TaskF01(void)
{
UINT32 ret;
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_OK, ret);
TestDumpCpuid();
return;
}
static VOID TaskF02(void)
{
UINT32 ret;
#ifdef TEST1980
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
TestHwiTrigger(HWI_NUM_TEST);
TestDumpCpuid();
return;
}
static UINT32 Testcase(void)
{
TSK_INIT_PARAM_S testTask;
UINT32 ret;
g_testCount = 0;
TEST_TASK_PARAM_INIT(testTask, "it_hwi_007_task01", TaskF01, TASK_PRIO_TEST + 1);
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
LOS_TaskDelay(1);
TEST_TASK_PARAM_INIT(testTask, "it_hwi_007_task02", TaskF02, TASK_PRIO_TEST + 1);
ret = LOS_TaskCreate(&g_testTaskID02, &testTask);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
LOS_TaskDelay(1);
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);
EXIT:
TEST_HwiDelete(HWI_NUM_TEST);
return LOS_OK;
}
VOID ItSmpLosHwi007(VOID)
{
TEST_ADD_CASE("ItSmpLosHwi007", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static UINT32 g_ret = 0;
static VOID HwiF01(void)
{
LOS_AtomicInc(&g_testCount);
}
static VOID TaskF01(void)
{
UINT32 ret;
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
g_ret |= ret;
TestDumpCpuid();
return;
}
static UINT32 Testcase(void)
{
TSK_INIT_PARAM_S testTask;
UINT32 ret, i, j;
for (j = 0; j < LOOP; j++) {
g_testCount = 0;
g_ret = 0;
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {
TEST_TASK_PARAM_INIT_AFFI(testTask, "it_hwi_007_task01", TaskF01, TASK_PRIO_TEST + 1,
CPUID_TO_AFFI_MASK(i));
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
}
LOS_TaskDelay(1);
#ifdef TEST1980
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
TestHwiTrigger(HWI_NUM_TEST);
LOS_TaskDelay(1);
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);
ICUNIT_GOTO_NOT_EQUAL(g_ret, 0, g_ret, EXIT);
TEST_HwiDelete(HWI_NUM_TEST);
}
EXIT:
LOS_TaskDelete(g_testTaskID01);
TEST_HwiDelete(HWI_NUM_TEST);
return LOS_OK;
}
VOID ItSmpLosHwi008(VOID)
{
TEST_ADD_CASE("ItSmpLosHwi008", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static UINT32 g_ret = 0;
static VOID HwiF01(void)
{
LOS_AtomicInc(&g_testCount);
}
static VOID TaskF01(void)
{
UINT32 ret;
ret = LOS_HwiDelete(HWI_NUM_TEST, NULL);
g_ret |= ret;
TestDumpCpuid();
return;
}
static UINT32 Testcase(void)
{
TSK_INIT_PARAM_S testTask;
UINT32 ret, i, j;
for (j = 0; j < LOOP; j++) {
g_testCount = 0;
g_ret = 0;
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {
TEST_TASK_PARAM_INIT_AFFI(testTask, "it_hwi_007_task01", TaskF01, TASK_PRIO_TEST + 1,
CPUID_TO_AFFI_MASK(i));
ret = LOS_TaskCreate(&g_testTaskID01, &testTask);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
}
LOS_TaskDelay(2); // 2, set delay time
#ifdef TEST1980
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
TestHwiTrigger(HWI_NUM_TEST);
LOS_TaskDelay(1);
ICUNIT_GOTO_EQUAL(g_testCount, 0, g_testCount, EXIT);
}
EXIT:
LOS_HwiDelete(HWI_NUM_TEST, NULL);
return LOS_OK;
}
VOID ItSmpLosHwi009(VOID)
{
TEST_ADD_CASE("ItSmpLosHwi009", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static UINT32 g_szId[LOSCFG_KERNEL_CORE_NUM] = {0};
static VOID SwtmrF01(void)
{
LOS_AtomicInc(&g_testCount);
}
static VOID HwiF01(void)
{
UINT32 ret;
ret = LOS_SwtmrCreate(g_testPeriod, LOS_SWTMR_MODE_PERIOD, (SWTMR_PROC_FUNC)SwtmrF01, &g_szId[0], 0);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_OK, ret);
TestDumpCpuid();
return;
}
static VOID HwiF02(void)
{
UINT32 ret;
ret = LOS_SwtmrCreate(g_testPeriod, LOS_SWTMR_MODE_PERIOD, (SWTMR_PROC_FUNC)SwtmrF01, &g_szId[1], 0);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_OK, ret);
TestDumpCpuid();
return;
}
static UINT32 Testcase(void)
{
UINT32 ret, i;
g_testCount = 0;
g_testPeriod = 10; // 10, Timeout interval of a periodic software timer.
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid())); // curret cpu
ret = LOS_HwiCreate(HWI_NUM_TEST1, 1, 0, (HWI_PROC_FUNC)HwiF02, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
HalIrqSetAffinity(HWI_NUM_TEST1, CPUID_TO_AFFI_MASK((ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM)); // other cpu
for (i = 0; i < LOOP; i++) {
#ifndef TEST1980
TestHwiTrigger(HWI_NUM_TEST1);
TestHwiTrigger(HWI_NUM_TEST);
#else
HalIrqSendIpi(CPUID_TO_AFFI_MASK((ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM), HWI_NUM_TEST1);
HalIrqSendIpi(CPUID_TO_AFFI_MASK(ArchCurrCpuid()), HWI_NUM_TEST);
#endif
LOS_TaskDelay(1);
ICUNIT_GOTO_EQUAL(g_testCount, 0, g_testCount, EXIT);
ret = LOS_SwtmrDelete(g_szId[0]);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
ret = LOS_SwtmrDelete(g_szId[1]);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
}
ret = LOS_HwiDelete(HWI_NUM_TEST, NULL);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
ret = LOS_HwiDelete(HWI_NUM_TEST1, NULL);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
return LOS_OK;
EXIT:
LOS_SwtmrDelete(g_szId[0]);
LOS_SwtmrDelete(g_szId[1]);
LOS_HwiDelete(HWI_NUM_TEST, NULL);
LOS_HwiDelete(HWI_NUM_TEST1, NULL);
return LOS_OK;
}
VOID ItSmpLosHwi010(VOID)
{
TEST_ADD_CASE("ItSmpLosHwi010", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static UINT32 g_szId[LOSCFG_KERNEL_CORE_NUM] = {0};
static VOID SwtmrF01(void)
{
LOS_AtomicInc(&g_testCount);
}
static VOID HwiF01(void)
{
UINT32 ret;
TEST_HwiClear(HWI_NUM_TEST);
ret = LOS_SwtmrStart(g_szId[0]);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
TestDumpCpuid();
return;
EXIT:
LOS_HwiDelete(HWI_NUM_TEST, NULL);
LOS_HwiDelete(HWI_NUM_TEST1, NULL);
LOS_HwiDelete(HWI_NUM_TEST2, NULL);
LOS_HwiDelete(HWI_NUM_TEST3, NULL);
LOS_SwtmrDelete(g_szId[0]);
LOS_SwtmrDelete(g_szId[1]);
return;
}
static VOID HwiF02(void)
{
UINT32 ret;
TEST_HwiClear(HWI_NUM_TEST1);
ret = LOS_SwtmrStart(g_szId[1]);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
TestDumpCpuid();
return;
EXIT:
LOS_HwiDelete(HWI_NUM_TEST, NULL);
LOS_HwiDelete(HWI_NUM_TEST1, NULL);
LOS_HwiDelete(HWI_NUM_TEST2, NULL);
LOS_HwiDelete(HWI_NUM_TEST3, NULL);
LOS_SwtmrDelete(g_szId[0]);
LOS_SwtmrDelete(g_szId[1]);
return;
}
static VOID HwiF03(void)
{
UINT32 ret;
TEST_HwiClear(HWI_NUM_TEST2);
ret = LOS_SwtmrStop(g_szId[1]);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
TestDumpCpuid();
return;
EXIT:
LOS_HwiDelete(HWI_NUM_TEST, NULL);
LOS_HwiDelete(HWI_NUM_TEST1, NULL);
LOS_HwiDelete(HWI_NUM_TEST2, NULL);
LOS_HwiDelete(HWI_NUM_TEST3, NULL);
LOS_SwtmrDelete(g_szId[0]);
LOS_SwtmrDelete(g_szId[1]);
return;
}
static VOID HwiF04(void)
{
UINT32 ret;
TEST_HwiClear(HWI_NUM_TEST3);
ret = LOS_SwtmrStop(g_szId[0]);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
TestDumpCpuid();
return;
EXIT:
LOS_HwiDelete(HWI_NUM_TEST, NULL);
LOS_HwiDelete(HWI_NUM_TEST1, NULL);
LOS_HwiDelete(HWI_NUM_TEST2, NULL);
LOS_HwiDelete(HWI_NUM_TEST3, NULL);
LOS_SwtmrDelete(g_szId[0]);
LOS_SwtmrDelete(g_szId[1]);
return;
}
static UINT32 Testcase(void)
{
UINT32 ret, i;
g_testCount = 0;
g_testPeriod = 10; // 10, Timeout interval of a periodic software timer.
ret = LOS_SwtmrCreate(g_testPeriod, LOS_SWTMR_MODE_PERIOD, (SWTMR_PROC_FUNC)SwtmrF01, &g_szId[0], 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
ret = LOS_SwtmrCreate(g_testPeriod, LOS_SWTMR_MODE_PERIOD, (SWTMR_PROC_FUNC)SwtmrF01, &g_szId[1], 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid())); // curret cpu
ret = LOS_HwiCreate(HWI_NUM_TEST1, 1, 0, (HWI_PROC_FUNC)HwiF02, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
HalIrqSetAffinity(HWI_NUM_TEST1, CPUID_TO_AFFI_MASK((ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM)); // other cpu
ret = LOS_HwiCreate(HWI_NUM_TEST2, 1, 0, (HWI_PROC_FUNC)HwiF03, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
HalIrqSetAffinity(HWI_NUM_TEST2, CPUID_TO_AFFI_MASK(ArchCurrCpuid())); // curret cpu
ret = LOS_HwiCreate(HWI_NUM_TEST3, 1, 0, (HWI_PROC_FUNC)HwiF04, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
HalIrqSetAffinity(HWI_NUM_TEST3, CPUID_TO_AFFI_MASK((ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM)); // other cpu
for (i = 0; i < LOOP; i++) {
#ifndef TEST1980
TestHwiTrigger(HWI_NUM_TEST1); // start swtmrs
TestHwiTrigger(HWI_NUM_TEST);
#else
HalIrqSendIpi(CPUID_TO_AFFI_MASK((ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM), HWI_NUM_TEST1);
HalIrqSendIpi(CPUID_TO_AFFI_MASK(ArchCurrCpuid()), HWI_NUM_TEST);
#endif
LOS_TaskDelay(g_testPeriod + 1);
ICUNIT_GOTO_EQUAL(g_testCount, 2 * (i + 1), g_testCount, EXIT); // 2 * (i + 1),Compared to the expected value.
#ifndef TEST1980
TestHwiTrigger(HWI_NUM_TEST3); // stop swtmrs
TestHwiTrigger(HWI_NUM_TEST2);
#else
HalIrqSendIpi(CPUID_TO_AFFI_MASK((ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM), HWI_NUM_TEST3);
HalIrqSendIpi(CPUID_TO_AFFI_MASK(ArchCurrCpuid()), HWI_NUM_TEST2);
#endif
LOS_TaskDelay(g_testPeriod + 1);
ICUNIT_GOTO_EQUAL(g_testCount, 2 * (i + 1), g_testCount, EXIT); // 2 * (i + 1),Compared to the expected value.
}
EXIT:
ret = LOS_HwiDelete(HWI_NUM_TEST, NULL);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
ret = LOS_HwiDelete(HWI_NUM_TEST1, NULL);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
ret = LOS_HwiDelete(HWI_NUM_TEST2, NULL);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
ret = LOS_HwiDelete(HWI_NUM_TEST3, NULL);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
ret = LOS_SwtmrDelete(g_szId[0]);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
ret = LOS_SwtmrDelete(g_szId[1]);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
return LOS_OK;
}
VOID ItSmpLosHwi011(VOID)
{
TEST_ADD_CASE("ItSmpLosHwi011", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static UINT32 g_szId[LOSCFG_KERNEL_CORE_NUM] = {0};
static VOID SwtmrF01(void)
{
LOS_AtomicInc(&g_testCount);
}
static VOID HwiF01(void)
{
UINT32 ret;
ret = LOS_SwtmrDelete(g_szId[0]);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_OK, ret);
TestDumpCpuid();
return;
}
static VOID HwiF02(void)
{
UINT32 ret;
ret = LOS_SwtmrDelete(g_szId[1]);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_OK, ret);
TestDumpCpuid();
return;
}
static UINT32 Testcase(void)
{
UINT32 ret, i;
g_testCount = 0;
g_testPeriod = 10; // 10, Timeout interval of a periodic software timer.
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid())); // curret cpu
ret = LOS_HwiCreate(HWI_NUM_TEST1, 1, 0, (HWI_PROC_FUNC)HwiF02, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
HalIrqSetAffinity(HWI_NUM_TEST1, CPUID_TO_AFFI_MASK((ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM)); // other cpu
for (i = 0; i < LOOP; i++) {
ret = LOS_SwtmrCreate(g_testPeriod, LOS_SWTMR_MODE_PERIOD, (SWTMR_PROC_FUNC)SwtmrF01, &g_szId[0], 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
ret = LOS_SwtmrCreate(g_testPeriod, LOS_SWTMR_MODE_PERIOD, (SWTMR_PROC_FUNC)SwtmrF01, &g_szId[1], 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
LOS_SwtmrStart(g_szId[0]);
LOS_SwtmrStart(g_szId[1]);
#ifndef TEST1980
TestHwiTrigger(HWI_NUM_TEST1);
TestHwiTrigger(HWI_NUM_TEST);
#else
HalIrqSendIpi(CPUID_TO_AFFI_MASK((ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM), HWI_NUM_TEST1);
HalIrqSendIpi(CPUID_TO_AFFI_MASK(ArchCurrCpuid()), HWI_NUM_TEST);
#endif
LOS_TaskDelay(g_testPeriod + 1);
ICUNIT_GOTO_EQUAL(g_testCount, 0, g_testCount, EXIT);
}
EXIT:
ret = LOS_HwiDelete(HWI_NUM_TEST, NULL);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
ret = LOS_HwiDelete(HWI_NUM_TEST1, NULL);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
ret = LOS_SwtmrDelete(g_szId[0]);
ICUNIT_GOTO_NOT_EQUAL(ret, LOS_OK, ret, EXIT);
ret = LOS_SwtmrDelete(g_szId[1]);
ICUNIT_GOTO_NOT_EQUAL(ret, LOS_OK, ret, EXIT);
return LOS_OK;
}
VOID ItSmpLosHwi012(VOID)
{
TEST_ADD_CASE("ItSmpLosHwi012", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static VOID SwtmrF01(void)
{
LOS_AtomicInc(&g_testCount);
}
static VOID HwiF01(void)
{
UINT32 ret, i;
for (i = 0; i < TRandom() % 100; i++) { // Get a random number between 0 and 100
}
ret = LOS_SwtmrDelete(g_swTmrID);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_OK, ret);
TestDumpCpuid();
return;
}
static UINT32 Testcase(void)
{
UINT32 ret, i, j;
g_testCount = 0;
g_testPeriod = 10; // 10, Timeout interval of a periodic software timer.
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK((ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM)); // other cpu
for (i = 0; i < LOOP; i++) {
ret = LOS_SwtmrCreate(g_testPeriod, LOS_SWTMR_MODE_PERIOD, (SWTMR_PROC_FUNC)SwtmrF01, &g_swTmrID, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
TestHwiTrigger(HWI_NUM_TEST); // delete swtmr in hwi on other cpu
for (j = 0; j < TRandom() % 500; j++) { // Get a random number between 0 and 500
LOS_SwtmrStart(g_swTmrID); // start swtmr in task on current cpu
}
LOS_TaskDelay(g_testPeriod + 1);
ICUNIT_GOTO_EQUAL(g_testCount, 0, g_testCount, EXIT);
}
EXIT:
ret = LOS_HwiDelete(HWI_NUM_TEST, NULL);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
ret = LOS_SwtmrDelete(g_swTmrID);
ICUNIT_GOTO_NOT_EQUAL(ret, LOS_OK, ret, EXIT);
return LOS_OK;
}
VOID ItSmpLosHwi013(VOID)
{
TEST_ADD_CASE("ItSmpLosHwi013", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static UINT32 g_targetCpuid;
static VOID HwiF01(void)
{
LOS_AtomicInc(&g_testCount);
TestDumpCpuid();
ICUNIT_GOTO_EQUAL(ArchCurrCpuid(), g_targetCpuid, ArchCurrCpuid(), EXIT);
return;
EXIT:
TEST_HwiDelete(HWI_NUM_INT11);
return;
}
static VOID TaskF01(void)
{
HalIrqUnmask(HWI_NUM_INT11);
return;
}
static UINT32 Testcase(void)
{
TSK_INIT_PARAM_S testTask;
UINT32 ret, testid;
UINT32 i;
g_testCount = 0;
g_targetCpuid = 0;
HalIrqUnmask(HWI_NUM_INT11);
ret = LOS_HwiCreate(HWI_NUM_INT11, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {
TEST_TASK_PARAM_INIT_AFFI(testTask, "it_hwi_001_task", TaskF01, TASK_PRIO_TEST - 1,
CPUID_TO_AFFI_MASK((ArchCurrCpuid() + i + 1) %
LOSCFG_KERNEL_CORE_NUM)); // let current cpu 's task create at the last
ret = LOS_TaskCreate(&testid, &testTask);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
}
g_targetCpuid = ArchCurrCpuid(); // currernt cpu
PRINT_DEBUG("g_targetCpuid = %d\n", g_targetCpuid);
LOS_TaskDelay(1);
HalIrqSendIpi(g_targetCpuid + 1, HWI_NUM_INT11); // 01:0kernel,10:1kernel,11:0kernel& 1kernel
LOS_TaskDelay(1);
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);
EXIT:
TEST_HwiDelete(HWI_NUM_INT11);
return LOS_OK;
}
VOID ItSmpLosHwiIpi001(VOID)
{
TEST_ADD_CASE("ItSmpLosHwiIpi001", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static UINT32 g_targetCpuid;
static VOID HwiF01(void)
{
LOS_AtomicInc(&g_testCount);
TestDumpCpuid();
ICUNIT_ASSERT_EQUAL_VOID(ArchCurrCpuid(), g_targetCpuid, ArchCurrCpuid());
}
static VOID TaskF01(void)
{
HalIrqUnmask(HWI_NUM_INT11);
return;
}
static UINT32 Testcase(void)
{
TSK_INIT_PARAM_S testTask;
UINT32 ret, testid;
UINT32 i;
g_testCount = 0;
g_targetCpuid = 0;
ret = LOS_HwiCreate(HWI_NUM_INT11, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
HalIrqUnmask(HWI_NUM_INT11);
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {
TEST_TASK_PARAM_INIT_AFFI(testTask, "it_hwi_001_task", TaskF01, TASK_PRIO_TEST - 1,
CPUID_TO_AFFI_MASK((ArchCurrCpuid() + i + 1) %
LOSCFG_KERNEL_CORE_NUM)); // let current cpu 's task create at the last
ret = LOS_TaskCreate(&testid, &testTask);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
}
g_targetCpuid = (ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM; // other cpu
PRINT_DEBUG("g_targetCpuid = %d\n", g_targetCpuid);
LOS_TaskDelay(1);
HalIrqSendIpi(g_targetCpuid + 1, HWI_NUM_INT11);
LOS_TaskDelay(1);
TEST_HwiDelete(HWI_NUM_INT11);
ICUNIT_ASSERT_EQUAL(g_testCount, 1, g_testCount);
return LOS_OK;
}
VOID ItSmpLosHwiIpi002(VOID)
{
TEST_ADD_CASE("ItSmpLosHwiIpi002", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static UINT32 g_targetCpuid;
static VOID HwiF01(void)
{
LOS_AtomicInc(&g_testCount);
TestDumpCpuid();
ICUNIT_ASSERT_EQUAL_VOID(ArchCurrCpuid(), g_targetCpuid, ArchCurrCpuid());
}
static VOID TaskF01(void)
{
HalIrqUnmask(HWI_NUM_INT11);
PRINT_DEBUG("g_targetCpuid = %d\n", g_targetCpuid);
HalIrqSendIpi(g_targetCpuid + 1, HWI_NUM_INT11);
return;
}
static UINT32 Testcase(void)
{
TSK_INIT_PARAM_S testTask;
UINT32 ret, testid, currCpuid;
UINT32 i;
g_testCount = 0;
g_targetCpuid = 0;
ret = LOS_HwiCreate(HWI_NUM_INT11, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
HalIrqUnmask(HWI_NUM_INT11);
currCpuid = (ArchCurrCpuid() + 1) % (LOSCFG_KERNEL_CORE_NUM);
g_targetCpuid = currCpuid; // other cpu
TEST_TASK_PARAM_INIT_AFFI(testTask, "it_hwi_001_task", TaskF01, TASK_PRIO_TEST - 1, CPUID_TO_AFFI_MASK(currCpuid));
ret = LOS_TaskCreate(&testid, &testTask);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
LOS_TaskDelay(10); // 10, set delay time
ICUNIT_ASSERT_EQUAL(g_testCount, 1, g_testCount);
TEST_HwiDelete(HWI_NUM_INT11);
return LOS_OK;
}
VOID ItSmpLosHwiIpi003(VOID)
{
TEST_ADD_CASE("ItSmpLosHwiIpi003", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static UINT32 g_targetCpuid;
static VOID HwiF01(void)
{
LOS_AtomicInc(&g_testCount);
TestDumpCpuid();
ICUNIT_ASSERT_EQUAL_VOID(ArchCurrCpuid(), g_targetCpuid, ArchCurrCpuid());
}
static VOID TaskF01(void)
{
HalIrqUnmask(HWI_NUM_INT11);
PRINT_DEBUG("g_targetCpuid = %d\n", g_targetCpuid);
HalIrqSendIpi(g_targetCpuid + 1, HWI_NUM_INT11);
return;
}
static UINT32 Testcase(void)
{
TSK_INIT_PARAM_S testTask;
UINT32 ret, testid, currCpuid;
UINT32 i;
g_testCount = 0;
g_targetCpuid = 0;
ret = LOS_HwiCreate(HWI_NUM_INT11, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
HalIrqUnmask(HWI_NUM_INT11);
currCpuid = (ArchCurrCpuid() + 1) % (LOSCFG_KERNEL_CORE_NUM); // other cpu
g_targetCpuid = ArchCurrCpuid();
TEST_TASK_PARAM_INIT_AFFI(testTask, "it_hwi_001_task", TaskF01, TASK_PRIO_TEST - 1, CPUID_TO_AFFI_MASK(currCpuid));
ret = LOS_TaskCreate(&testid, &testTask);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
LOS_TaskDelay(10); // 10, set delay time
ICUNIT_ASSERT_EQUAL(g_testCount, 1, g_testCount);
TEST_HwiDelete(HWI_NUM_INT11);
return LOS_OK;
}
VOID ItSmpLosHwiIpi004(VOID)
{
TEST_ADD_CASE("ItSmpLosHwiIpi004", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static UINT32 g_targetCpuid;
static VOID HwiF01(void)
{
LOS_AtomicInc(&g_testCount);
TestDumpCpuid();
return;
EXIT:
TEST_HwiDelete(HWI_NUM_INT11);
return;
}
static VOID TaskF01(void)
{
HalIrqUnmask(HWI_NUM_INT11);
return;
}
static UINT32 Testcase(void)
{
TSK_INIT_PARAM_S testTask;
UINT32 ret, testid;
UINT32 i;
g_testCount = 0;
g_targetCpuid = 0;
HalIrqUnmask(HWI_NUM_INT11);
ret = LOS_HwiCreate(HWI_NUM_INT11, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {
TEST_TASK_PARAM_INIT_AFFI(testTask, "it_hwi_001_task", TaskF01, TASK_PRIO_TEST - 1,
CPUID_TO_AFFI_MASK((ArchCurrCpuid() + i + 1) %
LOSCFG_KERNEL_CORE_NUM)); // let current cpu 's task create at the last
ret = LOS_TaskCreate(&testid, &testTask);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
}
g_targetCpuid = (1 << LOSCFG_KERNEL_CORE_NUM) - 1; // all cpu
PRINT_DEBUG("g_targetCpuid = %d\n", g_targetCpuid);
LOS_TaskDelay(1);
HalIrqSendIpi(g_targetCpuid, HWI_NUM_INT11);
LOS_TaskDelay(1);
ICUNIT_GOTO_EQUAL(g_testCount, LOSCFG_KERNEL_CORE_NUM, g_testCount, EXIT);
EXIT:
TEST_HwiDelete(HWI_NUM_INT11);
return LOS_OK;
}
VOID ItSmpLosHwiIpi005(VOID)
{
TEST_ADD_CASE("ItSmpLosHwiIpi005", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static UINT32 g_targetCpuid;
static UINT32 g_szId[LOSCFG_KERNEL_CORE_NUM] = {0};
static VOID SwtmrF01(void)
{
LOS_AtomicInc(&g_testCount);
}
static VOID HwiF01(void)
{
UINT32 ret, index;
index = ArchCurrCpuid();
ret = LOS_SwtmrCreate(g_testPeriod, LOS_SWTMR_MODE_PERIOD, (SWTMR_PROC_FUNC)SwtmrF01, &g_szId[index], 0);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
LOS_AtomicInc(&g_testCount);
TestDumpCpuid();
return;
EXIT:
TEST_HwiDelete(HWI_NUM_INT11);
return;
}
static VOID TaskF01(void)
{
HalIrqUnmask(HWI_NUM_INT11);
return;
}
static UINT32 Testcase(void)
{
TSK_INIT_PARAM_S testTask;
UINT32 ret, testid;
UINT32 i, j;
g_testCount = 0;
g_testPeriod = 10; // 10, Timeout interval of a periodic software timer.
g_targetCpuid = 0;
HalIrqUnmask(HWI_NUM_INT11);
g_targetCpuid = (1 << LOSCFG_KERNEL_CORE_NUM) - 1; // all cpu
ret = LOS_HwiCreate(HWI_NUM_INT11, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {
TEST_TASK_PARAM_INIT_AFFI(testTask, "it_hwi_001_task", TaskF01, TASK_PRIO_TEST - 1,
CPUID_TO_AFFI_MASK((ArchCurrCpuid() + i + 1) %
LOSCFG_KERNEL_CORE_NUM)); // let current cpu 's task create at the last
ret = LOS_TaskCreate(&testid, &testTask);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
}
LOS_TaskDelay(1);
for (j = 0; j < LOOP; j++) {
HalIrqSendIpi(g_targetCpuid, HWI_NUM_INT11);
LOS_TaskDelay(1);
ICUNIT_GOTO_EQUAL(g_testCount, LOSCFG_KERNEL_CORE_NUM * (j + 1), g_testCount, EXIT);
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {
ret = LOS_SwtmrDelete(g_szId[i]);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
}
}
TEST_HwiDelete(HWI_NUM_INT11);
return LOS_OK;
EXIT:
TEST_HwiDelete(HWI_NUM_INT11);
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {
LOS_SwtmrDelete(g_szId[i]);
}
return LOS_OK;
}
VOID ItSmpLosHwiIpi006(VOID)
{
TEST_ADD_CASE("ItSmpLosHwiIpi006", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 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 "It_smp_hwi.h"
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
#if (LOSCFG_KERNEL_SMP == YES)
static UINT32 g_targetCpuid;
/* for debugging */
STATIC UINT32 g_ipiTriggerTimes = 0;
STATIC UINT32 g_ipiRecieveTimes[LOSCFG_KERNEL_CORE_NUM] = { 0 };
static UINT32 g_szId[LOSCFG_KERNEL_CORE_NUM] = {0};
static VOID SwtmrF01(void)
{
LOS_AtomicInc(&g_testCount);
}
static VOID HwiF01(void)
{
UINT32 ret, index;
index = ArchCurrCpuid();
g_ipiRecieveTimes[index]++;
ret = LOS_SwtmrDelete(g_szId[index]);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
LOS_AtomicInc(&g_testCount);
TestDumpCpuid();
return;
EXIT:
TEST_HwiDelete(HWI_NUM_INT11);
return;
}
static VOID TaskF01(void)
{
HalIrqUnmask(HWI_NUM_INT11);
return;
}
static UINT32 Testcase(void)
{
TSK_INIT_PARAM_S testTask;
UINT32 ret, testid;
UINT32 i, j;
g_testCount = 0;
g_testPeriod = 10; // 10, Timeout interval of a periodic software timer.
g_targetCpuid = 0;
HalIrqUnmask(HWI_NUM_INT11);
g_targetCpuid = (1 << LOSCFG_KERNEL_CORE_NUM) - 1; // all cpu
ret = LOS_HwiCreate(HWI_NUM_INT11, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {
TEST_TASK_PARAM_INIT_AFFI(testTask, "it_hwi_001_task", TaskF01, TASK_PRIO_TEST - 1,
CPUID_TO_AFFI_MASK((ArchCurrCpuid() + i + 1) %
LOSCFG_KERNEL_CORE_NUM)); // let current cpu 's task create at the last
ret = LOS_TaskCreate(&testid, &testTask);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
}
LOS_TaskDelay(1);
for (j = 0; j < LOOP; j++) {
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {
ret = LOS_SwtmrCreate(g_testPeriod, LOS_SWTMR_MODE_PERIOD, (SWTMR_PROC_FUNC)SwtmrF01, &g_szId[i], 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
}
g_ipiTriggerTimes++;
HalIrqSendIpi(g_targetCpuid, HWI_NUM_INT11);
LOS_TaskDelay(1);
PRINTK("sent %u time\n", g_ipiTriggerTimes);
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {
PRINTK(" cpu%d recieved %u times\n", i, g_ipiRecieveTimes[i]);
}
ICUNIT_GOTO_EQUAL(g_testCount, LOSCFG_KERNEL_CORE_NUM * (j + 1), g_testCount, EXIT);
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {
ret = LOS_SwtmrDelete(g_szId[i]);
ICUNIT_ASSERT_NOT_EQUAL(ret, LOS_OK, ret);
}
}
TEST_HwiDelete(HWI_NUM_INT11);
return LOS_OK;
EXIT:
TEST_HwiDelete(HWI_NUM_INT11);
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {
PRINT_DEBUG("---%d---\n", g_szId[i]);
LOS_SwtmrDelete(g_szId[i]);
}
return LOS_OK;
}
VOID ItSmpLosHwiIpi007(VOID)
{
TEST_ADD_CASE("ItSmpLosHwiIpi007", Testcase, TEST_LOS, TEST_HWI, TEST_LEVEL1, TEST_FUNCTION);
}
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cpluscplus */
#endif /* __cpluscplus */
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册