Compare commits

...

10 Commits

Author SHA1 Message Date
openharmony_ci
51528ec39c !906 【OpenHarmony开源贡献者计划2022】Optimized conversion instructions.
Merge pull request !906 from Mr_YX/master
2022-06-27 09:31:08 +00:00
openharmony_ci
beb03bfc81 !903 【OpenHarmony开源贡献者计划2022】fix typos for net
Merge pull request !903 from c01dface/master
2022-06-23 14:54:42 +00:00
openharmony_ci
bbbd96784e !904 修复liteos_a仓库中存在的一些拼写错误
Merge pull request !904 from Hongjin Li/dev
2022-06-23 04:15:03 +00:00
lihongjin
1c0de289ec style: Misspelling
Signed-off-by: lihongjin <lihongjin1@huawei.com>
Change-Id: I13163f2e4d1e4b6e6c6bedaf9d4e705544df926b
2022-06-23 09:45:46 +08:00
openharmony_ci
a3d757c8e1 !898 【轻量级 PR】:「OpenHarmony开源贡献者计划2022」update testsuites/unittest/libc/util/smoke/util_test_005.cpp.
Merge pull request !898 from Mr_YX/N/A
2022-06-23 01:02:42 +00:00
openharmony_ci
6fede4eb92 !892 【OpenHarmony开源贡献者计划2022】更新readme中的目录结构
Merge pull request !892 from wanggang/master
2022-06-23 00:43:57 +00:00
Mr_YX
7be302633f Signed-off-by: mr-yx <496043997@qq.com> 2022-06-20 18:08:19 +00:00
Neil Chen
9bb4be5e13 fix typos for net
Signed-off-by: Neil Chen <jingsi.chen@petalmail.com>
2022-06-19 14:10:19 +08:00
Mr_YX
9b1e0a186b update testsuites/unittest/libc/util/smoke/util_test_005.cpp.
Signed-off-by: mr-yx <496043997@qq.com>
2022-06-15 14:05:19 +00:00
wanggang
9fb176b827 update readme
Signed-off-by: wanggang <wanggang@kaihongdigi.com>
2022-06-10 10:11:17 +08:00
44 changed files with 73 additions and 70 deletions

View File

@@ -265,7 +265,7 @@ config MEM_LEAKCHECK
default n
depends on DEBUG_VERSION && MEM_DEBUG
help
Answer Y to enable record the LR of Function call stack of Mem operation, it can check the mem leak through the informations of mem node.
Answer Y to enable record the LR of Function call stack of Mem operation, it can check the mem leak through the information of mem node.
config BASE_MEM_NODE_INTEGRITY_CHECK
bool "Enable integrity check or not"
default n

View File

