!248 fix: fix length typo
Merge pull request !248 from kenneth/los_queue.h
This commit is contained in:
commit
3f16f1684a
|
@ -49,7 +49,7 @@ extern "C" {
|
|||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define MAX_LFNAME_LENTH 256
|
||||
#define MAX_LFNAME_LENGTH 256
|
||||
#define LABEL_LEN 12
|
||||
#define FAT_RESERVED_NUM 2
|
||||
#define FAT32_MAXSIZE 0x100000000
|
||||
|
|
|
@ -215,7 +215,7 @@ static FRESULT FatfsScanClear(INT vol)
|
|||
FRESULT ret;
|
||||
DIR dir;
|
||||
FILINFO fno;
|
||||
CHAR path[MAX_LFNAME_LENTH];
|
||||
CHAR path[MAX_LFNAME_LENGTH];
|
||||
INT num;
|
||||
INT res;
|
||||
|
||||
|
@ -224,7 +224,7 @@ static FRESULT FatfsScanClear(INT vol)
|
|||
|
||||
(void)memset_s(path, sizeof(path), 0, sizeof(path));
|
||||
|
||||
res = snprintf_s(path, MAX_LFNAME_LENTH, MAX_LFNAME_LENTH - 1, "%d:/", vol);
|
||||
res = snprintf_s(path, MAX_LFNAME_LENGTH, MAX_LFNAME_LENGTH - 1, "%d:/", vol);
|
||||
if (res < 0) {
|
||||
return FR_INVALID_NAME;
|
||||
}
|
||||
|
@ -274,13 +274,13 @@ static FRESULT FatfsScanClear(INT vol)
|
|||
static FRESULT FatfsBuildEntry(FATFS *fat, INT vol)
|
||||
{
|
||||
UINT i;
|
||||
CHAR path[MAX_LFNAME_LENTH];
|
||||
CHAR path[MAX_LFNAME_LENGTH];
|
||||
FRESULT ret;
|
||||
DIR dir;
|
||||
INT res;
|
||||
|
||||
for (i = 0; i < fat->vir_amount; i++) {
|
||||
res = snprintf_s(path, MAX_LFNAME_LENTH, MAX_LFNAME_LENTH - 1, "%d:%s", vol, CHILDFS(fat, i)->namelabel);
|
||||
res = snprintf_s(path, MAX_LFNAME_LENGTH, MAX_LFNAME_LENGTH - 1, "%d:%s", vol, CHILDFS(fat, i)->namelabel);
|
||||
if (res < 0) {
|
||||
return FR_INVALID_NAME;
|
||||
}
|
||||
|
@ -340,7 +340,7 @@ INT FatFsBindVirPart(void *handle, BYTE vol)
|
|||
{
|
||||
INT ret;
|
||||
FATFS *fat = (FATFS *)handle;
|
||||
char path[MAX_LFNAME_LENTH] = {0};
|
||||
char path[MAX_LFNAME_LENGTH] = {0};
|
||||
|
||||
if (fat == NULL) {
|
||||
return -EINVAL;
|
||||
|
@ -413,7 +413,7 @@ INT FatFsMakeVirPart(void *handle, BYTE vol)
|
|||
{
|
||||
INT ret;
|
||||
FATFS *fat = (FATFS *)handle;
|
||||
char path[MAX_LFNAME_LENTH] = {0};
|
||||
char path[MAX_LFNAME_LENGTH] = {0};
|
||||
|
||||
if (fat == NULL) {
|
||||
return -EINVAL;
|
||||
|
@ -443,7 +443,7 @@ INT FatFsMakeVirPart(void *handle, BYTE vol)
|
|||
|
||||
INT fatfs_virstatfs_internel(struct Vnode *mountpt, const char *relpath, struct statfs *buf)
|
||||
{
|
||||
char drive[MAX_LFNAME_LENTH];
|
||||
char drive[MAX_LFNAME_LENGTH];
|
||||
DWORD freClust, allClust;
|
||||
FATFS *fat = NULL;
|
||||
INT result, vol;
|
||||
|
@ -462,7 +462,7 @@ INT fatfs_virstatfs_internel(struct Vnode *mountpt, const char *relpath, struct
|
|||
return -ENOENT;
|
||||
}
|
||||
|
||||
if (strlen(relpath) > MAX_LFNAME_LENTH) {
|
||||
if (strlen(relpath) > MAX_LFNAME_LENGTH) {
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
|
|
|
@ -193,20 +193,20 @@ STATIC VOID OsQueueBufferOperate(LosQueueCB *queueCB, UINT32 operateType, VOID *
|
|||
{
|
||||
UINT8 *queueNode = NULL;
|
||||
UINT32 msgDataSize;
|
||||
UINT16 queuePosion;
|
||||
UINT16 queuePosition;
|
||||
|
||||
/* get the queue position */
|
||||
switch (OS_QUEUE_OPERATE_GET(operateType)) {
|
||||
case OS_QUEUE_READ_HEAD:
|
||||
queuePosion = queueCB->queueHead;
|
||||
queuePosition = queueCB->queueHead;
|
||||
((queueCB->queueHead + 1) == queueCB->queueLen) ? (queueCB->queueHead = 0) : (queueCB->queueHead++);
|
||||
break;
|
||||
case OS_QUEUE_WRITE_HEAD:
|
||||
(queueCB->queueHead == 0) ? (queueCB->queueHead = queueCB->queueLen - 1) : (--queueCB->queueHead);
|
||||
queuePosion = queueCB->queueHead;
|
||||
queuePosition = queueCB->queueHead;
|
||||
break;
|
||||
case OS_QUEUE_WRITE_TAIL:
|
||||
queuePosion = queueCB->queueTail;
|
||||
queuePosition = queueCB->queueTail;
|
||||
((queueCB->queueTail + 1) == queueCB->queueLen) ? (queueCB->queueTail = 0) : (queueCB->queueTail++);
|
||||
break;
|
||||
default: /* read tail, reserved. */
|
||||
|
@ -214,7 +214,7 @@ STATIC VOID OsQueueBufferOperate(LosQueueCB *queueCB, UINT32 operateType, VOID *
|
|||
return;
|
||||
}
|
||||
|
||||
queueNode = &(queueCB->queueHandle[(queuePosion * (queueCB->queueSize))]);
|
||||
queueNode = &(queueCB->queueHandle[(queuePosition * (queueCB->queueSize))]);
|
||||
|
||||
if (OS_QUEUE_IS_READ(operateType)) {
|
||||
if (memcpy_s(&msgDataSize, sizeof(UINT32), queueNode + queueCB->queueSize - sizeof(UINT32),
|
||||
|
|
|
@ -356,7 +356,7 @@ typedef struct tagQueueInfo {
|
|||
* This API is used to create a message queue.
|
||||
* @attention
|
||||
* <ul>
|
||||
* <li>Threre are LOSCFG_BASE_IPC_QUEUE_LIMIT queues available, change it's value when necessory.</li>
|
||||
* <li>There are LOSCFG_BASE_IPC_QUEUE_LIMIT queues available, change it's value when necessary.</li>
|
||||
* </ul>
|
||||
* @param queueName [IN] Message queue name. Reserved parameter, not used for now.
|
||||
* @param len [IN] Queue length. The value range is [1,0xffff].
|
||||
|
|
|
@ -364,7 +364,7 @@ extern UINT32 LOS_SwtmrTimeGet(UINT16 swtmrID, UINT32 *tick);
|
|||
* @attention
|
||||
* <ul>
|
||||
* <li>Do not use the delay interface in the callback function that handles software timer timeout.</li>
|
||||
* <li>Threre are LOSCFG_BASE_CORE_SWTMR_LIMIT timers available, change it's value when necessory.</li>
|
||||
* <li>There are LOSCFG_BASE_CORE_SWTMR_LIMIT timers available, change it's value when necessary.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param interval [IN] Timing duration of the software timer to be created (unit: tick).
|
||||
|
|
|
@ -41,8 +41,8 @@ extern "C" {
|
|||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
#define QUEUE_SHORT_BUFFER_LENTH 12
|
||||
#define QUEUE_STANDARD_BUFFER_LENTH 50
|
||||
#define QUEUE_SHORT_BUFFER_LENGTH 12
|
||||
#define QUEUE_STANDARD_BUFFER_LENGTH 50
|
||||
#define QUEUE_BASE_NUM 3
|
||||
#define QUEUE_BASE_MSGSIZE 8
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
g_testQueueID01 = 1025; // 1025, ID of successfully created queue control structure.
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, 1); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
|
|
@ -39,8 +39,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
g_testQueueID01 = LOSCFG_BASE_IPC_QUEUE_CONFIG - 1;
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
g_testQueueID01 = 1025; // 1025, ID of successfully created queue control structure.
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
g_testQueueID01 = 1025; // 1025, ID of successfully created queue control structure.
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 1, &g_testQueueID01, 0, 8); // 8, Set the node size of the queue.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
|
|
@ -39,8 +39,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
g_testQueueID01 = 1025; // 1025, ID of successfully created queue control structure.
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSPtest";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSPtest";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
g_testQueueID01 = LOSCFG_BASE_IPC_QUEUE_CONFIG - 1;
|
||||
|
||||
|
|
|
@ -39,13 +39,13 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSPtest";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSPtest";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, sizeof(UINTPTR)); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWrite(g_testQueueID01, &buff1, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWrite(g_testQueueID01, &buff1, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueRead(g_testQueueID01, &buff2, sizeof(UINTPTR), 0);
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[9] = "";
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, sizeof(UINTPTR)); // 3, Set the queue length.
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, 8); // 3, Set the queue length; 8, Set the node size of the queue.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
|
|
@ -40,8 +40,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, 8); // 3, Set the queue length; 8, Set the node size of the queue.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
|
|
@ -40,22 +40,22 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, sizeof(UINTPTR)); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWrite(g_testQueueID01, &buff1, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWrite(g_testQueueID01, &buff1, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueRead(g_testQueueID01, &buff2, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueRead(g_testQueueID01, &buff2, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueDelete(g_testQueueID01);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueRead(g_testQueueID01, &buff2, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueRead(g_testQueueID01, &buff2, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_NOT_CREATE, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueDelete(g_testQueueID01);
|
||||
|
|
|
@ -40,8 +40,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, sizeof(UINTPTR)); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
|
|
@ -42,8 +42,8 @@ static UINT32 Testcase(VOID)
|
|||
UINT32 ret;
|
||||
UINT32 index;
|
||||
UINT32 queueID[LOSCFG_BASE_IPC_QUEUE_CONFIG + 1];
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
UINT32 exsitedQueue = QUEUE_EXISTED_NUM;
|
||||
for (index = 0; index < LOSCFG_BASE_IPC_QUEUE_CONFIG - exsitedQueue; index++) {
|
||||
|
|
|
@ -42,8 +42,8 @@ static UINT32 Testcase(VOID)
|
|||
UINT32 ret;
|
||||
UINT32 index;
|
||||
UINT32 queueID[LOSCFG_BASE_IPC_QUEUE_CONFIG + 1];
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
UINT32 exsitedQueue = QUEUE_EXISTED_NUM;
|
||||
for (index = 0; index < LOSCFG_BASE_IPC_QUEUE_CONFIG - exsitedQueue; index++) {
|
||||
|
|
|
@ -40,8 +40,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, sizeof(UINTPTR)); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
|
|
@ -40,8 +40,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, sizeof(UINTPTR)); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
|
|
@ -40,8 +40,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "gjl";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "gjl";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, sizeof(UINTPTR)); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
|
|
@ -40,8 +40,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, sizeof(UINTPTR)); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
|
|
@ -40,8 +40,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
ret = LOS_QueueWrite(QUEUE_EXISTED_NUM + 1, &buff1, 8, 0); // 8, Write the setting size of queue buffer.
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_ERRNO_QUEUE_NOT_CREATE, ret);
|
||||
|
|
|
@ -40,8 +40,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, sizeof(UINTPTR)); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
|
|
@ -40,8 +40,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "DOPRA";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "DOPRA";
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, 8); // 3, Set the queue length; 8, Set the node size of the queue.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH];
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH];
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, sizeof(UINTPTR)); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
|
|
@ -41,8 +41,8 @@ static UINT32 Testcase(VOID)
|
|||
{
|
||||
UINT32 ret;
|
||||
UINT32 index;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "DOPRA";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "DOPRA";
|
||||
CHAR buff3[8] = "TEST";
|
||||
UINTPTR buff4;
|
||||
UINTPTR buff5;
|
||||
|
|
|
@ -41,8 +41,8 @@ static UINT32 Testcase(VOID)
|
|||
{
|
||||
UINT32 ret;
|
||||
UINT32 index;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, sizeof(UINTPTR)); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
g_testCount++;
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
g_testCount++;
|
||||
|
||||
|
@ -56,7 +56,7 @@ EXIT:
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
|
||||
TSK_INIT_PARAM_S task1 = { 0 };
|
||||
task1.pfnTaskEntry = (TSK_ENTRY_FUNC)TaskF01;
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
LOS_AtomicInc(&g_testCount);
|
||||
|
||||
|
@ -56,7 +56,7 @@ EXIT:
|
|||
static VOID TaskF02(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
|
||||
LOS_AtomicInc(&g_testCount);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
|
||||
LOS_AtomicInc(&g_testCount);
|
||||
|
||||
|
@ -56,7 +56,7 @@ EXIT:
|
|||
static VOID TaskF02(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
LOS_AtomicInc(&g_testCount);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static VOID HwiF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
TEST_HwiClear(HWI_NUM_TEST);
|
||||
|
||||
|
@ -58,7 +58,7 @@ EXIT:
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
|
||||
g_testCount = 0;
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ extern "C" {
|
|||
static VOID HwiF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
|
||||
TEST_HwiClear(HWI_NUM_TEST);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static VOID HwiF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
|
||||
TEST_HwiClear(HWI_NUM_TEST);
|
||||
|
||||
|
@ -58,7 +58,7 @@ static VOID HwiF01(VOID)
|
|||
static VOID HwiF02(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
TEST_HwiClear(HWI_NUM_TEST3);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
|
||||
LOS_AtomicInc(&g_testCount);
|
||||
|
||||
|
@ -59,7 +59,7 @@ EXIT:
|
|||
static VOID HwiF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
TEST_HwiClear(HWI_NUM_TEST);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
LOS_AtomicInc(&g_testCount);
|
||||
|
||||
|
@ -57,7 +57,7 @@ EXIT:
|
|||
static VOID HwiF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
|
||||
TEST_HwiClear(HWI_NUM_TEST);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static VOID HwiF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
TEST_HwiClear(HWI_NUM_TEST);
|
||||
|
||||
|
@ -59,7 +59,7 @@ EXIT:
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
|
||||
g_testCount = 0;
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
|
||||
g_testCount = 0;
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
|
||||
g_testCount = 0;
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ extern "C" {
|
|||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
g_testCount++;
|
||||
|
||||
|
@ -60,7 +60,7 @@ EXIT:
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
TSK_INIT_PARAM_S task1 = { 0 };
|
||||
|
||||
task1.pfnTaskEntry = (TSK_ENTRY_FUNC)TaskF01;
|
||||
|
|
|
@ -39,8 +39,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
g_testQueueID01 = 0;
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
g_testQueueID01 = 0;
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
g_testQueueID01 = 0;
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
char bufname[5002] = {0};
|
||||
|
||||
g_testQueueID01 = 0;
|
||||
|
|
|
@ -40,8 +40,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
UINT32 maxMsgSize;
|
||||
|
||||
g_testQueueID01 = LOSCFG_BASE_IPC_QUEUE_CONFIG - 1;
|
||||
|
|
|
@ -40,8 +40,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
g_testQueueID01 = 0;
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret, len1;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
g_testQueueID01 = LOSCFG_BASE_IPC_QUEUE_CONFIG - 1;
|
||||
len1 = 0xFFFF + 1;
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[7];
|
||||
|
||||
g_testQueueID01 = LOSCFG_BASE_IPC_QUEUE_CONFIG - 1;
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[10];
|
||||
|
||||
g_testQueueID01 = LOSCFG_BASE_IPC_QUEUE_CONFIG - 1;
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[10];
|
||||
|
||||
g_testQueueID01 = LOSCFG_BASE_IPC_QUEUE_CONFIG - 1;
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[10];
|
||||
|
||||
g_testQueueID01 = LOSCFG_BASE_IPC_QUEUE_CONFIG - 1;
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[10];
|
||||
|
||||
g_testQueueID01 = LOSCFG_BASE_IPC_QUEUE_CONFIG - 1;
|
||||
|
|
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[10];
|
||||
|
||||
g_testQueueID01 = LOSCFG_BASE_IPC_QUEUE_CONFIG - 1;
|
||||
|
|
|
@ -42,8 +42,8 @@ static UINT32 Testcase(VOID)
|
|||
UINT32 ret, i;
|
||||
UINT32 index;
|
||||
const UINT32 count = 256;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
CHAR filebuf[260] = "abcdeabcde0123456789abcedfghij9876550210abcdeabcde0123456789abcedfghij9876550210abcdeabcde0123"
|
||||
"456789abcedfghij9876550210abcdeabcde0123456789abcedfghij9876550210abcdeabcde0123456789abcedfgh"
|
||||
"ij9876550210abcdeabcde0123456789abcedfghij9876550210lalalalalalalala";
|
||||
|
|
|
@ -42,12 +42,12 @@ static UINT32 Testcase(VOID)
|
|||
UINT32 ret, i;
|
||||
UINT32 index;
|
||||
const UINT32 len = 1000; // 1000, Queue buffer length.
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
|
||||
// 1000, Set the queue length.
|
||||
ret = LOS_QueueCreate("Q1", 1000, &g_testQueueID01, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
ret = LOS_QueueCreate("Q1", 1000, &g_testQueueID01, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueInfoGet(g_testQueueID01, &queueInfo);
|
||||
|
@ -56,23 +56,23 @@ static UINT32 Testcase(VOID)
|
|||
ICUNIT_GOTO_EQUAL(queueInfo.uwQueueID, g_testQueueID01, queueInfo.uwQueueID, EXIT);
|
||||
|
||||
for (i = 0; i < 1000; i++) { // 1000, Set the queue length.
|
||||
ret = LOS_QueueWrite(g_testQueueID01, buff1, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWrite(g_testQueueID01, buff1, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
}
|
||||
ret = LOS_QueueWrite(g_testQueueID01, buff1, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWrite(g_testQueueID01, buff1, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_ISFULL, ret, EXIT);
|
||||
|
||||
for (i = 0; i < 1000; i++) { // 1000, Set the queue length.
|
||||
ret = LOS_QueueRead(g_testQueueID01, buff2, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueRead(g_testQueueID01, buff2, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
}
|
||||
ret = LOS_QueueRead(g_testQueueID01, buff2, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueRead(g_testQueueID01, buff2, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_ISEMPTY, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWrite(g_testQueueID01, buff1, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWrite(g_testQueueID01, buff1, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueRead(g_testQueueID01, buff2, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueRead(g_testQueueID01, buff2, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueInfoGet(g_testQueueID01, &queueInfo);
|
||||
|
@ -80,7 +80,7 @@ static UINT32 Testcase(VOID)
|
|||
ICUNIT_GOTO_EQUAL(queueInfo.usQueueLen, len, queueInfo.usQueueLen, EXIT);
|
||||
ICUNIT_GOTO_EQUAL(queueInfo.uwQueueID, g_testQueueID01, queueInfo.uwQueueID, EXIT);
|
||||
|
||||
ret = LOS_QueueRead(g_testQueueID01, buff2, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueRead(g_testQueueID01, buff2, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_ISEMPTY, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueDelete(g_testQueueID01);
|
||||
|
|
|
@ -59,24 +59,24 @@ static UINT32 Testcase(VOID)
|
|||
|
||||
for (j = 0; j < 100; j++) { // 100, The loop frequency.
|
||||
for (i = 0; i < 1000; i++) { // 1000, The loop frequency.
|
||||
ret = LOS_QueueWrite(g_testQueueID01, filebuf, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWrite(g_testQueueID01, filebuf, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
}
|
||||
ret = LOS_QueueWrite(g_testQueueID01, filebuf, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWrite(g_testQueueID01, filebuf, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_ISFULL, ret, EXIT);
|
||||
|
||||
for (i = 0; i < 1000; i++) { // 1000, The loop frequency.
|
||||
memset(readbuf, 0, 260); // 260, Read buf size.
|
||||
ret = LOS_QueueRead(g_testQueueID01, readbuf, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueRead(g_testQueueID01, readbuf, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
}
|
||||
ret = LOS_QueueRead(g_testQueueID01, readbuf, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueRead(g_testQueueID01, readbuf, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_ISEMPTY, ret, EXIT);
|
||||
}
|
||||
ret = LOS_QueueWrite(g_testQueueID01, filebuf, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWrite(g_testQueueID01, filebuf, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueRead(g_testQueueID01, readbuf, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueRead(g_testQueueID01, readbuf, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueInfoGet(g_testQueueID01, &queueInfo);
|
||||
|
@ -84,7 +84,7 @@ static UINT32 Testcase(VOID)
|
|||
ICUNIT_GOTO_EQUAL(queueInfo.usQueueLen, len, queueInfo.usQueueLen, EXIT);
|
||||
ICUNIT_GOTO_EQUAL(queueInfo.uwQueueID, g_testQueueID01, queueInfo.uwQueueID, EXIT);
|
||||
|
||||
ret = LOS_QueueRead(g_testQueueID01, readbuf, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueRead(g_testQueueID01, readbuf, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_ISEMPTY, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueDelete(g_testQueueID01);
|
||||
|
|
|
@ -41,8 +41,8 @@ static UINT32 Testcase(VOID)
|
|||
{
|
||||
UINT32 ret;
|
||||
UINT32 queueID;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
|
||||
queueID = LOSCFG_BASE_IPC_QUEUE_CONFIG + 1;
|
||||
|
|
|
@ -41,20 +41,20 @@ static UINT32 Testcase(VOID)
|
|||
{
|
||||
UINT32 ret;
|
||||
UINT32 queueID;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
UINT32 readSize;
|
||||
|
||||
queueID = LOSCFG_BASE_IPC_QUEUE_CONFIG + 1;
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
readSize = 8; // 8, Read the setting size of queue buffer.
|
||||
ret = LOS_QueueReadCopy(queueID, &buff2, &readSize, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_INVALID, ret, EXIT);
|
||||
ICUNIT_GOTO_EQUAL(readSize, 8, readSize, EXIT); // 8, Here, assert that g_testCount is equal to 8.
|
||||
|
||||
queueID = LOSCFG_BASE_IPC_QUEUE_CONFIG;
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
|
||||
readSize = 8; // 8, Read the setting size of queue buffer.
|
||||
ret = LOS_QueueReadCopy(queueID, &buff2, &readSize, 0);
|
||||
|
@ -62,14 +62,14 @@ static UINT32 Testcase(VOID)
|
|||
ICUNIT_GOTO_EQUAL(readSize, 8, readSize, EXIT); // 8, Here, assert that g_testCount is equal to 8.
|
||||
|
||||
queueID = LOSCFG_BASE_IPC_QUEUE_CONFIG - 1;
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
readSize = 8; // 8, Read the setting size of queue buffer.
|
||||
ret = LOS_QueueReadCopy(queueID, &buff2, &readSize, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_NOT_CREATE, ret, EXIT);
|
||||
ICUNIT_GOTO_EQUAL(readSize, 8, readSize, EXIT); // 8, Here, assert that g_testCount is equal to 8.
|
||||
|
||||
queueID = 0;
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
readSize = 8; // 8, Read the setting size of queue buffer.
|
||||
ret = LOS_QueueReadCopy(queueID - 1, &buff2, &readSize, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_INVALID, ret, EXIT);
|
||||
|
|
|
@ -41,8 +41,8 @@ static UINT32 Testcase(VOID)
|
|||
{
|
||||
UINT32 ret;
|
||||
UINT32 queueID;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
UINT32 readSize;
|
||||
|
||||
|
@ -55,7 +55,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_QueueDelete(queueID);
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
readSize = 8; // 8, Read the setting size of queue buffer.
|
||||
ret = LOS_QueueReadCopy(queueID, &buff2, &readSize, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_NOT_CREATE, ret, EXIT);
|
||||
|
|
|
@ -41,8 +41,8 @@ static UINT32 Testcase(VOID)
|
|||
{
|
||||
UINT32 ret;
|
||||
UINT32 queueID;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
UINT32 readSize;
|
||||
|
||||
|
@ -52,12 +52,12 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_QueueWrite(queueID, &buff1, 8, 0); // 8, Write the setting size of queue buffer.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
readSize = sizeof(buff1);
|
||||
ret = LOS_QueueReadCopy(queueID, NULL, &readSize, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_READ_PTR_NULL, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
readSize = sizeof(buff1);
|
||||
ret = LOS_QueueReadCopy(queueID, &buff2, &readSize, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
|
|
@ -41,8 +41,8 @@ static UINT32 Testcase(VOID)
|
|||
{
|
||||
UINT32 ret;
|
||||
UINT32 queueID;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
UINT32 readSize;
|
||||
|
||||
|
@ -52,7 +52,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_QueueWrite(queueID, &buff1, 8, 0); // 8, Write the setting size of queue buffer.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
readSize = sizeof(buff1);
|
||||
ret = LOS_QueueReadCopy(queueID, &buff2, &readSize, 0xffffffff);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
@ -60,7 +60,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_QueueWrite(queueID, &buff1, 8, 0); // 8, Write the setting size of queue buffer.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
readSize = sizeof(buff1);
|
||||
ret = LOS_QueueReadCopy(queueID, &buff2, &readSize, 0xffffffff + 1);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
@ -68,7 +68,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_QueueWrite(queueID, &buff1, 8, 0); // 8, Write the setting size of queue buffer.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
readSize = sizeof(buff1);
|
||||
ret = LOS_QueueReadCopy(queueID, &buff2, &readSize, 0xffffffff - 1);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
|
|
@ -41,8 +41,8 @@ static UINT32 Testcase(VOID)
|
|||
{
|
||||
UINT32 ret;
|
||||
UINT32 queueID;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
|
||||
queueID = LOSCFG_BASE_IPC_QUEUE_CONFIG;
|
||||
|
|
|
@ -41,8 +41,8 @@ static UINT32 Testcase(VOID)
|
|||
{
|
||||
UINT32 ret;
|
||||
UINT32 queueID;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &queueID, 0, 8); // 3, Set the queue length; 8, Set the node size of the queue.
|
||||
|
|
|
@ -41,25 +41,25 @@ static UINT32 Testcase(VOID)
|
|||
{
|
||||
UINT32 ret;
|
||||
UINT32 queueID;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "ABC";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "ABC";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &queueID, 0, QUEUE_SHORT_BUFFER_LENTH); // 3, Set the queue length.
|
||||
ret = LOS_QueueCreate("Q1", 3, &queueID, 0, QUEUE_SHORT_BUFFER_LENGTH); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWriteCopy(queueID, NULL, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWriteCopy(queueID, NULL, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_WRITE_PTR_NULL, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
ret = LOS_QueueRead(queueID, &buff2, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
ret = LOS_QueueRead(queueID, &buff2, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_ISEMPTY, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWriteCopy(queueID, &buff1, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWriteCopy(queueID, &buff1, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
ret = LOS_QueueRead(queueID, &buff2, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
ret = LOS_QueueRead(queueID, &buff2, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueDelete(queueID);
|
||||
|
|
|
@ -41,32 +41,32 @@ static UINT32 Testcase(VOID)
|
|||
{
|
||||
UINT32 ret;
|
||||
UINT32 queueID;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "123";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "123";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &queueID, 0, QUEUE_SHORT_BUFFER_LENTH); // 3, Set the queue length.
|
||||
ret = LOS_QueueCreate("Q1", 3, &queueID, 0, QUEUE_SHORT_BUFFER_LENGTH); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWriteCopy(queueID, &buff1, QUEUE_SHORT_BUFFER_LENTH, 0xffffffff);
|
||||
ret = LOS_QueueWriteCopy(queueID, &buff1, QUEUE_SHORT_BUFFER_LENGTH, 0xffffffff);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
ret = LOS_QueueRead(queueID, &buff2, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
ret = LOS_QueueRead(queueID, &buff2, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWriteCopy(queueID, &buff1, QUEUE_SHORT_BUFFER_LENTH, 0xffffffff + 1);
|
||||
ret = LOS_QueueWriteCopy(queueID, &buff1, QUEUE_SHORT_BUFFER_LENGTH, 0xffffffff + 1);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
ret = LOS_QueueRead(queueID, &buff2, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
ret = LOS_QueueRead(queueID, &buff2, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWriteCopy(queueID, &buff1, QUEUE_SHORT_BUFFER_LENTH, 0xffffffff - 1);
|
||||
ret = LOS_QueueWriteCopy(queueID, &buff1, QUEUE_SHORT_BUFFER_LENGTH, 0xffffffff - 1);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
ret = LOS_QueueRead(queueID, &buff2, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
ret = LOS_QueueRead(queueID, &buff2, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueDelete(queueID);
|
||||
|
|
|
@ -61,16 +61,16 @@ EXIT:
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
|
||||
g_testCount = 0;
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, QUEUE_SHORT_BUFFER_LENTH); // 3, Set the queue length.
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, QUEUE_SHORT_BUFFER_LENGTH); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWrite(g_testQueueID01, &buff1, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWrite(g_testQueueID01, &buff1, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = TEST_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
|
||||
|
|
|
@ -61,8 +61,8 @@ EXIT:
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
TSK_INIT_PARAM_S task1 = { 0 };
|
||||
|
||||
|
@ -73,10 +73,10 @@ static UINT32 Testcase(VOID)
|
|||
|
||||
g_testCount = 0;
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, QUEUE_SHORT_BUFFER_LENTH); // 3, Set the queue length.
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, QUEUE_SHORT_BUFFER_LENGTH); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWrite(g_testQueueID01, &buff1, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWrite(g_testQueueID01, &buff1, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||
|
|
|
@ -60,16 +60,16 @@ static UINT32 Testcase(VOID)
|
|||
{
|
||||
UINT32 ret;
|
||||
UINT16 swTmrID;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
|
||||
g_testCount = 0;
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, QUEUE_SHORT_BUFFER_LENTH); // 3, Set the queue length.
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, QUEUE_SHORT_BUFFER_LENGTH); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWrite(g_testQueueID01, &buff1, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWrite(g_testQueueID01, &buff1, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_SwtmrCreate(4, LOS_SWTMR_MODE_ONCE, (SWTMR_PROC_FUNC)SwtmrF01, &swTmrID, 0xffff); // 4, Timing duration of the software timer to be created.
|
||||
|
|
|
@ -40,18 +40,18 @@ extern "C" {
|
|||
static VOID HwiF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
UINT32 readSize;
|
||||
|
||||
TEST_HwiClear(HWI_NUM_TEST);
|
||||
|
||||
g_testCount++;
|
||||
|
||||
ret = LOS_QueueWriteCopy(g_testQueueID01, &buff1, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWriteCopy(g_testQueueID01, &buff1, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
readSize = QUEUE_SHORT_BUFFER_LENTH;
|
||||
readSize = QUEUE_SHORT_BUFFER_LENGTH;
|
||||
ret = LOS_QueueReadCopy(g_testQueueID01, &buff2, &readSize, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
|
@ -65,14 +65,14 @@ EXIT:
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
UINT32 readSize;
|
||||
|
||||
g_testCount = 0;
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, QUEUE_SHORT_BUFFER_LENTH); // 3, Set the queue length.
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, QUEUE_SHORT_BUFFER_LENGTH); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = TEST_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
|
||||
|
@ -87,7 +87,7 @@ static UINT32 Testcase(VOID)
|
|||
|
||||
g_testCount++;
|
||||
|
||||
readSize = QUEUE_SHORT_BUFFER_LENTH;
|
||||
readSize = QUEUE_SHORT_BUFFER_LENGTH;
|
||||
ret = LOS_QueueReadCopy(g_testQueueID01, &buff2, &readSize, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_ISEMPTY, ret, EXIT);
|
||||
|
||||
|
|
|
@ -40,18 +40,18 @@ extern "C" {
|
|||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
UINT32 readSize;
|
||||
|
||||
TEST_HwiClear(HWI_NUM_TEST);
|
||||
|
||||
g_testCount++;
|
||||
|
||||
ret = LOS_QueueWriteCopy(g_testQueueID01, &buff1, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWriteCopy(g_testQueueID01, &buff1, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
readSize = QUEUE_SHORT_BUFFER_LENTH;
|
||||
readSize = QUEUE_SHORT_BUFFER_LENGTH;
|
||||
ret = LOS_QueueReadCopy(g_testQueueID01, &buff2, &readSize, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
|
@ -68,8 +68,8 @@ EXIT:
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
TSK_INIT_PARAM_S task1 = { 0 };
|
||||
UINT32 readSize;
|
||||
|
@ -81,7 +81,7 @@ static UINT32 Testcase(VOID)
|
|||
|
||||
g_testCount = 0;
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, QUEUE_SHORT_BUFFER_LENTH); // 3, Set the queue length.
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, QUEUE_SHORT_BUFFER_LENGTH); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
|
||||
|
@ -92,7 +92,7 @@ static UINT32 Testcase(VOID)
|
|||
|
||||
g_testCount++;
|
||||
|
||||
readSize = QUEUE_SHORT_BUFFER_LENTH;
|
||||
readSize = QUEUE_SHORT_BUFFER_LENGTH;
|
||||
ret = LOS_QueueReadCopy(g_testQueueID01, &buff2, &readSize, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_ISEMPTY, ret, EXIT);
|
||||
|
||||
|
|
|
@ -40,16 +40,16 @@ extern "C" {
|
|||
static VOID SwtmrF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
UINT32 readSize;
|
||||
|
||||
g_testCount++;
|
||||
|
||||
ret = LOS_QueueWriteCopy(g_testQueueID01, &buff1, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWriteCopy(g_testQueueID01, &buff1, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
readSize = QUEUE_SHORT_BUFFER_LENTH;
|
||||
readSize = QUEUE_SHORT_BUFFER_LENGTH;
|
||||
ret = LOS_QueueReadCopy(g_testQueueID01, &buff2, &readSize, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
|
@ -64,14 +64,14 @@ static UINT32 Testcase(VOID)
|
|||
{
|
||||
UINT32 ret;
|
||||
UINT16 swTmrID;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
UINT32 readSize;
|
||||
|
||||
g_testCount = 0;
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, QUEUE_SHORT_BUFFER_LENTH); // 3, Set the queue length.
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, QUEUE_SHORT_BUFFER_LENGTH); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
// 4, Timing duration of the software timer to be created.
|
||||
|
@ -86,7 +86,7 @@ static UINT32 Testcase(VOID)
|
|||
|
||||
ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2.
|
||||
|
||||
readSize = QUEUE_SHORT_BUFFER_LENTH;
|
||||
readSize = QUEUE_SHORT_BUFFER_LENGTH;
|
||||
ret = LOS_QueueReadCopy(g_testQueueID01, &buff2, &readSize, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_ISEMPTY, ret, EXIT);
|
||||
|
||||
|
|
|
@ -42,22 +42,22 @@ static UINT32 Testcase(VOID)
|
|||
UINT32 ret;
|
||||
UINT32 i;
|
||||
UINT32 queueID;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &queueID, 0, QUEUE_SHORT_BUFFER_LENTH); // 3, Set the queue length.
|
||||
ret = LOS_QueueCreate("Q1", 3, &queueID, 0, QUEUE_SHORT_BUFFER_LENGTH); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
for (i = 0; i < 3; i++) { // 3, The loop frequency.
|
||||
ret = LOS_QueueWriteCopy(queueID, &buff1, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWriteCopy(queueID, &buff1, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
}
|
||||
|
||||
ret = LOS_QueueWrite(queueID, &buff1, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWrite(queueID, &buff1, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_ISFULL, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWriteCopy(queueID, &buff1, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWriteCopy(queueID, &buff1, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_ISFULL, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueInfoGet(queueID, &queueInfo);
|
||||
|
|
|
@ -40,8 +40,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
UINT32 readSize;
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ extern "C" {
|
|||
static UINT32 Testcase(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &g_testQueueID01, 0, 8); // 3, Set the queue length; 8, Set the node size of the queue.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
|
|
@ -40,8 +40,8 @@ static UINT32 Testcase(VOID)
|
|||
{
|
||||
UINT32 ret;
|
||||
UINT32 queueID;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &queueID, 0, 8); // 3, Set the queue length; 8, Set the node size of the queue.
|
||||
|
|
|
@ -41,8 +41,8 @@ static UINT32 Testcase(VOID)
|
|||
{
|
||||
UINT32 ret;
|
||||
UINT32 queueID;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "123";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "123";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
UINT32 readSize;
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &queueID, 0, sizeof(UINTPTR)); // 3, Set the queue length.
|
||||
|
@ -51,7 +51,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_QueueWrite(queueID, &buff1, 8, 0); // 8, Write the setting size of queue buffer.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
readSize = sizeof(buff1);
|
||||
ret = LOS_QueueReadCopy(queueID, &buff2, &readSize, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
@ -59,7 +59,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_QueueWrite(queueID, &buff1, 8, 0); // 8, Write the setting size of queue buffer.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
readSize = sizeof(buff1) + 1;
|
||||
ret = LOS_QueueReadCopy(queueID, &buff2, &readSize, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
@ -67,7 +67,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_QueueWrite(queueID, &buff1, 8, 0); // 8, Write the setting size of queue buffer.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
readSize = sizeof(buff1);
|
||||
ret = LOS_QueueReadCopy(queueID, &buff2, &readSize, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
@ -75,7 +75,7 @@ static UINT32 Testcase(VOID)
|
|||
ret = LOS_QueueWrite(queueID, &buff1, 8, 0); // 8, Write the setting size of queue buffer.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
readSize = 0;
|
||||
ret = LOS_QueueReadCopy(queueID, &buff2, &readSize, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_READSIZE_IS_INVALID, ret, EXIT);
|
||||
|
|
|
@ -41,43 +41,43 @@ static UINT32 Testcase(VOID)
|
|||
{
|
||||
UINT32 ret;
|
||||
UINT32 queueID;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "abc";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "abc";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
QUEUE_INFO_S queueInfo;
|
||||
UINT32 readSize;
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 3, &queueID, 0, QUEUE_SHORT_BUFFER_LENTH); // 3, Set the queue length.
|
||||
ret = LOS_QueueCreate("Q1", 3, &queueID, 0, QUEUE_SHORT_BUFFER_LENGTH); // 3, Set the queue length.
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWriteCopy(queueID, &buff1, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
ret = LOS_QueueWriteCopy(queueID, &buff1, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
ret = LOS_QueueRead(queueID, &buff2, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
ret = LOS_QueueRead(queueID, &buff2, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWriteCopy(queueID, &buff1, QUEUE_SHORT_BUFFER_LENTH + PER_ADDED_VALUE, 0);
|
||||
ret = LOS_QueueWriteCopy(queueID, &buff1, QUEUE_SHORT_BUFFER_LENGTH + PER_ADDED_VALUE, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_WRITE_SIZE_TOO_BIG, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
ret = LOS_QueueRead(queueID, &buff2, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
ret = LOS_QueueRead(queueID, &buff2, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_ISEMPTY, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWrite(queueID, &buff1, QUEUE_SHORT_BUFFER_LENTH - 1, 0);
|
||||
ret = LOS_QueueWrite(queueID, &buff1, QUEUE_SHORT_BUFFER_LENGTH - 1, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
ret = LOS_QueueRead(queueID, &buff2, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
ret = LOS_QueueRead(queueID, &buff2, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
ret = LOS_QueueRead(queueID, &buff2, QUEUE_SHORT_BUFFER_LENTH, 0);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
ret = LOS_QueueRead(queueID, &buff2, QUEUE_SHORT_BUFFER_LENGTH, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_ISEMPTY, ret, EXIT);
|
||||
|
||||
ret = LOS_QueueWrite(queueID, &buff1, 0, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENTH);
|
||||
memset(buff2, 0, QUEUE_SHORT_BUFFER_LENGTH);
|
||||
readSize = 0;
|
||||
ret = LOS_QueueReadCopy(queueID, &buff2, &readSize, 0);
|
||||
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_QUEUE_READSIZE_IS_INVALID, ret, EXIT);
|
||||
|
|
|
@ -57,8 +57,8 @@ static UINT32 Testcase(VOID)
|
|||
TSK_INIT_PARAM_S testTask;
|
||||
|
||||
g_testCount = 0;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
ret = LOS_QueueCreate("Q1", 1, &g_testQueueID01, 0, 8); // 8, Set the maximum data length of the message queue.
|
||||
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
|
||||
|
|
|
@ -57,8 +57,8 @@ static UINT32 Testcase(VOID)
|
|||
TSK_INIT_PARAM_S testTask;
|
||||
|
||||
g_testCount = 0;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
currCpuid = (ArchCurrCpuid() + 1) % (LOSCFG_KERNEL_CORE_NUM);
|
||||
|
||||
|
|
|
@ -57,8 +57,8 @@ static UINT32 Testcase(VOID)
|
|||
TSK_INIT_PARAM_S testTask;
|
||||
|
||||
g_testCount = 0;
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
CHAR buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
CHAR buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
|
||||
currCpuid = (ArchCurrCpuid() + 1) % (LOSCFG_KERNEL_CORE_NUM);
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ extern "C" {
|
|||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
|
|
|
@ -36,8 +36,8 @@ extern "C" {
|
|||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
|
|
|
@ -36,8 +36,8 @@ extern "C" {
|
|||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
|
|
|
@ -36,8 +36,8 @@ extern "C" {
|
|||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
|
|
|
@ -36,8 +36,8 @@ extern "C" {
|
|||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
static VOID HwiF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
|
|
|
@ -36,8 +36,8 @@ extern "C" {
|
|||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
|
|
|
@ -36,8 +36,8 @@ extern "C" {
|
|||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
|
|
|
@ -36,8 +36,8 @@ extern "C" {
|
|||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
static VOID TaskF02(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
|
|
|
@ -36,8 +36,8 @@ extern "C" {
|
|||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
|
|
|
@ -36,8 +36,8 @@ extern "C" {
|
|||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
|
|
|
@ -37,8 +37,8 @@ extern "C" {
|
|||
#endif /* __cpluscplus */
|
||||
|
||||
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
static VOID TaskF02(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
|
|
|
@ -37,8 +37,8 @@ extern "C" {
|
|||
#endif /* __cpluscplus */
|
||||
|
||||
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
|
|
|
@ -36,8 +36,8 @@ extern "C" {
|
|||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
|
|
|
@ -36,8 +36,8 @@ extern "C" {
|
|||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
|
|
|
@ -36,8 +36,8 @@ extern "C" {
|
|||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENTH] = "";
|
||||
static CHAR g_buff1[QUEUE_SHORT_BUFFER_LENGTH] = "UniDSP";
|
||||
static CHAR g_buff2[QUEUE_SHORT_BUFFER_LENGTH] = "";
|
||||
static VOID TaskF01(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue