Pre Merge pull request !1100 from Peshkov Ivan/master
This commit is contained in:
commit
270cd2fc2b
|
@ -52,7 +52,7 @@
|
|||
|
||||
.macro SIGNAL_CONTEXT_RESTORE
|
||||
push {r12, lr}
|
||||
blx OsSignalTaskContextRestore
|
||||
bl OsSignalTaskContextRestore
|
||||
pop {r12, lr}
|
||||
cmp r0, #0
|
||||
mov r1, r0
|
||||
|
@ -162,7 +162,7 @@ HalTaskSwitch:
|
|||
SIGNAL_CONTEXT_RESTORE
|
||||
|
||||
push {r12, lr}
|
||||
blx OsSchedTaskSwitch
|
||||
bl OsSchedTaskSwitch
|
||||
pop {r12, lr}
|
||||
cmp r0, #0
|
||||
mov r0, lr
|
||||
|
|
|
@ -127,7 +127,7 @@ Description: initialization of CPUP Daemon
|
|||
Input : None
|
||||
Return : LOS_OK or Error Information
|
||||
*****************************************************************************/
|
||||
LITE_OS_SEC_TEXT_INIT UINT32 OsCpupDaemonInit()
|
||||
LITE_OS_SEC_TEXT_INIT UINT32 OsCpupDaemonInit(void)
|
||||
{
|
||||
#if (LOSCFG_BASE_CORE_SWTMR == 1)
|
||||
(VOID)OsCpupGuardCreator();
|
||||
|
@ -144,7 +144,7 @@ Description: initialization of CPUP
|
|||
Input : None
|
||||
Return : LOS_OK or Error Information
|
||||
*****************************************************************************/
|
||||
LITE_OS_SEC_TEXT_INIT UINT32 OsCpupInit()
|
||||
LITE_OS_SEC_TEXT_INIT UINT32 OsCpupInit(void)
|
||||
{
|
||||
UINT32 size;
|
||||
CHAR *cpupMem = NULL;
|
||||
|
|
|
@ -208,8 +208,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_EventDestroy(&g_eventCB3);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
return LOS_OK;
|
||||
|
||||
// cleanup resources after tests
|
||||
EXIT:
|
||||
LOS_SwtmrDelete(g_swtmrId3);
|
||||
LOS_SwtmrDelete(g_swtmrId2);
|
||||
|
|
|
@ -119,9 +119,19 @@ LITE_TEST_CASE(PosixMathFuncTestSuite, testMathAbs001, Function | MediumTest | L
|
|||
*/
|
||||
LITE_TEST_CASE(PosixMathFuncTestSuite, testMathAbs002, Function | MediumTest | Level1)
|
||||
{
|
||||
// the first case ( abs(-2147483648) ) is UB
|
||||
// quote from "man abs": "Trying to take the absolute value of the most negative integer is not defined."
|
||||
// so this case is disabled for non-GCC toolchains
|
||||
#ifdef LOSCFG_COMPILER_GCC
|
||||
const int testCount = 3;
|
||||
int testValues[] = {-2147483648, -2147483647, 2147483647};
|
||||
int expected[] = {-2147483648, 2147483647, 2147483647};
|
||||
#else
|
||||
const int testCount = 2;
|
||||
int testValues[] = {-2147483647, 2147483647};
|
||||
int expected[] = {2147483647, 2147483647};
|
||||
#endif
|
||||
|
||||
int ret;
|
||||
for (int i = 0; i < testCount; ++i) {
|
||||
ret = abs(testValues[i]);
|
||||
|
|
|
@ -355,7 +355,7 @@ LITE_TEST_CASE(MqueueFuncTestSuite, TestMqOpenENOSPC, Function | MediumTest | Le
|
|||
*/
|
||||
LITE_TEST_CASE(MqueueFuncTestSuite, TestMqCloseEBADF, Function | MediumTest | Level2)
|
||||
{
|
||||
ICUNIT_TRACK_EQUAL(mq_close(NULL), -1, -1);
|
||||
ICUNIT_TRACK_EQUAL(mq_close((mqd_t)NULL), -1, -1);
|
||||
ICUNIT_TRACK_EQUAL(errno, EBADF, errno);
|
||||
return 0;
|
||||
}
|
||||
|
@ -411,7 +411,7 @@ LITE_TEST_CASE(MqueueFuncTestSuite, TestMqSendEBADFEMSGSIZE, Function | MediumTe
|
|||
queue = mq_open(qName, O_CREAT | O_RDWR | O_NONBLOCK, S_IRUSR | S_IWUSR, &attr);
|
||||
ICUNIT_ASSERT_NOT_EQUAL(queue, (mqd_t)-1, queue);
|
||||
|
||||
ret = mq_send(NULL, MQ_MSG, 1, MQ_MSG_PRIO);
|
||||
ret = mq_send((mqd_t)NULL, MQ_MSG, 1, MQ_MSG_PRIO);
|
||||
ICUNIT_TRACK_EQUAL(ret, -1, ret);
|
||||
ICUNIT_TRACK_EQUAL(errno, EBADF, errno);
|
||||
|
||||
|
|
Loading…
Reference in New Issue