@@ -33,6 +33,7 @@ OpenHarmony LiteOS-A内核是基于Huawei LiteOS内核演进发展的新一代
│ ├── quickstart # 系统快速启动接口目录
│ ├── random # 随机数设备驱动
│ └── video # framebuffer驱动框架
├── figures # 内核架构图
├── fs # 文件系统模块主要来源于NuttX开源项目
│ ├── fat # fat文件系统
│ ├── jffs2 # jffs2文件系统
@@ -54,7 +55,9 @@ OpenHarmony LiteOS-A内核是基于Huawei LiteOS内核演进发展的新一代
│ ├── include # 对外暴露头文件存放目录
│ └── uart # 串口相关逻辑代码
├── security # 安全特性相关的代码包括进程权限管理和虚拟id映射管理
├── shell # 接收用户输入的命令,内核去执行
├── syscall # 系统调用
├── testsuilts # 测试套件
└── tools # 构建工具及相关配置和代码
```

View File

@@ -422,7 +422,7 @@ static void DoCmdExec(const char *cmdName, const char *cmdline, unsigned int len
forkPid = fork();
if (forkPid < 0) {
printf("Faild to fork from shell\n");
printf("Failed to fork from shell\n");
return;
} else if (forkPid == 0) {
ChildExec(cmdParsed->paramArray[0], cmdParsed->paramArray, foreground);

View File

@@ -500,7 +500,7 @@ static void lwip_tftp_send_error(s32_t iSockNum, u32_t ulError, const char *szEr
}
}
/* INTEFACE to get a file using filename
/* INTERFACE to get a file using filename
ulHostAddr - IP address of Host
szSrcFileName - Source file
szDestDirPath - Destination file path
@@ -1419,7 +1419,7 @@ err_handler:
}
#ifdef TFTP_TO_RAWMEM
/* INTEFACE to get a file using filename
/* INTERFACE to get a file using filename
ulHostAddr - IP address of Host
szSrcFileName - Source file
szDestMemAddr - The target memory address in the client

View File

@@ -276,11 +276,11 @@ mmu_setup:
mov r12, #0x7 /* 0b0111 */
mcr p15, 0, r12, c3, c0, 0 /* Set DACR with 0b0111, client and manager domian */
isb
mrc p15, 0, r12, c1, c0, 1 /* ACTLR, Auxlliary Control Register */
mrc p15, 0, r12, c1, c0, 1 /* ACTLR, Auxiliary Control Register */
orr r12, r12, #(1 << 6) /* SMP, Enables coherent requests to the processor. */
orr r12, r12, #(1 << 2) /* Enable D-side prefetch */
orr r12, r12, #(1 << 11) /* Global BP Enable bit */
mcr p15, 0, r12, c1, c0, 1 /* ACTLR, Auxlliary Control Register */
mcr p15, 0, r12, c1, c0, 1 /* ACTLR, Auxiliary Control Register */
dsb
mrc p15, 0, r12, c1, c0, 0
bic r12, #(1 << 29 | 1 << 28) /* Disable TRE/AFE */

View File

@@ -71,7 +71,7 @@
#ifdef LOSCFG_AARCH64
/*
* This two structures originally did't exit,
* This two structures originally didn't exit,
* they added by liteos to support 64bit interfaces on 32bit platform,
* in 64bit platform, timeval64 define to timeval which is platform adaptive.
*/

View File

@@ -64,7 +64,7 @@ extern "C" {
#define MBR_PRIMARY_PART_NUM 4
#define JUMP_CODE "\xEB\xFE\x90"
/* Partiton type */
/* Partition type */
#define FAT12 0x01 /* FAT12 as primary partition in first physical 32MB */
#define FAT16 0x04 /* FAT16 with less than 65536 sectors(32MB) */
#define EXTENDED_PARTITION_CHS 0x05

View File

@@ -179,7 +179,7 @@ static INT FatfsDisablePart(void *handle)
* Scan the FAT inside the boundary of CHILD FATFS limit, and update the free cluster and last cluster
* for all CHILD FATFS.
* Acceptable Return Value:
* - FR_OK : Successfully scaned the FAT and update field.
* - FR_OK : Successfully scanned the FAT and update field.
* Others Return Value:
* - FR_INVAILD_FATFS : The FATFS object has error or the info in it has been occuried
* - FR_DENIED : The virtual partition feature has been shut down by switcher

View File

@@ -373,7 +373,7 @@ static FRESULT FatfsCheckScanFatParam(FATFS *fs)
* Scan the FAT inside the boundary of CHILD FATFS limit, and update the free cluster and last cluster
*
* Acceptable Return Value:
* - FR_OK : Successfully scaned the FAT and update field.
* - FR_OK : Successfully scanned the FAT and update field.
*
* Others Return Value:
* - FR_INVAILD_FATFS : The FATFS object has error or the info in it has been occuried

View File

@@ -5499,7 +5499,7 @@ diff -Nupr old/fs/jffs2/readinode.c new/fs/jffs2/readinode.c
break;
default:
+ JFFS2_ERROR("Unknow f->inocache->state %d!\n", f->inocache->state);
+ JFFS2_ERROR("Unknown f->inocache->state %d!\n", f->inocache->state);
BUG();
}
}

View File

@@ -135,7 +135,7 @@ void ProcFdInit(void)
{
struct ProcDirEntry *pde = CreateProcEntry("fd", 0, NULL);
if (pde == NULL) {
PRINT_ERR("creat /proc/fd error.\n");
PRINT_ERR("create /proc/fd error.\n");
return;
}

View File

@@ -91,7 +91,7 @@ void ProcMountsInit(void)
{
struct ProcDirEntry *pde = CreateProcEntry("mounts", 0, NULL);
if (pde == NULL) {
PRINT_ERR("creat mounts error!\n");
PRINT_ERR("create mounts error!\n");
return;
}

View File

@@ -78,7 +78,7 @@ void ProcUptimeInit(void)
{
struct ProcDirEntry *pde = CreateProcEntry("uptime", 0, NULL);
if (pde == NULL) {
PRINT_ERR("creat /proc/uptime error!\n");
PRINT_ERR("create /proc/uptime error!\n");
return;
}

View File

@@ -138,7 +138,7 @@ typedef struct tagOsBcache {
* <li>The block number is automatically adjusted if position is greater than block size.</li>
* </ul>
*
* @retval #0 read succeded
* @retval #0 read succeeded
* @retval #INT32 read failed
*
* @par Dependency:
@@ -168,7 +168,7 @@ INT32 BlockCacheRead(OsBcache *bc,
* <li>The block number is automatically adjusted if position is greater than block size.</li>
* </ul>
*
* @retval #0 write succeded
* @retval #0 write succeeded
* @retval #INT32 write failed
*
* @par Dependency:
@@ -193,7 +193,7 @@ INT32 BlockCacheWrite(OsBcache *bc,
* <li>None.</li>
* </ul>
*
* @retval #0 sync succeded
* @retval #0 sync succeeded
* @retval #INT32 sync failed
*
* @par Dependency:
@@ -219,7 +219,7 @@ INT32 BlockCacheSync(OsBcache *bc);
* <li>None.</li>
* </ul>
*
* @retval #OsBcache * init succeded
* @retval #OsBcache * init succeeded
* @retval #NULL init failed
*
* @par Dependency:

View File

@@ -284,7 +284,7 @@ static int SigProcessSignalHandler(LosTaskCB *tcb, void *arg)
return 0;
}
/* If the default tcb is not setted, then set this one as default. */
/* If the default tcb is not set, then set this one as default. */
if (!info->defaultTcb) {
info->defaultTcb = tcb;
}
@@ -305,7 +305,7 @@ static int SigProcessSignalHandler(LosTaskCB *tcb, void *arg)
/* Is this signal unblocked on this thread? */
isMember = OsSigIsMember(&tcb->sig.sigprocmask, info->sigInfo->si_signo);
if ((!isMember) && (!info->receivedTcb) && (tcb != info->awakenedTcb)) {
/* if unblockedTcb of this signal is not setted, then set it. */
/* if unblockedTcb of this signal is not set, then set it. */
if (!info->unblockedTcb) {
info->unblockedTcb = tcb;
}

View File

@@ -1238,7 +1238,7 @@ STATIC CONSOLE_CB *OsConsoleCreate(UINT32 consoleID, const CHAR *deviceName)
ret = (INT32)LOS_SemCreate(1, &consoleCB->consoleSem);
if (ret != LOS_OK) {
PRINT_ERR("creat sem for uart failed\n");
PRINT_ERR("create sem for uart failed\n");
goto ERR_WITH_BUF;
}

View File

@@ -1026,7 +1026,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 CheckPara(IpcContent *content, UINT32 *dstTid)
#endif
break;
default:
PRINT_DEBUG("Unknow msg type:%d\n", msg->type);
PRINT_DEBUG("Unknown msg type:%d\n", msg->type);
return -EINVAL;
}
@@ -1118,13 +1118,13 @@ LITE_OS_SEC_TEXT STATIC UINT32 CheckRecievedMsg(IpcListNode *node, IpcContent *c
}
#if (USE_TIMESTAMP == 1)
if (node->msg.timestamp != content->outMsg->timestamp) {
PRINT_ERR("Recieve a unmatch reply, drop it\n");
PRINT_ERR("Receive a unmatch reply, drop it\n");
ret = -EINVAL;
}
#else
if ((node->msg.code != content->outMsg->code) ||
(node->msg.target.token != content->outMsg->target.token)) {
PRINT_ERR("Recieve a unmatch reply, drop it\n");
PRINT_ERR("Receive a unmatch reply, drop it\n");
ret = -EINVAL;
}
#endif
@@ -1132,7 +1132,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 CheckRecievedMsg(IpcListNode *node, IpcContent *c
case MT_DEATH_NOTIFY:
break;
default:
PRINT_ERR("Unknow msg type:%d\n", node->msg.type);
PRINT_ERR("Unknown msg type:%d\n", node->msg.type);
ret = -EINVAL;
}
if (ret != LOS_OK) {
@@ -1310,7 +1310,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 HandleCmsCmd(CmsCmdContent *content)
}
return AddServiceAccess(localContent.taskID, localContent.serviceHandle);
default:
PRINT_DEBUG("Unknow cmd cmd:%d\n", localContent.cmd);
PRINT_DEBUG("Unknown cmd cmd:%d\n", localContent.cmd);
return -EINVAL;
}
return ret;
@@ -1375,7 +1375,7 @@ LITE_OS_SEC_TEXT int LiteIpcIoctl(struct file *filep, int cmd, unsigned long arg
}
break;
default:
PRINT_ERR("Unknow liteipc ioctl cmd:%d\n", cmd);
PRINT_ERR("Unknown liteipc ioctl cmd:%d\n", cmd);
return -EINVAL;
}
return (INT32)ret;

View File

@@ -977,7 +977,7 @@ extern UINT32 LOS_TaskInfoGet(UINT32 taskID, TSK_INFO_S *taskInfo);
*
* @attention
* <ul>
* <li>If any low LOSCFG_KERNEL_CORE_NUM bit of the mask is not setted, an error is reported.</li>
* <li>If any low LOSCFG_KERNEL_CORE_NUM bit of the mask is not set, an error is reported.</li>
* </ul>
*
* @param uwTaskID [IN] Type #UINT32 Task ID. The task id value is obtained from task creation.
@@ -987,7 +987,7 @@ extern UINT32 LOS_TaskInfoGet(UINT32 taskID, TSK_INFO_S *taskInfo);
* @retval #LOS_ERRNO_TSK_ID_INVALID Invalid task ID.
* @retval #LOS_ERRNO_TSK_NOT_CREATED The task is not created.
* @retval #LOS_ERRNO_TSK_CPU_AFFINITY_MASK_ERR The task cpu affinity mask is incorrect.
* @retval #LOS_OK The task cpu affinity mask is successfully setted.
* @retval #LOS_OK The task cpu affinity mask is successfully set.
* @par Dependency:
* <ul><li>los_task.h: the header file that contains the API declaration.</li></ul>
* @see LOS_TaskCpuAffiGet

View File

@@ -243,7 +243,7 @@ struct ifconfig_option {
unsigned char ethaddr[6];
u16_t mtu;
/* when using telnet, print to the telnet socket will result in system */
/* deadlock. So we cahe the prinf data to a buf, and when the tcpip */
/* deadlock. So we cache the print data to a buf, and when the tcpip */
/* callback returns, then print the data out to the telnet socket */
sys_sem_t cb_completed;
char cb_print_buf[PRINT_BUF_LEN];
@@ -1158,9 +1158,9 @@ struct arp_option {
unsigned int ipaddr;
/* hw addr */
unsigned char ethaddr[6];
/* when using telnet, printf to the telnet socket will result in system */
/* deadlock.so don't do it.cahe the data to prinf to a buf, and when */
/* callback returns, then printf the data out to the telnet socket */
/* when using telnet, print to the telnet socket will result in system */
/* deadlock.so don't do it. cache the data to print to a buf, and when */
/* callback returns, then print the data out to the telnet socket */
sys_sem_t cb_completed;
char cb_print_buf[PRINT_BUF_LEN];
int print_buf_len;
@@ -1326,7 +1326,7 @@ out:
} else if (ret == ERR_RTE) {
(void)snprintf_s(arp_cmd->cb_print_buf, PRINT_BUF_LEN, (PRINT_BUF_LEN - 1), "Network is unreachable\n");
} else {
(void)snprintf_s(arp_cmd->cb_print_buf, PRINT_BUF_LEN, (PRINT_BUF_LEN - 1), "Successed\n");
(void)snprintf_s(arp_cmd->cb_print_buf, PRINT_BUF_LEN, (PRINT_BUF_LEN - 1), "Succeeded\n");
}
}
#endif
@@ -2234,13 +2234,13 @@ u32_t osShellPing6(int argc, const char **argv)
}
if ((u32_t)ret < sizeof(struct icmp6_echo_hdr *)) {
/* Drop the packet if its too short [Doesnot contain even the header !!] */
/* Drop the packet if its too short [Doesn't contain even the header !!] */
PRINTK("ping6 : received ICMP echo response too short\n");
goto REDUCE_SELECT_TIME;
}
/* Acceping the ICMPv6 payload. */
/* Here, pbuf_resp->payload wont contain IPv6 Header since its an AF_INET6 RAW Socket */
/* Here, pbuf_resp->payload won't contain IPv6 Header since its an AF_INET6 RAW Socket */
iecho_resp = (struct icmp6_echo_hdr *)pbuf_resp->payload;
if (iecho_resp->id == icmpv6_id) {
@@ -2283,7 +2283,7 @@ u32_t osShellPing6(int argc, const char **argv)
/* Checking if its a delayed packet */
if ((iecho_resp->seqno != icmpv6_seq) && (nsent < ping6_params.pingcount)) {
/* Incase of delayed packet wait on socket for other response before sending a new PING */
/* In case of delayed packet wait on socket for other response before sending a new PING */
/* We have to reduce the timeout value now when selecting on socket */
goto REDUCE_SELECT_TIME;
}
@@ -2313,7 +2313,7 @@ REDUCE_SELECT_TIME:
nsent, nrecieve, (float)(((float)(nsent - nrecieve)) * ((float)(100)) / ((float)(nsent))),
((last.tv_sec - first.tv_sec) * 1000 + (last.tv_nsec - first.tv_nsec) / 1000000));
if (nrecieve) {
/* Display rtt stats only if atleast one packet is received */
/* Display rtt stats only if at least one packet is received */
PRINTK("rtt min/avg/max = %u/%.2f/%u ms\n", ping6_stats.min_rtt, ping6_stats.avg_rtt, ping6_stats.max_rtt);
}
@@ -2778,7 +2778,7 @@ int netstat_get_udp_sendQLen6(struct udp_pcb *udppcb, struct pbuf *udpbuf)
goto FUNC_OUT;
}
/* check if there is enough space for atleast udp header available */
/* check if there is enough space for at least udp header available */
if (udpbuf->tot_len < UDP_HLEN) {
goto FUNC_OUT;
}

View File

@@ -601,7 +601,7 @@ LWIP_STATIC void handle_request(struct netif *netif, struct dhcps *dhcps, struct
dhcp_common_option_byte(srvr_msg, DHCP_NAK, &options_len);
/* Just set this here, so that the NAK message is brcasted.
The correct flags has already been added in the respose message during base message creation */
The correct flags has already been added in the response message during base message creation */
client_msg->flags |= htons(DHCP_BROADCAST_FLAG);
client_msg->ciaddr.addr = 0; /* This is done so that NAK Gets brcasted */
#ifdef LWIP_DEV_DEBUG

View File

@@ -51,7 +51,7 @@ static UINT32 Testcase(void)
g_testCount = 0;
TEST_TASK_PARAM_INIT(task1, "it_smp_task_035", (TSK_ENTRY_FUNC)TaskF02Preempt, TASK_PRIO_TEST_TASK - 1);
/* creat preempt task */
/* create preempt task */
task1.usCpuAffiMask = 0;
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);

View File

@@ -61,7 +61,7 @@ static UINT32 Testcase(void)
TEST_TASK_PARAM_INIT(task1, "it_smp_task_042", (TSK_ENTRY_FUNC)TaskF01, TASK_PRIO_TEST_TASK);
int i;
/* creat high prio task on every cores */
/* create high prio task on every cores */
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM - 1; i++) {
/* take control of every cores */
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK((ArchCurrCpuid() + i + 1) % (LOSCFG_KERNEL_CORE_NUM));

View File

@@ -59,7 +59,7 @@ static UINT32 Testcase(void)
TSK_INIT_PARAM_S task1 = { 0 };
g_testCount = 0;
// 5, lengh of the queue; 50, max queue msg size.
// 5, length of the queue; 50, max queue msg size.
ret = LOS_QueueCreate("queue", 5, &g_queue, 0, 50);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);

View File

@@ -58,7 +58,7 @@ static UINT32 Testcase(void)
TSK_INIT_PARAM_S task1 = { 0 };
g_testCount = 0;
// 5, lengh of the queue; 50, max queue msg size.
// 5, length of the queue; 50, max queue msg size.
ret = LOS_QueueCreate("queue", 5, &g_queue, 0, 50);
TEST_TASK_PARAM_INIT(task1, "it_smp_task_063", (TSK_ENTRY_FUNC)TaskF01, TASK_PRIO_TEST_TASK - 1);

View File

@@ -72,7 +72,7 @@ static UINT32 Testcase(void)
TSK_INIT_PARAM_S task1 = { 0 };
g_testCount = 0;
// 5, lengh of the queue; 50, max queue msg size.
// 5, length of the queue; 50, max queue msg size.
ret = LOS_QueueCreate("queue", 5, &g_queue, 0, 50);
TEST_TASK_PARAM_INIT(task1, "it_smp_task_068", (TSK_ENTRY_FUNC)TaskF01, TASK_PRIO_TEST_TASK - 1);

View File

@@ -71,7 +71,7 @@ static UINT32 Testcase(void)
UINT32 ret;
TSK_INIT_PARAM_S task1 = { 0 };
g_testCount = 0;
// 5, lengh of the queue; 50, max queue msg size.
// 5, length of the queue; 50, max queue msg size.
ret = LOS_QueueCreate("queue", 5, &g_queue, 0, 50);
TEST_TASK_PARAM_INIT(task1, "it_smp_task_065", (TSK_ENTRY_FUNC)TaskF01, TASK_PRIO_TEST_TASK - 1);

View File

@@ -57,7 +57,7 @@ static UINT32 Testcase(void)
int i;
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {
/* creat core_num same priority tasks */
/* create core_num same priority tasks */
task1.usCpuAffiMask = 0;
ret = LOS_TaskCreate(&testTaskIDSmp[i], &task1);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
@@ -72,7 +72,7 @@ static UINT32 Testcase(void)
timesliceCount2 = TestTickCountGet();
/* Check if task yield definitely successed */
/* Check if task yield definitely succeeded */
ICUNIT_GOTO_NOT_EQUAL(timesliceCount2, timesliceCount1, timesliceCount2 - timesliceCount1, EXIT);
for (i = 0; i < LOSCFG_KERNEL_CORE_NUM; i++) {

View File

@@ -115,7 +115,7 @@ VOID ItSuiteLosSem(void)
ItLosSem037();
ItLosSem038();
#ifndef LOSCFG_KERNEL_SMP_TASK_SYNC
// LOSCFG_KERNEL_SMP_TASK_SYNC is opened ,create task success is depend on created semaphore successed;
// LOSCFG_KERNEL_SMP_TASK_SYNC is opened ,create task success is depend on created semaphore succeeded;
ItLosSem039();
ItLosSem040();
ItLosSem041();

View File

@@ -39,7 +39,7 @@ extern "C" {
/* pthread_mutex_init 4-1.c
* Test that pthread_mutex_init()
* Upon succesful completion, it shall return a 0
* Upon successful completion, it shall return a 0
*
*/
static UINT32 Testcase(VOID)

View File

@@ -39,7 +39,7 @@ extern "C" {
/* pthread_mutex_destroy 3-1.c
* Test that pthread_mutex_destroy()
* Upon succesful completion, it shall return a 0
* Upon successful completion, it shall return a 0
*
*/
static UINT32 Testcase(VOID)

View File

@@ -43,7 +43,7 @@ extern "C" {
* source tree.
* Test that pthread_mutex_lock()
* Upon succesful completion, it shall return a 0
* Upon successful completion, it shall return a 0
*
*/
static UINT32 Testcase(VOID)

View File

@@ -42,7 +42,7 @@ extern "C" {
* shall release the mutex object 'mutex'.
* Steps:
* -- Initilize a mutex object
* -- initialize a mutex object
* -- Get the mutex using pthread_mutex_lock()
* -- Release the mutex using pthread_mutex_unlock()
* -- Try to get the mutex using pthread_mutex_trylock()

View File

@@ -39,7 +39,7 @@ extern "C" {
/* pthread_mutex_unlock 3-1.c
* Test that pthread_mutex_unlock()
* Upon succesful completion, it shall return zero
* Upon successful completion, it shall return zero
*
*/
static UINT32 Testcase(VOID)

View File

@@ -38,7 +38,7 @@ extern "C" {
/* pthread_mutex_trylock 3-1.c
* Test that pthread_mutex_trylock()
* Upon succesful completion, it shall return a 0
* Upon successful completion, it shall return a 0
*
*/
static UINT32 Testcase(VOID)

View File

@@ -43,7 +43,7 @@ extern "C" {
* -[EBUSY] The mutex could not be acquired because it was already locked.
* Steps:
* -- Initilize a mutex object
* -- initialize a mutex object
* -- Lock the mutex using pthread_mutex_lock()
* -- Try to lock the mutex using pthread_mutex_trylock() and expect EBUSY
*

View File

@@ -366,7 +366,7 @@ VOID TestInitUartDev(VOID) {}
/* ****************************************
Function:Test_PartInit
Description: creat a partition for testing,partition num is 0,mount point is jffs0
Description: create a partition for testing,partition num is 0,mount point is jffs0
Input:
[1]type: "spinor"
[2]start_addr: the partition start address

View File

@@ -196,7 +196,7 @@ static void HandleServiceRegAndGet(int fd, IpcMsg *data)
}
}
}
printf("recieve service request, code:%d, service name:%s\n", data->code, info->serviceName);
printf("receive service request, code:%d, service name:%s\n", data->code, info->serviceName);
switch (data->code) {
case REG_CODE:
if (i == MAX_SREVICE_NUM) {

View File

@@ -162,8 +162,8 @@ static int TestCase(void)
exit(-1);
}
printf("1 pending=%d\n", pending.__bits[0]);
printf("1 oldmask=%d\n", oldmask.__bits[0]);
printf("1 pending=%lu\n", pending.__bits[0]);
printf("1 oldmask=%lu\n", oldmask.__bits[0]);
printf("before raise\n");
raise(SIGALRM);
printf("after raise\n");
@@ -172,7 +172,7 @@ static int TestCase(void)
printf("errline = %d\n", __LINE__);
exit(-1);
}
printf("pending=%d,sigismem = %d\n", pending.__bits[0], sigismember(&pending, SIGALRM));
printf("pending=%d,sigismem = %lu\n", pending.__bits[0], sigismember(&pending, SIGALRM));
exit(0);
}
sleep(1);

View File

@@ -131,7 +131,7 @@ static int TestMultiPthreadFatherProcessExit()
sleep(1);
retValue = waitpid(fpids, &status, 0);
// grandchild process kill father process, so child process is recovered by init process
// child process doesn't receive termination singal from grandchild process
// child process doesn't receive termination signal from grandchild process
// so waitpid() returns -1
ICUNIT_ASSERT_EQUAL(retValue, -1, retValue);
exit(1);

View File

@@ -82,10 +82,10 @@ EXIT:
4. use the mq_close to close the mqueue;
5. use the mq_unlink to delete the mqueue.
*-@texpect
1. Return successed
2. Return successed
3. Return successed
4. Return successed
1. Return succeeded
2. Return succeeded
3. Return succeeded
4. Return succeeded
5. Successful operation
*-@tprior 1
*-@tauto TRUE

View File

@@ -39,7 +39,7 @@ static UINT32 TestCase(VOID)
x = nrand48(seed);
if ((x < 0) || (x > MAX_NRAND48)) {
printf("[IN %s][line %d] x = %d\n", __FUNCTION__, __LINE__, x);
printf("[IN %s][line %d] x = %ld\n", __FUNCTION__, __LINE__, x);
goto EXIT;
}

View File

@@ -38,7 +38,7 @@ static UINT32 TestCase(VOID)
x = random();
if (x > labs(MAX_RANDOM - 1)) {
printf("[IN %s][line %d] x = %d\n", __FUNCTION__, __LINE__, x);
printf("[IN %s][line %d] x = %ld\n", __FUNCTION__, __LINE__, x);
goto EXIT;
}

View File

@@ -39,7 +39,7 @@ static UINT32 TestCase(VOID)
x = jrand48(seed);
if ((x < -JRAND48_NUM) || (x > JRAND48_NUM)) {
printf("[IN %s][line %d] x = %d\n", __FUNCTION__, __LINE__, x);
printf("[IN %s][line %d] x = %ld\n", __FUNCTION__, __LINE__, x);
goto EXIT;
}

View File

@@ -40,7 +40,7 @@ static UINT32 TestCase(VOID)
lcong48(seed);
x = mrand48();
if ((x < -MRAND48_NUM) || (x > MRAND48_NUM)) {
printf("[IN %s][line %d] x = %d\n", __FUNCTION__, __LINE__, x);
printf("[IN %s][line %d] x = %ld\n", __FUNCTION__, __LINE__, x);
goto EXIT;
}