Compare commits

...

4 Commits

Author SHA1 Message Date
openharmony_ci
9c71de6a2e !1158 Fix : 部件化需求整改
Merge pull request !1158 from yinjiaming/bundle
2023-05-05 08:33:35 +00:00
openharmony_ci
243b1e26a4 !1159 test:修复llvm升级导致tdd用例部分失败问题
Merge pull request !1159 from zhangdengyu/fixLlvmBug0428
2023-05-05 05:14:54 +00:00
yinjiaming
47a4fe030b fix:部件需求整改
修复了脚本扫描出的bundle.json的问题,整改了
不符合规范的路径引用

Signed-off-by: yinjiaming <yinjiaming@huawei.com>
Change-Id: I11c321f8707d3e44dd7ee40dac35cf99907fb864
2023-05-04 11:32:59 +08:00
zhangdengyu
577d29aaba test: 修复llvm升级导致tdd用例部分失败问题
方案描述:
1、llvm升级之后对while(1)死循环和给空指针赋值的场景有错误优化的情况;
   用例中在相关函数之前添加__attribute__((optnone))禁止编译器进行错误优化。

Close:#I6V2LN

Signed-off-by: zhangdengyu <zhangdengyu2@huawei.com>
Change-Id: Ic7150909c12a599aeeb0a55b983dfad7a0631cdc
2023-05-04 09:42:38 +08:00
14 changed files with 44 additions and 44 deletions

View File

@@ -73,5 +73,5 @@ executable("sample_usr_lms") {
"-Wl,--wrap=strcpy",
"-Wl,--wrap=strcat",
]
deps = [ "//kernel/liteos_a/kernel/extended/lms/usr:usrlmslib" ]
deps = [ "$LITEOSTOPDIR/kernel/extended/lms/usr:usrlmslib" ]
}

View File

