fix: iccarm test's problem fix
close: #I5T02Y Signed-off-by: arvinzzz <zhaotianyu9@huawei.com> Change-Id: I29385bb25f487adafa2dbc064310817790d831bb
This commit is contained in:
parent
b8f8ab5a36
commit
0f952132c0
|
@ -86,10 +86,6 @@ optimize_config_cflags = []
|
|||
optimize_config_asmflags = []
|
||||
|
||||
if (defined(LOSCFG_COMPILE_DEBUG)) {
|
||||
optimize_config_cflags += [
|
||||
"-g",
|
||||
"-gdwarf-2",
|
||||
]
|
||||
optimize_config_cflags += [ "-On" ]
|
||||
} else {
|
||||
if (defined(LOSCFG_COMPILE_OPTIMIZE)) {
|
||||
|
@ -118,12 +114,14 @@ kconfig_config_cflags += [
|
|||
warn_config_cflags = []
|
||||
warn_config_asmflags = []
|
||||
|
||||
warn_config_cflags += [
|
||||
"--warnings_affect_exit_code",
|
||||
"--warnings_are_errors",
|
||||
"--warn_about_c_style_casts",
|
||||
"--warn_about_incomplete_constructors",
|
||||
]
|
||||
if (!defined(LOSCFG_TEST)) {
|
||||
warn_config_cflags += [
|
||||
"--warnings_affect_exit_code",
|
||||
"--warnings_are_errors",
|
||||
"--warn_about_c_style_casts",
|
||||
"--warn_about_incomplete_constructors",
|
||||
]
|
||||
}
|
||||
|
||||
#
|
||||
# dialect_config
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2022 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:
|
||||
|
@ -340,6 +340,7 @@ typedef struct tagHwiHandleForm {
|
|||
#define TEST_HwiCreate(ID, prio, mode, Func, irqParam) LOS_HwiCreate(ID, prio, mode, Func, irqParam)
|
||||
#define uart_printf_func printf
|
||||
|
||||
extern VOID ItSuiteLosAtomic(void);
|
||||
extern VOID ItSuiteLosTask(void);
|
||||
extern VOID ItSuiteLosQueue(void);
|
||||
extern VOID ItSuiteLosMux(void);
|
||||
|
|
|
@ -101,14 +101,14 @@ LITE_TEST_CASE(CmsisFuncTestSuite, TestCmsis007, Function | MediumTest | Level1)
|
|||
msgQueueId = osMessageQueueNew(1, strlen(strbuff), &attr);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(msgQueueId, NULL, msgQueueId);
|
||||
|
||||
name = osMessageQueueGetName(msgQueueId);
|
||||
name = (CHAR *)osMessageQueueGetName(msgQueueId);
|
||||
ret = strcmp(name, "q1");
|
||||
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
|
||||
|
||||
ret = osMessageQueueDelete(msgQueueId);
|
||||
ICUNIT_ASSERT_EQUAL(ret, osOK, ret);
|
||||
|
||||
name = osMessageQueueGetName(msgQueueId);
|
||||
name = (CHAR *)osMessageQueueGetName(msgQueueId);
|
||||
ICUNIT_ASSERT_EQUAL(name, NULL, name);
|
||||
|
||||
#if (LOSCFG_BASE_IPC_QUEUE_STATIC == 1)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2022 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:
|
||||
|
@ -56,6 +56,8 @@ extern VOID ItLosAtomic006(VOID);
|
|||
extern VOID ItLosAtomic007(VOID);
|
||||
extern VOID ItLosAtomic008(VOID);
|
||||
extern VOID ItLosAtomic009(VOID);
|
||||
extern VOID ItLosAtomic010(VOID);
|
||||
extern VOID ItLosAtomic011(VOID);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2022 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:
|
||||
|
@ -55,7 +55,7 @@ static VOID TaskF01(VOID)
|
|||
atomicRet = LOS_AtomicAdd(&atomicTestCounter, 0x77777777);
|
||||
ICUNIT_ASSERT_EQUAL_VOID(atomicRet, 0x22222221, atomicRet);
|
||||
readCounter = LOS_AtomicRead(&atomicTestCounter);
|
||||
ICUNIT_ASSERT_EQUAL(readCounter, 0x22222221, readCounter);
|
||||
ICUNIT_ASSERT_EQUAL_VOID(readCounter, 0x22222221, readCounter);
|
||||
|
||||
LOS_AtomicSet(&atomicTestCounter, 0xdddddddd);
|
||||
atomicRet = LOS_AtomicSub(&atomicTestCounter, 0x99999999);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2022 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:
|
||||
|
@ -69,7 +69,7 @@ static UINT32 Testcase(VOID)
|
|||
|
||||
g_testCount1 = 0;
|
||||
// 1, Timeout interval of a periodic software timer.
|
||||
ret = LOS_SwtmrCreate(1, LOS_SWTMR_MODE_ONCE, (SWTMR_PROC_FUNC)Case2, &g_swtmrId1, &irqParam
|
||||
ret = LOS_SwtmrCreate(1, LOS_SWTMR_MODE_ONCE, (SWTMR_PROC_FUNC)Case2, &g_swtmrId1, (UINT32)&irqParam
|
||||
#if (LOSCFG_BASE_CORE_SWTMR_ALIGN == 1)
|
||||
, OS_SWTMR_ROUSES_ALLOW, OS_SWTMR_ALIGN_INSENSITIVE
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2022 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:
|
||||
|
@ -71,7 +71,7 @@ static VOID TaskF01(VOID)
|
|||
#ifdef __RISC_V__
|
||||
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
|
||||
#else
|
||||
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 1);
|
||||
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, (HwiIrqParam *)1);
|
||||
#endif
|
||||
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_OK, ret);
|
||||
|
||||
|
|
|
@ -31,7 +31,9 @@
|
|||
#include <securec.h>
|
||||
#include "osTest.h"
|
||||
#include "pthread.h"
|
||||
#include "time.h"
|
||||
|
||||
#undef TASK_PRIO_TEST
|
||||
#define TASK_PRIO_TEST LOSCFG_BASE_CORE_TSK_DEFAULT_PRIO
|
||||
#define OS_TSK_TEST_STACK_SIZE 0x1000
|
||||
#define PTHREAD_TASK_DELAY 10
|
||||
|
@ -582,10 +584,10 @@ LITE_TEST_CASE(PthreadFuncTestSuite, TestPthread008, Function | MediumTest | Lev
|
|||
int result = 0;
|
||||
UINT32 ret;
|
||||
|
||||
ret = pthread_key_create(&g_pthreadKey1, pthreadKeyFree);
|
||||
ret = pthread_key_create((pthread_key_t *)&g_pthreadKey1, pthreadKeyFree);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
|
||||
ret = pthread_key_create(&g_pthreadKey2, pthreadKeyFree);
|
||||
ret = pthread_key_create((pthread_key_t *)&g_pthreadKey2, pthreadKeyFree);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
|
||||
ret = pthread_attr_init(&attr);
|
||||
|
@ -657,7 +659,7 @@ LITE_TEST_CASE(PthreadFuncTestSuite, TestPthread009, Function | MediumTest | Lev
|
|||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
|
||||
for (i = 0; i < TEST_THREAD_COUNT; i++) {
|
||||
ret = pthread_create(&thread[i], &attr, PthreadPrioFunc01, TEST_THREAD_COUNT - i);
|
||||
ret = pthread_create(&thread[i], &attr, PthreadPrioFunc01, (void *)(TEST_THREAD_COUNT - i));
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
|
||||
# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
|
||||
# Copyright (c) 2020-2022 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:
|
||||
|
@ -27,6 +27,7 @@
|
|||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
import("//test/xts/tools/lite/build/suite_lite.gni")
|
||||
|
||||
static_library("posix_test") {
|
||||
|
@ -65,6 +66,11 @@ static_library("posix_test") {
|
|||
"src",
|
||||
]
|
||||
|
||||
cflags = [ "-Wno-error" ]
|
||||
if (!defined(LOSCFG_COMPILER_ICCARM)) {
|
||||
cflags = [ "-Wno-error" ]
|
||||
} else {
|
||||
cflags = [ "--no_warnings" ]
|
||||
}
|
||||
|
||||
configs += [ "//kernel/liteos_m/testsuites:include" ]
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2022 Huawei Device Co., Ltd. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -43,7 +43,8 @@
|
|||
#include "log.h"
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
#include "sys/stat.h"
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* *
|
||||
* @tc.desc : register a test suite, this suite is used to test basic flow and interface dependency
|
||||
|
@ -1072,7 +1073,7 @@ LITE_TEST_CASE(PosixFsFuncTestSuite, testFsFreadFwrite003, Function | MediumTest
|
|||
fp = fopen(TEST_FILE_PTAH_RIGHT, "r");
|
||||
TEST_ASSERT_NOT_NULL(fp);
|
||||
|
||||
ret = fread(chr1, strlen(chr1) + 1, 1, fp);
|
||||
ret = fread((void *)chr1, strlen(chr1) + 1, 1, fp);
|
||||
TEST_ASSERT_TRUE(ret != -1);
|
||||
|
||||
ret = fclose(fp);
|
||||
|
|
|
@ -44,7 +44,9 @@
|
|||
#define Function 0
|
||||
#define MediumTest 0
|
||||
#define Level1 0
|
||||
#define LITE_TEST_SUIT(subsystem, module, testsuit)
|
||||
#define LITE_TEST_CASE(module, function, flag) static int function(void)
|
||||
#define RUN_TEST_SUITE(testsuit)
|
||||
|
||||
#define TEST_ASSERT_EQUAL(expected, actual) ICUNIT_ASSERT_EQUAL(expected, actual, actual)
|
||||
#define TEST_ASSERT_EQUAL_INT(expected, actual) TEST_ASSERT_EQUAL(expected, actual)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2022 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:
|
||||
|
@ -210,6 +210,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStrStrcspn002, Function | MediumTes
|
|||
return 0;
|
||||
};
|
||||
|
||||
#ifndef LOSCFG_COMPILER_ICCARM
|
||||
/* *
|
||||
* @tc.number : SUB_KERNEL_POSIX_strptime_OPERATION_001
|
||||
* @tc.name : Memony operation for strptime test
|
||||
|
@ -228,6 +229,7 @@ LITE_TEST_CASE(PosixStringFuncTestSuite, testStrStrptime001, Function | MediumTe
|
|||
TEST_ASSERT_EQUAL_INT(tmData.tm_min, 24);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
RUN_TEST_SUITE(PosixStringFuncTestSuite);
|
||||
|
@ -242,7 +244,9 @@ void PosixStringFuncTest03()
|
|||
RUN_ONE_TESTCASE(testStrStrdup002);
|
||||
RUN_ONE_TESTCASE(testStrStrcspn001);
|
||||
RUN_ONE_TESTCASE(testStrStrcspn002);
|
||||
#ifndef LOSCFG_COMPILER_ICCARM
|
||||
RUN_ONE_TESTCASE(testStrStrptime001);
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
Loading…
Reference in New Issue