@@ -28,15 +28,15 @@
"name": "liteos_a",
"subsystem": "kernel",
"syscap": [
"SystemCapability.Kernel.liteos-a"
"SystemCapability.Kernel.Liteos-A"
],
"features": [],
"adated_system_type": [
"adapted_system_type": [
"small"
],
"rom": "1.5MB",
"ram": "2MB",
"deps": {
"external_deps": {
"components": [
],
"third_party": [

View File

@@ -34,11 +34,8 @@ module_switch = defined(LOSCFG_FS_VFS)
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"$LITEOSTOPDIR/fs/vfs/epoll/fs_epoll.c",
"$LITEOSTOPDIR/fs/vfs/mount.c",
"$LITEOSTOPDIR/fs/vfs/path_cache.c",
"$LITEOSTOPDIR/fs/vfs/vnode.c",
"$LITEOSTOPDIR/fs/vfs/vnode_hash.c",
"epoll/fs_epoll.c",
"mount.c",
"operation/fullpath.c",
"operation/vfs_chattr.c",
"operation/vfs_check.c",
@@ -55,7 +52,10 @@ kernel_module(module_name) {
"operation/vfs_readv.c",
"operation/vfs_utime.c",
"operation/vfs_writev.c",
"path_cache.c",
"vfs_cmd/vfs_shellcmd.c",
"vnode.c",
"vnode_hash.c",
]
sources += NUTTX_FS_DIRENT_SRC_FILES
sources += NUTTX_FS_DRIVER_SRC_FILES

View File

@@ -39,21 +39,21 @@ declare_args() {
config("liteos_kernel_test_public") {
cflags = [ "-Wno-error" ]
include_dirs = [
"//kernel/liteos_a/kernel/include",
"//kernel/liteos_a/kernel/base/include",
"//kernel/liteos_a/kernel/common",
"//kernel/liteos_a/arch/arm/arm/include",
"//kernel/liteos_a/arch/arm/include",
"//kernel/liteos_a/extended/include",
"$LITEOSTOPDIR/kernel/include",
"$LITEOSTOPDIR/kernel/base/include",
"$LITEOSTOPDIR/kernel/common",
"$LITEOSTOPDIR/arch/arm/arm/include",
"$LITEOSTOPDIR/arch/arm/include",
"$LITEOSTOPDIR/extended/include",
"//third_party/musl/porting/liteos_a/kernel/include",
"//third_party/bounds_checking_function/include/",
"//kernel/liteos_a/lib/libscrew/include",
"//kernel/liteos_a/fs/vfs",
"//kernel/liteos_a/fs/proc/include",
"//kernel/liteos_a/fs/jffs2/include",
"//kernel/liteos_a/fs/nfs/include",
"//kernel/liteos_a/bsd/compat/linuxkpi/include",
"//kernel/liteos_a/testsuites/kernel/include",
"$LITEOSTOPDIR/lib/libscrew/include",
"$LITEOSTOPDIR/fs/vfs",
"$LITEOSTOPDIR/fs/proc/include",
"$LITEOSTOPDIR/fs/jffs2/include",
"$LITEOSTOPDIR/fs/nfs/include",
"$LITEOSTOPDIR/bsd/compat/linuxkpi/include",
"include",
]
if (LOSCFG_TEST_KERNEL_BASE) {

View File

@@ -260,5 +260,5 @@ kernel_module("test_core") {
]
public_configs =
[ "//kernel/liteos_a/testsuites/kernel:liteos_kernel_test_public" ]
[ "$LITEOSTOPDIR/testsuites/kernel:liteos_kernel_test_public" ]
}

View File

@@ -107,5 +107,5 @@ kernel_module("test_ipc") {
]
public_configs =
[ "//kernel/liteos_a/testsuites/kernel:liteos_kernel_test_public" ]
[ "$LITEOSTOPDIR/testsuites/kernel:liteos_kernel_test_public" ]
}

View File

@@ -30,7 +30,7 @@
*/
#include "it_test_exc.h"
static int TestCase(void)
__attribute__((optnone)) static int TestCase(void)
{
int ret;
int status = 0;

View File

@@ -31,7 +31,7 @@
#include "it_test_exc.h"
#include "pthread.h"
static void *ThreadFunc2(void *arg)
__attribute__((optnone)) static void *ThreadFunc2(void *arg)
{
while (1) {
}
@@ -39,7 +39,7 @@ static void *ThreadFunc2(void *arg)
return nullptr;
}
static void *ThreadFunc1(void *arg)
__attribute__((optnone)) static void *ThreadFunc1(void *arg)
{
int *test = nullptr;
*test = 0x1;
@@ -77,7 +77,8 @@ static int TestThread(void)
return 0;
}
static int TestCase(void)
__attribute__((optnone)) static int TestCase(void)
{
int *test = nullptr;
int count = 5;

View File

@@ -34,14 +34,15 @@
#define TEST_THREAD_COUNT 5
static volatile int g_testCondFlag;
static int g_count[TEST_THREAD_COUNT];
static void *ThreadFunc2(void *arg)
__attribute__((optnone)) static void *ThreadFunc2(void *arg)
{
int count = *(int *)arg;
int *test = nullptr;
g_testCondFlag++;
while (g_testCondFlag < 2) {
while (g_testCondFlag < 2) { /* 2, no special meaning */
}
*test = 0x1;
@@ -83,7 +84,7 @@ static int TestThread(void)
return 0;
}
static int TestCase(void)
__attribute__((optnone)) static int TestCase(void)
{
int *test = nullptr;
int count = 5;

View File

@@ -33,7 +33,7 @@
#define TEST_THREAD_COUNT 5
static int TestThread(void)
__attribute__((optnone)) static int TestThread(void)
{
int ret;
int *test = nullptr; // For triggering an exceptioin
@@ -53,7 +53,7 @@ static int TestThread(void)
return 0;
}
static int TestCase(void)
__attribute__((optnone)) static int TestCase(void)
{
int count = 5;
int status = 0;

View File

@@ -30,7 +30,7 @@
*/
#include "it_test_exc.h"
static void Child(void)
__attribute__((optnone)) static void Child(void)
{
while (1) {
printf("@@@@@@@@@@@@@ pid : %d getppid : %d @@@@@@@@@@@@@@@@\n", getpid(), getppid());
@@ -41,7 +41,7 @@ static void TestKill(int sig)
exit(0);
}
static int TestCase(void)
__attribute__((optnone)) static int TestCase(void)
{
int ret;
void (*retptr)(int) = NULL;

View File

@@ -30,7 +30,7 @@
*/
#include "It_posix_queue.h"
static VOID *PthreadF01(VOID *argument)
__attribute__((optnone)) static VOID *PthreadF01(VOID *argument)
{
INT32 i;
INT32 ret;
@@ -54,7 +54,7 @@ EXIT:
return NULL;
}
static VOID *PthreadF02(VOID *argument)
__attribute__((optnone)) static VOID *PthreadF02(VOID *argument)
{
INT32 j, ret;
@@ -79,7 +79,7 @@ EXIT:
return NULL;
}
static UINT32 Testcase(VOID)
__attribute__((optnone)) static UINT32 Testcase(VOID)
{
pthread_t newTh1, newTh2;
UINT32 ret;

View File

@@ -53,7 +53,6 @@ EXIT:
static UINT32 Testcase(VOID)
{
INT32 ret;
UINT32 uret;
CHAR mqname[MQUEUE_STANDARD_NAME_LENGTH] = "";
const CHAR *msgptr = MQUEUE_SEND_STRING_TEST;
pthread_t pthread1;
@@ -92,7 +91,6 @@ static UINT32 Testcase(VOID)
ICUNIT_GOTO_EQUAL(ret, MQUEUE_NO_ERROR, ret, EXIT2);
usleep(0);
ICUNIT_GOTO_EQUAL(uret, MQUEUE_NO_ERROR, uret, EXIT2);
ret = pthread_join(pthread1, NULL);
ICUNIT_GOTO_EQUAL(ret, MQUEUE_NO_ERROR, ret, EXIT2);

View File

@@ -32,19 +32,19 @@
static const int TEST_COUNT = 10;
static void *ThreadFunc2(void *arg)
__attribute__((optnone)) static void *ThreadFunc2(void *arg)
{
printf("111111111111111: exit\n");
exit(254); // 254, exit args
}
static void *ThreadFunc3(void *arg)
__attribute__((optnone)) static void *ThreadFunc3(void *arg)
{
while (1) {
}
}
static int ProcessTest001(void)
__attribute__((optnone)) static int ProcessTest001(void)
{
int ret;
int status;
@@ -81,7 +81,7 @@ static int ProcessTest001(void)
return 0;
}
static int Testcase(void)
__attribute__((optnone)) static int Testcase(void)
{
int ret;
int status;