From 6d63f75e7fafa0fa7198e88fa0546d9038787ac7 Mon Sep 17 00:00:00 2001 From: zhushengle Date: Mon, 26 Apr 2021 19:54:49 +0800 Subject: [PATCH 01/36] fix:Solve the coupling between the kernel and the structure under ARCH. Close #I3OAFR Change-Id: Icea238e20adf402d0ec1fc7e47ff4e58124a5e83 --- arch/arm/arm/src/include/los_hw_pri.h | 56 +++-- arch/arm/arm/src/los_dispatch.S | 140 ++++------- arch/arm/arm/src/los_exc.c | 18 +- arch/arm/arm/src/los_hw.c | 55 +++-- arch/arm/arm/src/los_hw_exc.S | 275 ++++++++++----------- arch/arm/arm/src/startup/reset_vector_mp.S | 47 +--- arch/arm/arm/src/startup/reset_vector_up.S | 47 +--- arch/arm/include/los_exc.h | 26 +- arch/arm/include/los_sys_stack_pri.h | 8 - kernel/base/core/los_process.c | 19 +- kernel/base/core/los_task.c | 2 +- kernel/base/include/los_signal.h | 29 +-- kernel/base/include/los_vm_fault.h | 6 +- kernel/base/ipc/los_signal.c | 139 +++-------- kernel/base/vm/los_vm_fault.c | 6 +- syscall/los_syscall.c | 32 +-- 16 files changed, 328 insertions(+), 577 deletions(-) diff --git a/arch/arm/arm/src/include/los_hw_pri.h b/arch/arm/arm/src/include/los_hw_pri.h index 052da990..23533daa 100644 --- a/arch/arm/arm/src/include/los_hw_pri.h +++ b/arch/arm/arm/src/include/los_hw_pri.h @@ -34,8 +34,7 @@ #include "los_base.h" #include "los_hw.h" -#include "los_process_pri.h" -#include "los_signal.h" + #ifdef __cplusplus #if __cplusplus extern "C" { @@ -56,23 +55,43 @@ typedef struct { UINT32 regFPSCR; /* FPSCR */ UINT32 regFPEXC; /* FPEXC */ #endif - UINT32 resved; /* It's stack 8 aligned */ - UINT32 regPSR; - UINT32 R[GEN_REGS_NUM]; /* R0-R12 */ - UINT32 SP; /* R13 */ - UINT32 LR; /* R14 */ - UINT32 PC; /* R15 */ + UINT32 R4; + UINT32 R5; + UINT32 R6; + UINT32 R7; + UINT32 R8; + UINT32 R9; + UINT32 R10; + UINT32 R11; + + UINT32 resved2; + UINT32 resved1; + UINT32 USP; + UINT32 ULR; + UINT32 R0; + UINT32 R1; + UINT32 R2; + UINT32 R3; + UINT32 R12; + UINT32 LR; + UINT32 PC; + UINT32 CPSR; } TaskContext; typedef struct { -#if !defined(LOSCFG_ARCH_FPU_DISABLE) - UINT64 D[FP_REGS_NUM]; /* D0-D31 */ - UINT32 regFPSCR; /* FPSCR */ - UINT32 regFPEXC; /* FPEXC */ -#endif - UINT32 resved; - TASK_IRQ_CONTEXT -} TaskIrqContext; + UINT32 resved2; + UINT32 resved1; + UINT32 USP; + UINT32 ULR; + UINT32 R0; + UINT32 R1; + UINT32 R2; + UINT32 R3; + UINT32 R12; + UINT32 LR; + UINT32 PC; + UINT32 CPSR; +} IrqContext; /* * Description : task stack initialization @@ -82,8 +101,9 @@ typedef struct { * Return : pointer to the task context */ extern VOID *OsTaskStackInit(UINT32 taskID, UINT32 stackSize, VOID *topStack, BOOL initFlag); -extern VOID OsUserCloneParentStack(LosTaskCB *childTaskCB, LosTaskCB *parentTaskCB); -extern VOID OsUserTaskStackInit(TaskContext *context, TSK_ENTRY_FUNC taskEntry, UINTPTR stack); +extern VOID OsUserCloneParentStack(VOID *childStack, UINTPTR parentTopOfStask, UINT32 parentStackSize); +extern VOID OsUserTaskStackInit(TaskContext *context, UINTPTR taskEntry, UINTPTR stack); +extern VOID *OsInitSignalContext(VOID *sp, UINTPTR sigHandler, UINT32 signo, UINT32 param); extern void arm_clean_cache_range(UINTPTR start, UINTPTR end); extern void arm_inv_cache_range(UINTPTR start, UINTPTR end); diff --git a/arch/arm/arm/src/los_dispatch.S b/arch/arm/arm/src/los_dispatch.S index 1f9c2469..ac314224 100644 --- a/arch/arm/arm/src/los_dispatch.S +++ b/arch/arm/arm/src/los_dispatch.S @@ -32,6 +32,7 @@ #include "asm.h" #include "arch_config.h" + .extern OsSaveSignalContext .extern OsSchedToUserReleaseLock .global OsTaskSchedule .global OsTaskContextLoad @@ -85,17 +86,16 @@ */ OsTaskSchedule: MRS R2, CPSR - STMFD SP!, {LR} - STMFD SP!, {LR} - /* jump sp */ - SUB SP, SP, #4 - - /* push r0-r12*/ - STMFD SP!, {R0-R12} STMFD SP!, {R2} + STMFD SP!, {LR} + STMFD SP!, {LR} + STMFD SP!, {R12} - /* 8 bytes stack align */ - SUB SP, SP, #4 + /* jump R0 - R3 USP, ULR resved */ + SUB SP, SP, #(8 * 4) + + /* push R4 - R11*/ + STMFD SP!, {R4-R11} /* save fpu registers */ PUSH_FPU_REGS R2 @@ -113,131 +113,81 @@ OsTaskContextLoad: /* restore fpu registers */ POP_FPU_REGS R2 - /* 8 bytes stack align */ - ADD SP, SP, #4 - - LDMFD SP!, {R0} - MOV R4, R0 - AND R0, R0, #CPSR_MASK_MODE + LDMFD SP!, {R4-R11} + LDR R3, [SP, #(11 * 4)] + AND R0, R3, #CPSR_MASK_MODE CMP R0, #CPSR_USER_MODE BNE OsKernelTaskLoad + MVN R2, #CPSR_INT_DISABLE + AND R3, R3, R2 + STR R3, [SP, #(11 * 4)] + #ifdef LOSCFG_KERNEL_SMP - /* 8 bytes stack align */ - SUB SP, SP, #4 BL OsSchedToUserReleaseLock - ADD SP, SP, #4 #endif - MVN R3, #CPSR_INT_DISABLE - AND R4, R4, R3 - MSR SPSR_cxsf, R4 - - /* restore r0-r12, lr */ - LDMFD SP!, {R0-R12} + /* jump sp, resved */ + ADD SP, SP, #(2 * 4) LDMFD SP, {R13, R14}^ ADD SP, SP, #(2 * 4) - LDMFD SP!, {PC}^ + LDMFD SP!, {R0-R3, R12, LR} + RFEIA SP! OsKernelTaskLoad: - MSR SPSR_cxsf, R4 - /* restore r0-r12, lr */ - LDMFD SP!, {R0-R12} - ADD SP, SP, #4 - LDMFD SP!, {LR, PC}^ + ADD SP, SP, #(4 * 4) + LDMFD SP!, {R0-R3, R12, LR} + RFEIA SP! OsIrqHandler: SUB LR, LR, #4 - /* push r0-r3 to irq stack */ - STMFD SP, {R0-R3} - SUB R0, SP, #(4 * 4) - MRS R1, SPSR - MOV R2, LR + SRSFD #0x13! @ save spsr and pc to the svc stack - /* disable irq, switch to svc mode */ - CPSID i, #0x13 + CPSID i, #0x13 @ disable irq, switch to svc mode - /* push spsr and pc in svc stack */ - STMFD SP!, {R1, R2} - STMFD SP, {LR} - - AND R3, R1, #CPSR_MASK_MODE - CMP R3, #CPSR_USER_MODE - BNE OsIrqFromKernel - - /* push user sp, lr in svc stack */ + STMFD SP!, {R0-R3, R12, LR} STMFD SP, {R13, R14}^ - -OsIrqFromKernel: - /* from svc not need save sp and lr */ - SUB SP, SP, #(2 * 4) - - /* pop r0-r3 form irq stack*/ - LDMFD R0, {R0-R3} - - /* push caller saved regs as trashed regs in svc stack */ - STMFD SP!, {R0-R3, R12} - - /* 8 bytes stack align */ - SUB SP, SP, #4 + SUB SP, SP, #(4 * 4) + STMIA SP, {R4} /* * save fpu regs in case in case those been * altered in interrupt handlers. */ PUSH_FPU_REGS R0 -#ifdef LOSCFG_IRQ_USE_STANDALONE_STACK - PUSH {R4} + MOV R4, SP EXC_SP_SET __svc_stack_top, OS_EXC_SVC_STACK_SIZE, R1, R2 -#endif BLX HalIrqHandler -#ifdef LOSCFG_IRQ_USE_STANDALONE_STACK MOV SP, R4 - POP {R4} -#endif /* process pending signals */ - BL OsTaskProcSignal - - BL OsSchedIrqEndCheckNeedSched - - MOV R0,SP - MOV R1,R7 - BL OsSaveSignalContextIrq + BLX OsTaskProcSignal + BLX OsSchedIrqEndCheckNeedSched /* restore fpu regs */ POP_FPU_REGS R0 + LDMFD SP, {R4} - ADD SP, SP, #4 - -OsIrqContextRestore: - LDR R0, [SP, #(4 * 7)] - MSR SPSR_cxsf, R0 - AND R0, R0, #CPSR_MASK_MODE - CMP R0, #CPSR_USER_MODE - - LDMFD SP!, {R0-R3, R12} - - BNE OsIrqContextRestoreToKernel + LDR R3, [SP, #(11 * 4)] + AND R1, R3, #CPSR_MASK_MODE + CMP R1, #CPSR_USER_MODE + BNE 1f + MOV R0, SP + STMIA SP, {R7} + BLX OsSaveSignalContext + MOV SP, R0 +1: + ADD SP, SP, #(2 * 4) /* load user sp and lr, and jump cpsr */ LDMFD SP, {R13, R14}^ - ADD SP, SP, #(3 * 4) - - /* return to user mode */ - LDMFD SP!, {PC}^ - -OsIrqContextRestoreToKernel: - /* svc mode not load sp */ - ADD SP, SP, #4 - LDMFD SP!, {LR} - /* jump cpsr and return to svc mode */ - ADD SP, SP, #4 - LDMFD SP!, {PC}^ + ADD SP, SP, #(2 * 4) + LDMFD SP!, {R0-R3, R12, LR} + RFEIA SP! FUNCTION(ArchSpinLock) mov r1, #1 diff --git a/arch/arm/arm/src/los_exc.c b/arch/arm/arm/src/los_exc.c index 3197c397..7d8e9e7f 100644 --- a/arch/arm/arm/src/los_exc.c +++ b/arch/arm/arm/src/los_exc.c @@ -104,11 +104,7 @@ STATIC UINT32 g_nextExcWaitCpu = INVALID_CPUID; (IS_ALIGNED((ptr), sizeof(CHAR *)))) STATIC const StackInfo g_excStack[] = { - { &__undef_stack, OS_EXC_UNDEF_STACK_SIZE, "udf_stack" }, - { &__abt_stack, OS_EXC_ABT_STACK_SIZE, "abt_stack" }, - { &__fiq_stack, OS_EXC_FIQ_STACK_SIZE, "fiq_stack" }, { &__svc_stack, OS_EXC_SVC_STACK_SIZE, "svc_stack" }, - { &__irq_stack, OS_EXC_IRQ_STACK_SIZE, "irq_stack" }, { &__exc_stack, OS_EXC_STACK_SIZE, "exc_stack" } }; @@ -183,7 +179,7 @@ STATIC INT32 OsDecodeDataFSR(UINT32 regDFSR) } #ifdef LOSCFG_KERNEL_VM -UINT32 OsArmSharedPageFault(UINT32 excType, ExcContext *frame, UINT32 far, UINT32 fsr) +UINT32 OsArmSharedPageFault(UINT32 excType, PageFaultContext *frame, UINT32 far, UINT32 fsr) { PRINT_INFO("page fault entry!!!\n"); BOOL instruction_fault = FALSE; @@ -211,7 +207,7 @@ UINT32 OsArmSharedPageFault(UINT32 excType, ExcContext *frame, UINT32 far, UINT3 /* permission fault */ case 0b01111: { /* permission fault */ - BOOL user = (frame->regCPSR & CPSR_MODE_MASK) == CPSR_MODE_USR; + BOOL user = (frame->CPSR & CPSR_MODE_MASK) == CPSR_MODE_USR; pfFlags |= write ? VM_MAP_PF_FLAG_WRITE : 0; pfFlags |= user ? VM_MAP_PF_FLAG_USER : 0; pfFlags |= instruction_fault ? VM_MAP_PF_FLAG_INSTRUCTION : 0; @@ -228,9 +224,9 @@ STATIC VOID OsExcType(UINT32 excType, ExcContext *excBufAddr, UINT32 far, UINT32 { /* undefinited exception handling or software interrupt */ if ((excType == OS_EXCEPT_UNDEF_INSTR) || (excType == OS_EXCEPT_SWI)) { - if ((excBufAddr->regCPSR & INSTR_SET_MASK) == 0) { /* work status: ARM */ + if ((excBufAddr->CPSR & INSTR_SET_MASK) == 0) { /* work status: ARM */ excBufAddr->PC = excBufAddr->PC - ARM_INSTR_LEN; - } else if ((excBufAddr->regCPSR & INSTR_SET_MASK) == 0x20) { /* work status: Thumb */ + } else if ((excBufAddr->CPSR & INSTR_SET_MASK) == 0x20) { /* work status: Thumb */ excBufAddr->PC = excBufAddr->PC - THUMB_INSTR_LEN; } } @@ -380,7 +376,7 @@ STATIC VOID OsExcRegsInfo(const ExcContext *excBufAddr) "R12 = 0x%x\n" "CPSR = 0x%x\n", excBufAddr->R7, excBufAddr->R8, excBufAddr->R9, excBufAddr->R10, - excBufAddr->R11, excBufAddr->R12, excBufAddr->regCPSR); + excBufAddr->R11, excBufAddr->R12, excBufAddr->CPSR); } LITE_OS_SEC_TEXT_INIT UINT32 LOS_ExcRegHook(EXC_PROC_FUNC excHook) @@ -808,7 +804,7 @@ VOID OsTaskBackTrace(UINT32 taskID) } PRINTK("TaskName = %s\n", taskCB->taskName); PRINTK("TaskID = 0x%x\n", taskCB->taskID); - BackTrace(((TaskContext *)(taskCB->stackPointer))->R[11]); /* R11 : FP */ + BackTrace(((TaskContext *)(taskCB->stackPointer))->R11); /* R11 : FP */ } VOID OsBackTrace(VOID) @@ -1009,7 +1005,7 @@ LITE_OS_SEC_TEXT VOID STATIC OsExcPriorDisposal(ExcContext *excBufAddr) UINT16 runCount; #endif - if ((excBufAddr->regCPSR & CPSR_MASK_MODE) == CPSR_USER_MODE) { + if ((excBufAddr->CPSR & CPSR_MASK_MODE) == CPSR_USER_MODE) { g_minAddr = USER_ASPACE_BASE; g_maxAddr = USER_ASPACE_BASE + USER_ASPACE_SIZE; g_excFromUserMode[ArchCurrCpuid()] = TRUE; diff --git a/arch/arm/arm/src/los_hw.c b/arch/arm/arm/src/los_hw.c index f7b053dd..25ec5821 100644 --- a/arch/arm/arm/src/los_hw.c +++ b/arch/arm/arm/src/los_hw.c @@ -32,7 +32,6 @@ #include "los_hw_pri.h" #include "los_task_pri.h" - /* support cpu vendors */ CpuVendor g_cpuTable[] = { /* armv7-a */ @@ -72,13 +71,10 @@ VOID OsTaskEntrySetupLoopFrame(UINT32 arg0) LITE_OS_SEC_TEXT_INIT VOID *OsTaskStackInit(UINT32 taskID, UINT32 stackSize, VOID *topStack, BOOL initFlag) { - UINT32 index = 1; - TaskContext *taskContext = NULL; - if (initFlag == TRUE) { OsStackInit(topStack, stackSize); } - taskContext = (TaskContext *)(((UINTPTR)topStack + stackSize) - sizeof(TaskContext)); + TaskContext *taskContext = (TaskContext *)(((UINTPTR)topStack + stackSize) - sizeof(TaskContext)); /* initialize the task context */ #ifdef LOSCFG_GDB @@ -87,22 +83,17 @@ LITE_OS_SEC_TEXT_INIT VOID *OsTaskStackInit(UINT32 taskID, UINT32 stackSize, VOI taskContext->PC = (UINTPTR)OsTaskEntry; #endif taskContext->LR = (UINTPTR)OsTaskExit; /* LR should be kept, to distinguish it's THUMB or ARM instruction */ - taskContext->resved = 0x0; - taskContext->R[0] = taskID; /* R0 */ - taskContext->R[index++] = 0x01010101; /* R1, 0x01010101 : reg initialed magic word */ - for (; index < GEN_REGS_NUM; index++) { - taskContext->R[index] = taskContext->R[index - 1] + taskContext->R[1]; /* R2 - R12 */ - } + taskContext->R0 = taskID; /* R0 */ #ifdef LOSCFG_INTERWORK_THUMB - taskContext->regPSR = PSR_MODE_SVC_THUMB; /* CPSR (Enable IRQ and FIQ interrupts, THUMNB-mode) */ + taskContext->CPSR = PSR_MODE_SVC_THUMB; /* CPSR (Enable IRQ and FIQ interrupts, THUMNB-mode) */ #else - taskContext->regPSR = PSR_MODE_SVC_ARM; /* CPSR (Enable IRQ and FIQ interrupts, ARM-mode) */ + taskContext->CPSR = PSR_MODE_SVC_ARM; /* CPSR (Enable IRQ and FIQ interrupts, ARM-mode) */ #endif #if !defined(LOSCFG_ARCH_FPU_DISABLE) /* 0xAAA0000000000000LL : float reg initialed magic word */ - for (index = 0; index < FP_REGS_NUM; index++) { + for (UINT32 index = 0; index < FP_REGS_NUM; index++) { taskContext->D[index] = 0xAAA0000000000000LL + index; /* D0 - D31 */ } taskContext->regFPSCR = 0; @@ -112,32 +103,42 @@ LITE_OS_SEC_TEXT_INIT VOID *OsTaskStackInit(UINT32 taskID, UINT32 stackSize, VOI return (VOID *)taskContext; } -LITE_OS_SEC_TEXT VOID OsUserCloneParentStack(LosTaskCB *childTaskCB, LosTaskCB *parentTaskCB) +LITE_OS_SEC_TEXT VOID OsUserCloneParentStack(VOID *childStack, UINTPTR parentTopOfStack, UINT32 parentStackSize) { - TaskContext *context = (TaskContext *)childTaskCB->stackPointer; - VOID *cloneStack = (VOID *)(((UINTPTR)parentTaskCB->topOfStack + parentTaskCB->stackSize) - sizeof(TaskContext)); + VOID *cloneStack = (VOID *)(((UINTPTR)parentTopOfStack + parentStackSize) - sizeof(TaskContext)); - LOS_ASSERT(parentTaskCB->taskStatus & OS_TASK_STATUS_RUNNING); - - (VOID)memcpy_s(childTaskCB->stackPointer, sizeof(TaskContext), cloneStack, sizeof(TaskContext)); - context->R[0] = 0; + (VOID)memcpy_s(childStack, sizeof(TaskContext), cloneStack, sizeof(TaskContext)); + ((TaskContext *)childStack)->R0 = 0; } -LITE_OS_SEC_TEXT_INIT VOID OsUserTaskStackInit(TaskContext *context, TSK_ENTRY_FUNC taskEntry, UINTPTR stack) +LITE_OS_SEC_TEXT_INIT VOID OsUserTaskStackInit(TaskContext *context, UINTPTR taskEntry, UINTPTR stack) { LOS_ASSERT(context != NULL); #ifdef LOSCFG_INTERWORK_THUMB - context->regPSR = PSR_MODE_USR_THUMB; + context->CPSR = PSR_MODE_USR_THUMB; #else - context->regPSR = PSR_MODE_USR_ARM; + context->CPSR = PSR_MODE_USR_ARM; #endif - context->R[0] = stack; - context->SP = TRUNCATE(stack, LOSCFG_STACK_POINT_ALIGN_SIZE); - context->LR = 0; + context->R0 = stack; + context->USP = TRUNCATE(stack, LOSCFG_STACK_POINT_ALIGN_SIZE); + context->ULR = 0; context->PC = (UINTPTR)taskEntry; } +VOID *OsInitSignalContext(VOID *sp, UINTPTR sigHandler, UINT32 signo, UINT32 param) +{ + IrqContext *oldSp = (IrqContext *)sp; + IrqContext *newSp = (IrqContext *)((UINTPTR)sp - sizeof(IrqContext)); + newSp->PC = sigHandler; + newSp->R0 = signo; + newSp->R1 = param; + newSp->USP = oldSp->USP; + newSp->CPSR = oldSp->CPSR; + + return (VOID *)newSp; +} + DEPRECATED VOID Dmb(VOID) { __asm__ __volatile__ ("dmb" : : : "memory"); diff --git a/arch/arm/arm/src/los_hw_exc.S b/arch/arm/arm/src/los_hw_exc.S index 007537d1..82d64ffe 100644 --- a/arch/arm/arm/src/los_hw_exc.S +++ b/arch/arm/arm/src/los_hw_exc.S @@ -47,9 +47,10 @@ .extern OsDataAbortExcHandleEntry #endif #endif + .extern OsSaveSignalContext + .extern OsRestorSignalContext .extern OsArmSharedPageFault .extern OsArmA32SyscallHandle - .extern LOS_Exit .global _osExceptFiqHdl .global _osExceptAddrAbortHdl @@ -63,7 +64,6 @@ .global __stack_chk_guard_setup #endif - .fpu vfpv4 .macro PUSH_FPU_REGS reg1 @@ -173,69 +173,78 @@ _osExceptUndefInstrHdl: #ifdef LOSCFG_GDB GDB_HANDLE OsUndefIncExcHandleEntry #else - @ LR offset to return from this exception: 0. - STMFD SP, {R0-R7} @ Push working registers, but don`t change SP. + SRSFD #0x13! + CPSID i, #0x13 + STMFD SP!, {R0-R3, R12, LR} + SUB SP, SP, #(4 * 2) + MOV R2, #0 + MOV R3, #0 + STMFD SP!, {R2-R3} MOV R0, #OS_EXCEPT_UNDEF_INSTR @ Set exception ID to OS_EXCEPT_UNDEF_INSTR. - B _osExceptDispatch @ Branch to global exception handler. #endif @ Description: Software interrupt exception handler _osExceptSwiHdl: - SUB SP, SP, #(4 * 16) - STMIA SP, {R0-R12} - MRS R3, SPSR - MOV R4, LR + SRSFD #0x13! + STMFD SP!, {R0-R3, R12, LR} + STMFD SP, {R13, R14}^ + SUB SP, SP, #(4 * 4) + STMIA SP, {R7} #ifdef LOSCFG_KERNEL_SYSCALL + LDR R3, [SP, #(11 * 4)] AND R1, R3, #CPSR_MASK_MODE @ Interrupted mode CMP R1, #CPSR_USER_MODE @ User mode - BNE OsKernelSVCHandler @ Branch if not user mode + BNE _osKernelSVCHandler @ Branch if not user mode - @ we enter from user mode, we need get the values of USER mode r13(sp) and r14(lr). - @ stmia with ^ will return the user mode registers (provided that r15 is not in the register list). + CMP R7, #119 @ __NR_sigreturn + BNE _osIsSyscall MOV R0, SP - STMFD SP!, {R3} @ Save the CPSR - ADD R3, SP, #(4 * 17) @ Offset to pc/cpsr storage - STMFD R3!, {R4} @ Save the CPSR and r15(pc) - STMFD R3, {R13, R14}^ @ Save user mode r13(sp) and r14(lr) - SUB SP, SP, #4 + BLX OsRestorSignalContext + MOV SP, R0 + B _osSyscallReturn + +_osIsSyscall: + STMFD SP!, {R4-R11} + PUSH_FPU_REGS R1 + MOV R0, SP MOV FP, #0 @ Init frame pointer CPSIE I BLX OsArmA32SyscallHandle CPSID I POP_FPU_REGS R1 - ADD SP, SP,#4 - LDMFD SP!, {R3} @ Fetch the return SPSR - MSR SPSR_cxsf, R3 @ Set the return mode SPSR + LDMFD SP!, {R4-R11} - @ we are leaving to user mode, we need to restore the values of USER mode r13(sp) and r14(lr). - @ ldmia with ^ will return the user mode registers (provided that r15 is not in the register list) + LDR R3, [SP, #(11 * 4)] + AND R1, R3, #CPSR_MASK_MODE + CMP R1, #CPSR_USER_MODE + BNE _osSyscallReturn - LDMFD SP!, {R0-R12} + MOV R0, SP + BLX OsSaveSignalContext + MOV SP, R0 + +_osSyscallReturn: + LDMFD SP, {R7} + ADD SP, SP, #(2 * 4) LDMFD SP, {R13, R14}^ @ Restore user mode R13/R14 ADD SP, SP, #(2 * 4) - LDMFD SP!, {PC}^ @ Return to user + LDMFD SP!, {R0-R3, R12, LR} + RFEIA SP! @ Return to user -OsKernelSVCHandler: +_osKernelSVCHandler: #endif - ADD R0, SP, #(4 * 16) - MOV R5, R0 - STMFD R0!, {R4} @ Store PC - STMFD R0!, {R4} - STMFD R0!, {R5} - - STMFD SP!, {R3} @ Push task`s CPSR (i.e. exception SPSR). - SUB SP, SP, #(4 * 2) @ user sp and lr - + MOV R0, #0 + STR R0, [SP, #0] + STR R0, [SP, #4] MOV R0, #OS_EXCEPT_SWI @ Set exception ID to OS_EXCEPT_SWI. - - B _osExceptionSwi @ Branch to global exception handler. + B _osExceptDispatch @ Branch to global exception handler. @ Description: Prefectch abort exception handler _osExceptPrefetchAbortHdl: @@ -245,20 +254,38 @@ _osExceptPrefetchAbortHdl: #endif #else SUB LR, LR, #4 @ LR offset to return from this exception: -4. - STMFD SP, {R0-R7} @ Push working registers, but don`t change SP. - MOV R5, LR - MRS R1, SPSR - MOV R0, #OS_EXCEPT_PREFETCH_ABORT @ Set exception ID to OS_EXCEPT_PREFETCH_ABORT. + SRSFD #0x13! + CPSID i, #0x13 + STMFD SP!, {R0-R3, R12, LR} + STMFD SP, {R13, R14}^ + SUB SP, SP, #(2 * 4) + + MRC P15, 0, R2, C6, C0, 2 + MRC P15, 0, R3, C5, C0, 1 + STMFD SP!, {R2-R3} #ifdef LOSCFG_KERNEL_VM - AND R4, R1, #CPSR_MASK_MODE @ Interrupted mode - CMP R4, #CPSR_USER_MODE @ User mode - BEQ _osExcPageFault @ Branch if user mode + LDR R0, [SP, #(11 * 4)] + AND R0, R0, #CPSR_MASK_MODE @ Interrupted mode + CMP R0, #CPSR_USER_MODE @ User mode + BNE _osKernelExceptPrefetchAbortHdl + + MOV R1, SP + PUSH_FPU_REGS R0 + + MOV R0, #OS_EXCEPT_PREFETCH_ABORT + CPSIE I + BLX OsArmSharedPageFault + CPSID I + CMP R0, #0 + + POP_FPU_REGS R0 + BEQ _osExcPageFaultReturn #endif _osKernelExceptPrefetchAbortHdl: - MOV LR, R5 + MOV R0, #OS_EXCEPT_PREFETCH_ABORT B _osExceptDispatch @ Branch to global exception handler. #endif @@ -270,122 +297,87 @@ _osExceptDataAbortHdl: #endif #else SUB LR, LR, #8 @ LR offset to return from this exception: -8. - STMFD SP, {R0-R7} @ Push working registers, but don`t change SP. - MOV R5, LR - MRS R1, SPSR + + SRSFD #0x13! + CPSID i, #0x13 + STMFD SP!, {R0-R3, R12, LR} + STMFD SP, {R13, R14}^ + SUB SP, SP, #(2 * 4) + + MRC P15, 0, R2, C6, C0, 0 + MRC P15, 0, R3, C5, C0, 0 + STMFD SP!, {R2-R3} + +#ifdef LOSCFG_KERNEL_VM + MOV R1, SP + PUSH_FPU_REGS R0 MOV R0, #OS_EXCEPT_DATA_ABORT @ Set exception ID to OS_EXCEPT_DATA_ABORT. -#ifdef LOSCFG_KERNEL_VM - B _osExcPageFault -#else + CPSIE I + BLX OsArmSharedPageFault + CPSID I + CMP R0, #0 + POP_FPU_REGS R0 + BEQ _osExcPageFaultReturn +#endif + + MOV R0, #OS_EXCEPT_DATA_ABORT B _osExceptDispatch #endif + +#ifdef LOSCFG_KERNEL_VM +_osExcPageFaultReturn: + ADD SP, SP, #(2 * 4) + LDMFD SP, {R13, R14}^ + ADD SP, SP, #(2 * 4) + LDMFD SP!, {R0-R3, R12, LR} + RFEIA SP! #endif @ Description: Address abort exception handler _osExceptAddrAbortHdl: SUB LR, LR, #8 @ LR offset to return from this exception: -8. - STMFD SP, {R0-R7} @ Push working registers, but don`t change SP. + + SRSFD #0x13! + CPSID i, #0x13 + STMFD SP!, {R0-R3, R12, LR} + STMFD SP, {R13, R14}^ + SUB SP, SP, #(2 * 4) + + MOV R2, #0 + MOV R3, #0 + STMFD SP!, {R2-R3} MOV R0, #OS_EXCEPT_ADDR_ABORT @ Set exception ID to OS_EXCEPT_ADDR_ABORT. - B _osExceptDispatch @ Branch to global exception handler. @ Description: Fast interrupt request exception handler _osExceptFiqHdl: SUB LR, LR, #4 @ LR offset to return from this exception: -4. - STMFD SP, {R0-R7} @ Push working registers. + + SRSFD #0x13! + CPSID i, #0x13 + STMFD SP!, {R0-R3, R12, LR} + STMFD SP, {R13, R14}^ + SUB SP, SP, #(2 * 4) + + MOV R2, #0 + MOV R3, #0 + STMFD SP!, {R2-R3} MOV R0, #OS_EXCEPT_FIQ @ Set exception ID to OS_EXCEPT_FIQ. - B _osExceptDispatch @ Branch to global exception handler. -#ifdef LOSCFG_KERNEL_VM -_osExcPageFault: - SUB R3, SP, #(8 * 4) @ Save the start address of working registers. - MSR CPSR_c, #(CPSR_INT_DISABLE | CPSR_SVC_MODE) @ Switch to SVC mode, and disable all interrupts - MOV R2, SP - STMFD SP!, {R5} @ Push original PC - STMFD SP!, {LR} @ Push original svc LR - STMFD SP!, {R2} @ Push original svc SP - STMFD SP!, {R8-R12} @ Push original R12-R8, - LDMFD R3!, {R4-R11} @ Move original R7-R0 from exception stack to original stack. - STMFD SP!, {R4-R11} - STMFD SP!, {R1} - SUB SP, SP, #8 - STMIA SP, {R13, R14}^ @ Save user mode r13(sp) and r14(lr) - - MOV R4, SP - BIC SP, SP, #7 - PUSH_FPU_REGS R1 - - CMP R0, #OS_EXCEPT_DATA_ABORT - BNE 1f - MRC P15, 0, R2, C6, C0, 0 - MRC P15, 0, R3, C5, C0, 0 - B 2f -1: MRC P15, 0, R2, C6, C0, 2 - MRC P15, 0, R3, C5, C0, 1 - -2: MOV R1, R4 - MOV R5, R0 - MOV R8, R2 - MOV R9, R3 - CPSIE I - BLX OsArmSharedPageFault - CPSID I - - POP_FPU_REGS R1 - MOV SP, R4 - CMP R0, #0 - BEQ _OsExcReturn - - MOV R0, R5 @ exc type - B _osExceptionSwi -#endif - @ Description: Exception handler @ Parameter : R0 Exception Type @ Regs Hold : R3 Exception`s CPSR _osExceptDispatch: - MRS R2, SPSR @ Save CPSR before exception. - MOV R1, LR @ Save PC before exception. - SUB R3, SP, #(8 * 4) @ Save the start address of working registers. - - MSR CPSR_c, #(CPSR_INT_DISABLE | CPSR_SVC_MODE) @ Switch to SVC mode, and disable all interrupts - MOV R5, SP - EXC_SP_SET __exc_stack_top, OS_EXC_STACK_SIZE, R6, R7 - - STMFD SP!, {R1} @ Push Exception PC - STMFD SP!, {LR} @ Push SVC LR - STMFD SP!, {R5} @ Push SVC SP - STMFD SP!, {R8-R12} @ Push original R12-R8, - LDMFD R3!, {R4-R11} @ Move original R7-R0 from exception stack to original stack. STMFD SP!, {R4-R11} - STMFD SP!, {R2} @ Push task`s CPSR (i.e. exception SPSR). + LDR R8, [SP, #(4 * 8)] + LDR R9, [SP, #(4 * 9)] + MOV R1, SP - CMP R0, #OS_EXCEPT_DATA_ABORT - BNE 1f - MRC P15, 0, R8, C6, C0, 0 - MRC P15, 0, R9, C5, C0, 0 - B 3f -1: CMP R0, #OS_EXCEPT_PREFETCH_ABORT - BNE 2f - MRC P15, 0, R8, C6, C0, 2 - MRC P15, 0, R9, C5, C0, 1 - B 3f -2: MOV R8, #0 - MOV R9, #0 - -3: AND R2, R2, #CPSR_MASK_MODE - CMP R2, #CPSR_USER_MODE @ User mode - BNE 4f - STMFD SP, {R13, R14}^ @ save user mode sp and lr -4: - SUB SP, SP, #(4 * 2) - -_osExceptionSwi: - MOV R1, SP @ The second argument to the exception + EXC_SP_SET __exc_stack_top, OS_EXC_STACK_SIZE, R6, R7 MRC P15, 0, R4, C0, C0, 5 AND R4, R4, #MPIDR_CPUID_MASK @ Get Current cpu id @@ -414,19 +406,4 @@ _osExceptionGetSP: LDR R5, =OsExcHandleEntry @ OsExcHandleEntry(UINT32 excType, ExcContext * excBufAddr) BX R5 -_OsExcReturn: - LDR R0, [SP, #(2 * 4)] - AND R0, R0, #CPSR_MASK_MODE - CMP R0, #CPSR_USER_MODE @ User mode - BNE _OsExcReturnToKernel - LDMFD SP, {R13, R14}^ @ load user mode sp and lr - -_OsExcReturnToKernel: - ADD SP, SP, #(2 * 4) - LDMFD SP!, {R1} - MSR SPSR_cxsf, R1 @ Set the return mode SPSR - LDMFD SP!, {R0-R12} - ADD SP, SP, #4 - LDMFD SP!, {LR, PC}^ - .end diff --git a/arch/arm/arm/src/startup/reset_vector_mp.S b/arch/arm/arm/src/startup/reset_vector_mp.S index 964b0137..89331692 100644 --- a/arch/arm/arm/src/startup/reset_vector_mp.S +++ b/arch/arm/arm/src/startup/reset_vector_mp.S @@ -37,17 +37,9 @@ .global __exc_stack_top - .global __irq_stack_top - .global __fiq_stack_top .global __svc_stack_top - .global __abt_stack_top - .global __undef_stack_top .global __exc_stack - .global __irq_stack - .global __fiq_stack .global __svc_stack - .global __abt_stack - .global __undef_stack .extern __bss_start .extern __bss_end @@ -219,35 +211,14 @@ reloc_img_to_bottom_done: bl mmu_setup /* set up the mmu */ #endif /* clear out the interrupt and exception stack and set magic num to check the overflow */ - ldr r0, =__undef_stack + ldr r0, =__svc_stack ldr r1, =__exc_stack_top bl stack_init - STACK_MAGIC_SET __undef_stack, #OS_EXC_UNDEF_STACK_SIZE, OS_STACK_MAGIC_WORD - STACK_MAGIC_SET __abt_stack, #OS_EXC_ABT_STACK_SIZE, OS_STACK_MAGIC_WORD - STACK_MAGIC_SET __irq_stack, #OS_EXC_IRQ_STACK_SIZE, OS_STACK_MAGIC_WORD - STACK_MAGIC_SET __fiq_stack, #OS_EXC_FIQ_STACK_SIZE, OS_STACK_MAGIC_WORD STACK_MAGIC_SET __svc_stack, #OS_EXC_SVC_STACK_SIZE, OS_STACK_MAGIC_WORD STACK_MAGIC_SET __exc_stack, #OS_EXC_STACK_SIZE, OS_STACK_MAGIC_WORD warm_reset: - /* initialize interrupt/exception environments */ - mov r0, #(CPSR_IRQ_DISABLE |CPSR_FIQ_DISABLE|CPSR_IRQ_MODE) - msr cpsr, r0 - EXC_SP_SET __irq_stack_top, #OS_EXC_IRQ_STACK_SIZE - - mov r0, #(CPSR_IRQ_DISABLE|CPSR_FIQ_DISABLE|CPSR_UNDEF_MODE) - msr cpsr, r0 - EXC_SP_SET __undef_stack_top, #OS_EXC_UNDEF_STACK_SIZE - - mov r0, #(CPSR_IRQ_DISABLE|CPSR_FIQ_DISABLE|CPSR_ABT_MODE) - msr cpsr, r0 - EXC_SP_SET __abt_stack_top, #OS_EXC_ABT_STACK_SIZE - - mov r0, #(CPSR_IRQ_DISABLE|CPSR_FIQ_DISABLE|CPSR_FIQ_MODE) - msr cpsr, r0 - EXC_SP_SET __fiq_stack_top, #OS_EXC_FIQ_STACK_SIZE - /* initialize CPSR (machine state register) */ mov r0, #(CPSR_IRQ_DISABLE|CPSR_FIQ_DISABLE|CPSR_SVC_MODE) msr cpsr, r0 @@ -498,22 +469,6 @@ init_flag: .section ".int_stack", "wa", %nobits .align 3 -__undef_stack: - .space OS_EXC_UNDEF_STACK_SIZE * CORE_NUM -__undef_stack_top: - -__abt_stack: - .space OS_EXC_ABT_STACK_SIZE * CORE_NUM -__abt_stack_top: - -__irq_stack: - .space OS_EXC_IRQ_STACK_SIZE * CORE_NUM -__irq_stack_top: - -__fiq_stack: - .space OS_EXC_FIQ_STACK_SIZE * CORE_NUM -__fiq_stack_top: - __svc_stack: .space OS_EXC_SVC_STACK_SIZE * CORE_NUM __svc_stack_top: diff --git a/arch/arm/arm/src/startup/reset_vector_up.S b/arch/arm/arm/src/startup/reset_vector_up.S index 7cd58d6e..5d3b5f61 100644 --- a/arch/arm/arm/src/startup/reset_vector_up.S +++ b/arch/arm/arm/src/startup/reset_vector_up.S @@ -38,17 +38,9 @@ .global __exc_stack_top - .global __irq_stack_top - .global __fiq_stack_top .global __svc_stack_top - .global __abt_stack_top - .global __undef_stack_top .global __exc_stack - .global __irq_stack - .global __fiq_stack .global __svc_stack - .global __abt_stack - .global __undef_stack .extern __bss_start .extern __bss_end @@ -201,36 +193,15 @@ reloc_img_to_bottom_done: excstatck_loop: /* clear out the interrupt and exception stack and set magic num to check the overflow */ - ldr r0, =__undef_stack + ldr r0, =__svc_stack ldr r1, =__exc_stack_top bl stack_init - STACK_MAGIC_SET __undef_stack, #OS_EXC_UNDEF_STACK_SIZE, OS_STACK_MAGIC_WORD - STACK_MAGIC_SET __abt_stack, #OS_EXC_ABT_STACK_SIZE, OS_STACK_MAGIC_WORD - STACK_MAGIC_SET __irq_stack, #OS_EXC_IRQ_STACK_SIZE, OS_STACK_MAGIC_WORD - STACK_MAGIC_SET __fiq_stack, #OS_EXC_FIQ_STACK_SIZE, OS_STACK_MAGIC_WORD STACK_MAGIC_SET __svc_stack, #OS_EXC_SVC_STACK_SIZE, OS_STACK_MAGIC_WORD STACK_MAGIC_SET __exc_stack, #OS_EXC_STACK_SIZE, OS_STACK_MAGIC_WORD excstatck_loop_done: warm_reset: - /* initialize interrupt/exception environments */ - mov r0, #(CPSR_IRQ_DISABLE |CPSR_FIQ_DISABLE|CPSR_IRQ_MODE) - msr cpsr, r0 - EXC_SP_SET __irq_stack_top, #OS_EXC_IRQ_STACK_SIZE - - mov r0, #(CPSR_IRQ_DISABLE|CPSR_FIQ_DISABLE|CPSR_UNDEF_MODE) - msr cpsr, r0 - EXC_SP_SET __undef_stack_top, #OS_EXC_UNDEF_STACK_SIZE - - mov r0, #(CPSR_IRQ_DISABLE|CPSR_FIQ_DISABLE|CPSR_ABT_MODE) - msr cpsr, r0 - EXC_SP_SET __abt_stack_top, #OS_EXC_ABT_STACK_SIZE - - mov r0, #(CPSR_IRQ_DISABLE|CPSR_FIQ_DISABLE|CPSR_FIQ_MODE) - msr cpsr, r0 - EXC_SP_SET __fiq_stack_top, #OS_EXC_FIQ_STACK_SIZE - /* initialize CPSR (machine state register) */ mov r0, #(CPSR_IRQ_DISABLE|CPSR_FIQ_DISABLE|CPSR_SVC_MODE) msr cpsr, r0 @@ -464,22 +435,6 @@ init_flag: .section ".int_stack", "wa", %nobits .align 3 -__undef_stack: - .space OS_EXC_UNDEF_STACK_SIZE * CORE_NUM -__undef_stack_top: - -__abt_stack: - .space OS_EXC_ABT_STACK_SIZE * CORE_NUM -__abt_stack_top: - -__irq_stack: - .space OS_EXC_IRQ_STACK_SIZE * CORE_NUM -__irq_stack_top: - -__fiq_stack: - .space OS_EXC_FIQ_STACK_SIZE * CORE_NUM -__fiq_stack_top: - __svc_stack: .space OS_EXC_SVC_STACK_SIZE * CORE_NUM __svc_stack_top: diff --git a/arch/arm/include/los_exc.h b/arch/arm/include/los_exc.h index 0a265cdc..aab026ec 100644 --- a/arch/arm/include/los_exc.h +++ b/arch/arm/include/los_exc.h @@ -64,25 +64,27 @@ typedef struct { } ExcContext; #else typedef struct { - UINT32 USP; /**< User mode stack pointer */ - UINT32 ULR; /**< User mode program returning address */ - UINT32 regCPSR; /**< Current program status register (CPSR) */ + UINT32 R4; + UINT32 R5; + UINT32 R6; + UINT32 R7; + UINT32 R8; + UINT32 R9; + UINT32 R10; + UINT32 R11; + + UINT32 SP; + UINT32 resved; + UINT32 USP; + UINT32 ULR; UINT32 R0; /**< Register R0 */ UINT32 R1; /**< Register R1 */ UINT32 R2; /**< Register R2 */ UINT32 R3; /**< Register R3 */ - UINT32 R4; /**< Register R4 */ - UINT32 R5; /**< Register R5 */ - UINT32 R6; /**< Register R6 */ - UINT32 R7; /**< Register R7 */ - UINT32 R8; /**< Register R8 */ - UINT32 R9; /**< Register R9 */ - UINT32 R10; /**< Register R10 */ - UINT32 R11; /**< Register R11 */ UINT32 R12; /**< Register R12 */ - UINT32 SP; /**< Stack pointer */ UINT32 LR; /**< Program returning address. */ UINT32 PC; /**< PC pointer of the exceptional function */ + UINT32 CPSR; } ExcContext; #endif diff --git a/arch/arm/include/los_sys_stack_pri.h b/arch/arm/include/los_sys_stack_pri.h index e45e4a66..5681419b 100644 --- a/arch/arm/include/los_sys_stack_pri.h +++ b/arch/arm/include/los_sys_stack_pri.h @@ -44,19 +44,11 @@ extern "C" { extern UINTPTR __stack_startup; extern UINTPTR __stack_startup_top; #else -extern UINTPTR __fiq_stack_top; extern UINTPTR __svc_stack_top; -extern UINTPTR __abt_stack_top; -extern UINTPTR __undef_stack_top; extern UINTPTR __exc_stack_top; -extern UINTPTR __fiq_stack; extern UINTPTR __svc_stack; -extern UINTPTR __abt_stack; -extern UINTPTR __undef_stack; extern UINTPTR __exc_stack; #endif -extern UINTPTR __irq_stack_top; -extern UINTPTR __irq_stack; #ifdef __cplusplus #if __cplusplus diff --git a/kernel/base/core/los_process.c b/kernel/base/core/los_process.c index a8c8130f..34ff61f2 100644 --- a/kernel/base/core/los_process.c +++ b/kernel/base/core/los_process.c @@ -1349,8 +1349,6 @@ LITE_OS_SEC_TEXT UINT32 OsExecRecycleAndInit(LosProcessCB *processCB, const CHAR LITE_OS_SEC_TEXT UINT32 OsExecStart(const TSK_ENTRY_FUNC entry, UINTPTR sp, UINTPTR mapBase, UINT32 mapSize) { - LosTaskCB *taskCB = NULL; - TaskContext *taskContext = NULL; UINT32 intSave; if (entry == NULL) { @@ -1366,14 +1364,17 @@ LITE_OS_SEC_TEXT UINT32 OsExecStart(const TSK_ENTRY_FUNC entry, UINTPTR sp, UINT } SCHEDULER_LOCK(intSave); - taskCB = OsCurrTaskGet(); + LosTaskCB *taskCB = OsCurrTaskGet(); taskCB->userMapBase = mapBase; taskCB->userMapSize = mapSize; taskCB->taskEntry = (TSK_ENTRY_FUNC)entry; - taskContext = (TaskContext *)OsTaskStackInit(taskCB->taskID, taskCB->stackSize, (VOID *)taskCB->topOfStack, FALSE); - OsUserTaskStackInit(taskContext, taskCB->taskEntry, sp); + TaskContext *taskContext = (TaskContext *)OsTaskStackInit(taskCB->taskID, taskCB->stackSize, + (VOID *)taskCB->topOfStack, FALSE); + OsUserTaskStackInit(taskContext, (UINTPTR)taskCB->taskEntry, sp); + taskCB->stackPointer = (VOID *)taskContext; + OsTaskContextLoad(taskCB); SCHEDULER_UNLOCK(intSave); return LOS_OK; } @@ -1555,7 +1556,7 @@ STATIC VOID OsInitCopyTaskParam(LosProcessCB *childProcessCB, const CHAR *name, STATIC UINT32 OsCopyTask(UINT32 flags, LosProcessCB *childProcessCB, const CHAR *name, UINTPTR entry, UINT32 size) { - LosTaskCB *childTaskCB = NULL; + LosTaskCB *runTask = OsCurrTaskGet(); TSK_INIT_PARAM_S childPara = { 0 }; UINT32 ret; UINT32 intSave; @@ -1571,8 +1572,8 @@ STATIC UINT32 OsCopyTask(UINT32 flags, LosProcessCB *childProcessCB, const CHAR return LOS_ENOMEM; } - childTaskCB = OS_TCB_FROM_TID(taskID); - childTaskCB->taskStatus = OsCurrTaskGet()->taskStatus; + LosTaskCB *childTaskCB = OS_TCB_FROM_TID(taskID); + childTaskCB->taskStatus = runTask->taskStatus; if (childTaskCB->taskStatus & OS_TASK_STATUS_RUNNING) { childTaskCB->taskStatus &= ~OS_TASK_STATUS_RUNNING; } else { @@ -1585,7 +1586,7 @@ STATIC UINT32 OsCopyTask(UINT32 flags, LosProcessCB *childProcessCB, const CHAR if (OsProcessIsUserMode(childProcessCB)) { SCHEDULER_LOCK(intSave); - OsUserCloneParentStack(childTaskCB, OsCurrTaskGet()); + OsUserCloneParentStack(childTaskCB->stackPointer, runTask->topOfStack, runTask->stackSize); SCHEDULER_UNLOCK(intSave); } return LOS_OK; diff --git a/kernel/base/core/los_task.c b/kernel/base/core/los_task.c index ac0c5e12..8815a3e4 100644 --- a/kernel/base/core/los_task.c +++ b/kernel/base/core/los_task.c @@ -571,7 +571,7 @@ STATIC UINT32 OsTaskCBInit(LosTaskCB *taskCB, const TSK_INIT_PARAM_S *initParam, taskCB->userArea = initParam->userParam.userArea; taskCB->userMapBase = initParam->userParam.userMapBase; taskCB->userMapSize = initParam->userParam.userMapSize; - OsUserTaskStackInit(taskCB->stackPointer, taskCB->taskEntry, initParam->userParam.userSP); + OsUserTaskStackInit(taskCB->stackPointer, (UINTPTR)taskCB->taskEntry, initParam->userParam.userSP); } if (!processCB->threadNumber) { diff --git a/kernel/base/include/los_signal.h b/kernel/base/include/los_signal.h index 86b9134f..e75f5110 100644 --- a/kernel/base/include/los_signal.h +++ b/kernel/base/include/los_signal.h @@ -48,9 +48,6 @@ extern "C" { #define LOS_BIT_CLR(val, bit) ((val) = (val) & ~(1ULL << (UINT32)(bit))) #define LOS_IS_BIT_SET(val, bit) (bool)((((val) >> (UINT32)(bit)) & 1ULL)) -#define OS_SYSCALL_SET_CPSR(regs, cpsr) (*((unsigned long *)((UINTPTR)(regs) - 4)) = (cpsr)) -#define OS_SYSCALL_SET_SR(regs, cpsr) (*((unsigned long *)((UINTPTR)(regs))) = (cpsr)) -#define OS_SYSCALL_GET_CPSR(regs) (*((unsigned long *)((UINTPTR)(regs) - 4))) #define SIG_STOP_VISIT 1 #define OS_KERNEL_KILL_PERMISSION 0U @@ -135,27 +132,6 @@ struct sq_queue_s { }; typedef struct sq_queue_s sq_queue_t; -#define TASK_IRQ_CONTEXT \ - unsigned int R0; \ - unsigned int R1; \ - unsigned int R2; \ - unsigned int R3; \ - unsigned int R12; \ - unsigned int USP; \ - unsigned int ULR; \ - unsigned int CPSR; \ - unsigned int PC; - -typedef struct { - TASK_IRQ_CONTEXT -} TaskIrqDataSize; - -typedef struct { - TASK_IRQ_CONTEXT - unsigned int R7; - unsigned int count; -} sig_switch_context; - typedef struct { sigset_t sigFlag; sigset_t sigPendFlag; @@ -164,7 +140,8 @@ typedef struct { LOS_DL_LIST waitList; sigset_t sigwaitmask; /* Waiting for pending signals */ siginfo_t sigunbinfo; /* Signal info when task unblocked */ - sig_switch_context context; + void *sigContext; + unsigned int count; } sig_cb; #define SIGEV_THREAD_ID 4 @@ -180,8 +157,6 @@ int OsPthreadKill(UINT32 tid, int signo); int OsSigEmptySet(sigset_t *); int OsSigAddSet(sigset_t *, int); int OsSigIsMember(const sigset_t *, int); -void OsSaveSignalContext(unsigned int *sp); -void OsRestorSignalContext(unsigned int *sp); int OsKill(pid_t pid, int sig, int permission); int OsDispatch(pid_t pid, siginfo_t *info, int permission); int OsSigTimedWait(sigset_t *set, siginfo_t *info, unsigned int timeout); diff --git a/kernel/base/include/los_vm_fault.h b/kernel/base/include/los_vm_fault.h index d3c650a2..6bc0c2f9 100644 --- a/kernel/base/include/los_vm_fault.h +++ b/kernel/base/include/los_vm_fault.h @@ -38,7 +38,7 @@ #define __LOS_VM_FAULT_H__ #include "los_typedef.h" -#include "los_exc.h" +#include "los_hw_pri.h" #ifdef __cplusplus #if __cplusplus @@ -46,6 +46,8 @@ extern "C" { #endif /* __cplusplus */ #endif /* __cplusplus */ +typedef IrqContext PageFaultContext; + typedef struct { VADDR_T excAddr; VADDR_T fixAddr; @@ -56,7 +58,7 @@ typedef struct { #define VM_MAP_PF_FLAG_INSTRUCTION (1U << 2) #define VM_MAP_PF_FLAG_NOT_PRESENT (1U << 3) -STATUS_T OsVmPageFaultHandler(VADDR_T vaddr, UINT32 flags, ExcContext *frame); +STATUS_T OsVmPageFaultHandler(VADDR_T vaddr, UINT32 flags, PageFaultContext *frame); #ifdef __cplusplus #if __cplusplus } diff --git a/kernel/base/ipc/los_signal.c b/kernel/base/ipc/los_signal.c index 8edd8db4..c2b45f9c 100644 --- a/kernel/base/ipc/los_signal.c +++ b/kernel/base/ipc/los_signal.c @@ -556,131 +556,64 @@ int OsSigAction(int sig, const sigaction_t *act, sigaction_t *oact) return LOS_OK; } -void OsSaveSignalContext(unsigned int *sp) +VOID *OsSaveSignalContext(VOID *sp) { UINTPTR sigHandler; UINT32 intSave; - LosTaskCB *task = NULL; - LosProcessCB *process = NULL; - sig_cb *sigcb = NULL; - unsigned long cpsr; - OS_RETURN_IF_VOID(sp == NULL); - cpsr = OS_SYSCALL_GET_CPSR(sp); - - OS_RETURN_IF_VOID(((cpsr & CPSR_MASK_MODE) != CPSR_USER_MODE)); SCHEDULER_LOCK(intSave); - task = OsCurrTaskGet(); - process = OsCurrProcessGet(); - sigcb = &task->sig; - - if ((sigcb->context.count == 0) && ((sigcb->sigFlag != 0) || (process->sigShare != 0))) { + LosTaskCB *task = OsCurrTaskGet(); + LosProcessCB *process = OsCurrProcessGet(); + sig_cb *sigcb = &task->sig; + if ((sigcb->count == 0) && ((sigcb->sigFlag != 0) || (process->sigShare != 0))) { sigHandler = OsGetSigHandler(); if (sigHandler == 0) { sigcb->sigFlag = 0; process->sigShare = 0; SCHEDULER_UNLOCK(intSave); PRINT_ERR("The signal processing function for the current process pid =%d is NULL!\n", task->processID); - return; + return sp; } /* One pthread do the share signal */ sigcb->sigFlag |= process->sigShare; - unsigned int signo = (unsigned int)FindFirstSetedBit(sigcb->sigFlag) + 1; + UINT32 signo = (UINT32)FindFirstSetedBit(sigcb->sigFlag) + 1; + UINT32 sigVal = (UINT32)(UINTPTR)(sigcb->sigunbinfo.si_value.sival_ptr); OsProcessExitCodeSignalSet(process, signo); - sigcb->context.CPSR = cpsr; - sigcb->context.PC = sp[REG_PC]; - sigcb->context.USP = sp[REG_SP]; - sigcb->context.ULR = sp[REG_LR]; - sigcb->context.R0 = sp[REG_R0]; - sigcb->context.R1 = sp[REG_R1]; - sigcb->context.R2 = sp[REG_R2]; - sigcb->context.R3 = sp[REG_R3]; - sigcb->context.R7 = sp[REG_R7]; - sigcb->context.R12 = sp[REG_R12]; - sp[REG_PC] = sigHandler; - sp[REG_R0] = signo; - sp[REG_R1] = (unsigned int)(UINTPTR)(sigcb->sigunbinfo.si_value.sival_ptr); + sigcb->sigContext = sp; + + VOID *newSp = OsInitSignalContext(sp, sigHandler, signo, sigVal); + /* sig No bits 00000100 present sig No 3, but 1<< 3 = 00001000, so signo needs minus 1 */ sigcb->sigFlag ^= 1ULL << (signo - 1); - sigcb->context.count++; - } - - SCHEDULER_UNLOCK(intSave); -} - -void OsSaveSignalContextIrq(unsigned int *sp, unsigned int r7) -{ - UINTPTR sigHandler; - LosTaskCB *task = NULL; - LosProcessCB *process = NULL; - sig_cb *sigcb = NULL; - unsigned long cpsr; - UINT32 intSave; - TaskIrqContext *context = (TaskIrqContext *)(sp); - - OS_RETURN_IF_VOID(sp == NULL); - cpsr = context->CPSR; - OS_RETURN_IF_VOID(((cpsr & CPSR_MASK_MODE) != CPSR_USER_MODE)); - - SCHEDULER_LOCK(intSave); - task = OsCurrTaskGet(); - process = OsCurrProcessGet(); - sigcb = &task->sig; - if ((sigcb->context.count == 0) && ((sigcb->sigFlag != 0) || (process->sigShare != 0))) { - sigHandler = OsGetSigHandler(); - if (sigHandler == 0) { - sigcb->sigFlag = 0; - process->sigShare = 0; - SCHEDULER_UNLOCK(intSave); - PRINT_ERR("The current process pid =%d starts fail!\n", task->processID); - return; - } - sigcb->sigFlag |= process->sigShare; - unsigned int signo = (unsigned int)FindFirstSetedBit(sigcb->sigFlag) + 1; - OsProcessExitCodeSignalSet(process, signo); - (VOID)memcpy_s(&sigcb->context.R0, sizeof(TaskIrqDataSize), &context->R0, sizeof(TaskIrqDataSize)); - sigcb->context.R7 = r7; - context->PC = sigHandler; - context->R0 = signo; - context->R1 = (UINT32)(UINTPTR)sigcb->sigunbinfo.si_value.sival_ptr; - /* sig No bits 00000100 present sig No 3, but 1<< 3 = 00001000, so signo needs minus 1 */ - sigcb->sigFlag ^= 1ULL << (signo - 1); - sigcb->context.count++; - } - SCHEDULER_UNLOCK(intSave); -} - -void OsRestorSignalContext(unsigned int *sp) -{ - LosTaskCB *task = NULL; /* Do not adjust this statement */ - LosProcessCB *process = NULL; - sig_cb *sigcb = NULL; - UINT32 intSave; - - SCHEDULER_LOCK(intSave); - task = OsCurrTaskGet(); - sigcb = &task->sig; - - if (sigcb->context.count != 1) { + sigcb->count++; SCHEDULER_UNLOCK(intSave); - PRINT_ERR("sig error count : %d\n", sigcb->context.count); - return; + return newSp; } - process = OsCurrProcessGet(); - sp[REG_PC] = sigcb->context.PC; - OS_SYSCALL_SET_CPSR(sp, sigcb->context.CPSR); - sp[REG_SP] = sigcb->context.USP; - sp[REG_LR] = sigcb->context.ULR; - sp[REG_R0] = sigcb->context.R0; - sp[REG_R1] = sigcb->context.R1; - sp[REG_R2] = sigcb->context.R2; - sp[REG_R3] = sigcb->context.R3; - sp[REG_R7] = sigcb->context.R7; - sp[REG_R12] = sigcb->context.R12; - sigcb->context.count--; + SCHEDULER_UNLOCK(intSave); + return sp; +} + +VOID *OsRestorSignalContext(VOID *sp) +{ + UINT32 intSave; + + SCHEDULER_LOCK(intSave); + LosTaskCB *task = OsCurrTaskGet(); + sig_cb *sigcb = &task->sig; + + if (sigcb->count != 1) { + SCHEDULER_UNLOCK(intSave); + PRINT_ERR("sig error count : %d\n", sigcb->count); + return sp; + } + + LosProcessCB *process = OsCurrProcessGet(); + VOID *saveContext = sigcb->sigContext; + sigcb->count--; process->sigShare = 0; OsProcessExitCodeSignalClear(process); SCHEDULER_UNLOCK(intSave); + return saveContext; } diff --git a/kernel/base/vm/los_vm_fault.c b/kernel/base/vm/los_vm_fault.c index d8f61b27..b805d253 100644 --- a/kernel/base/vm/los_vm_fault.c +++ b/kernel/base/vm/los_vm_fault.c @@ -75,12 +75,12 @@ STATIC STATUS_T OsVmRegionRightCheck(LosVmMapRegion *region, UINT32 flags) return LOS_OK; } -STATIC VOID OsFaultTryFixup(ExcContext *frame, VADDR_T excVaddr, STATUS_T *status) +STATIC VOID OsFaultTryFixup(PageFaultContext *frame, VADDR_T excVaddr, STATUS_T *status) { INT32 tableNum = (__exc_table_end - __exc_table_start) / sizeof(LosExcTable); LosExcTable *excTable = (LosExcTable *)__exc_table_start; - if ((frame->regCPSR & CPSR_MODE_MASK) != CPSR_MODE_USR) { + if ((frame->CPSR & CPSR_MODE_MASK) != CPSR_MODE_USR) { for (int i = 0; i < tableNum; ++i, ++excTable) { if (frame->PC == (UINTPTR)excTable->excAddr) { frame->PC = (UINTPTR)excTable->fixAddr; @@ -332,7 +332,7 @@ STATIC STATUS_T OsDoFileFault(LosVmMapRegion *region, LosVmPgFault *vmPgFault, U return ret; } -STATUS_T OsVmPageFaultHandler(VADDR_T vaddr, UINT32 flags, ExcContext *frame) +STATUS_T OsVmPageFaultHandler(VADDR_T vaddr, UINT32 flags, PageFaultContext *frame) { LosVmSpace *space = LOS_SpaceGet(vaddr); LosVmMapRegion *region = NULL; diff --git a/syscall/los_syscall.c b/syscall/los_syscall.c index 29218159..c2d6e3eb 100644 --- a/syscall/los_syscall.c +++ b/syscall/los_syscall.c @@ -38,6 +38,7 @@ #include "los_syscall.h" #include "los_task_pri.h" #include "los_process_pri.h" +#include "los_hw_pri.h" #include "los_printf.h" #include "time.h" #include "utime.h" @@ -93,21 +94,16 @@ void SyscallHandleInit(void) } /* The SYSCALL ID is in R7 on entry. Parameters follow in R0..R6 */ -LITE_OS_SEC_TEXT UINT32 *OsArmA32SyscallHandle(UINT32 *regs) +VOID OsArmA32SyscallHandle(TaskContext *regs) { UINT32 ret; UINT8 nArgs; UINTPTR handle; - UINT32 cmd = regs[REG_R7]; + UINT32 cmd = regs->resved2; if (cmd >= SYS_CALL_NUM) { PRINT_ERR("Syscall ID: error %d !!!\n", cmd); - return regs; - } - - if (cmd == __NR_sigreturn) { - OsRestorSignalContext(regs); - return regs; + return; } handle = g_syscallHandle[cmd]; @@ -115,35 +111,31 @@ LITE_OS_SEC_TEXT UINT32 *OsArmA32SyscallHandle(UINT32 *regs) nArgs = (cmd & 1) ? (nArgs >> NARG_BITS) : (nArgs & NARG_MASK); if ((handle == 0) || (nArgs > ARG_NUM_7)) { PRINT_ERR("Unsupport syscall ID: %d nArgs: %d\n", cmd, nArgs); - regs[REG_R0] = -ENOSYS; - return regs; + regs->R0 = -ENOSYS; + return; } switch (nArgs) { case ARG_NUM_0: case ARG_NUM_1: - ret = (*(SyscallFun1)handle)(regs[REG_R0]); + ret = (*(SyscallFun1)handle)(regs->R0); break; case ARG_NUM_2: case ARG_NUM_3: - ret = (*(SyscallFun3)handle)(regs[REG_R0], regs[REG_R1], regs[REG_R2]); + ret = (*(SyscallFun3)handle)(regs->R0, regs->R1, regs->R2); break; case ARG_NUM_4: case ARG_NUM_5: - ret = (*(SyscallFun5)handle)(regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], - regs[REG_R4]); + ret = (*(SyscallFun5)handle)(regs->R0, regs->R1, regs->R2, regs->R3, regs->R4); break; default: - ret = (*(SyscallFun7)handle)(regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3], - regs[REG_R4], regs[REG_R5], regs[REG_R6]); + ret = (*(SyscallFun7)handle)(regs->R0, regs->R1, regs->R2, regs->R3, regs->R4, regs->R5, regs->R6); } - regs[REG_R0] = ret; - - OsSaveSignalContext(regs); + regs->R0 = ret; /* Return the last value of curent_regs. This supports context switches on return from the exception. * That capability is only used with theSYS_context_switch system call. */ - return regs; + return; } From 749420308ec232709711dd849cd9d51a804bc838 Mon Sep 17 00:00:00 2001 From: mucor Date: Thu, 29 Apr 2021 16:52:13 +0800 Subject: [PATCH 02/36] fix:shell cmd rm -r crash when open target dir failed Change-Id: I1146ab12b02aeef3f9a2a0422ee45936f5e4c105 --- fs/vfs/vfs_cmd/vfs_shellcmd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/vfs/vfs_cmd/vfs_shellcmd.c b/fs/vfs/vfs_cmd/vfs_shellcmd.c index 0c95699e..29aa4bd0 100644 --- a/fs/vfs/vfs_cmd/vfs_shellcmd.c +++ b/fs/vfs/vfs_cmd/vfs_shellcmd.c @@ -837,6 +837,10 @@ static int os_shell_cmd_do_rmdir(const char *pathname) return remove(pathname); } d = opendir(pathname); + if (d == NULL) + { + return -1; + } while (1) { dirent = readdir(d); From 3d7752616097fe210724ae0f737732eda64850c8 Mon Sep 17 00:00:00 2001 From: JING Date: Thu, 29 Apr 2021 17:30:43 +0800 Subject: [PATCH 03/36] add umask open/create test --- .../fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp b/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp index 6e0bcc13..92c8498f 100644 --- a/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp +++ b/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp @@ -41,7 +41,11 @@ static int TestUmask(const char *path) mode_t mode; int ret; struct stat buf = { 0 }; + struct stat buf1 = { 0 }; + struct stat buf2 = { 0 }; char filename[128] = {0}; + char filename1[128] = {0}; + char filename2[128] = {0}; printf("%s, %d\n", __FUNCTION__, __LINE__); @@ -56,6 +60,28 @@ static int TestUmask(const char *path) ICUNIT_ASSERT_EQUAL(ret, 0, ret); ICUNIT_ASSERT_EQUAL(buf.st_mode, 040755, buf.st_mode); rmdir(filename); + + sprintf(filename1, "%s/%s", path, "file"); + ret = open(filename1, O_CREAT | O_RDWR, HIGHEST_AUTHORITY); + ICUNIT_ASSERT_NOT_EQUAL(ret, -1, ret); + ret = close(ret); + ICUNIT_ASSERT_EQUAL(ret, 0, ret); + ret = stat(filename1, &buf1); + ICUNIT_ASSERT_EQUAL(ret, 0, ret); + ICUNIT_ASSERT_EQUAL(buf.st_mode, 100755, buf.st_mode); + ICUNIT_ASSERT_EQUAL(buf1.st_mode, 0100755, buf1.st_mode); + unlink(filename1); + + sprintf(filename2, "%s/%s", path, "file1"); + ret = creat(filename2, HIGHEST_AUTHORITY); + ICUNIT_ASSERT_NOT_EQUAL(ret, -1, ret); + ret = close(ret); + ICUNIT_ASSERT_EQUAL(ret, 0, ret); + ret = stat(filename2, &buf2); + ICUNIT_ASSERT_EQUAL(ret, 0, ret); + ICUNIT_ASSERT_EQUAL(buf2.st_mode, 0100755, buf2.st_mode); + unlink(filename2); + return 0; } From 68f62d9de8d001c0ff71e60b3d2bbe336b88bb04 Mon Sep 17 00:00:00 2001 From: JING Date: Thu, 29 Apr 2021 18:12:41 +0800 Subject: [PATCH 04/36] add umask open/creat test --- testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp b/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp index 92c8498f..23182f4f 100644 --- a/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp +++ b/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp @@ -58,7 +58,7 @@ static int TestUmask(const char *path) ICUNIT_ASSERT_EQUAL(ret, 0, ret); ret = stat(filename, &buf); ICUNIT_ASSERT_EQUAL(ret, 0, ret); - ICUNIT_ASSERT_EQUAL(buf.st_mode, 040755, buf.st_mode); + ICUNIT_ASSERT_EQUAL(buf.st_mode, 040755, buf.st_mode); // mode: 040755 rmdir(filename); sprintf(filename1, "%s/%s", path, "file"); @@ -68,8 +68,7 @@ static int TestUmask(const char *path) ICUNIT_ASSERT_EQUAL(ret, 0, ret); ret = stat(filename1, &buf1); ICUNIT_ASSERT_EQUAL(ret, 0, ret); - ICUNIT_ASSERT_EQUAL(buf.st_mode, 100755, buf.st_mode); - ICUNIT_ASSERT_EQUAL(buf1.st_mode, 0100755, buf1.st_mode); + ICUNIT_ASSERT_EQUAL(buf1.st_mode, 0100755, buf1.st_mode); // mode: 0100755 unlink(filename1); sprintf(filename2, "%s/%s", path, "file1"); @@ -79,7 +78,7 @@ static int TestUmask(const char *path) ICUNIT_ASSERT_EQUAL(ret, 0, ret); ret = stat(filename2, &buf2); ICUNIT_ASSERT_EQUAL(ret, 0, ret); - ICUNIT_ASSERT_EQUAL(buf2.st_mode, 0100755, buf2.st_mode); + ICUNIT_ASSERT_EQUAL(buf2.st_mode, 0100755, buf2.st_mode); // mode: 0100755 unlink(filename2); return 0; From 89e9820189d48c27faa9694d05c638ef4c92679d Mon Sep 17 00:00:00 2001 From: lnlan Date: Thu, 29 Apr 2021 18:53:26 +0800 Subject: [PATCH 05/36] fixed, to set errno in mq_receive and shm_get Change-Id: Iecd1a896f92522ecc75d099c23761969a83b1d29 --- compat/posix/src/mqueue.c | 10 ++-------- kernel/base/vm/shm.c | 10 +++++----- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/compat/posix/src/mqueue.c b/compat/posix/src/mqueue.c index 85a924d7..9f1f0318 100644 --- a/compat/posix/src/mqueue.c +++ b/compat/posix/src/mqueue.c @@ -739,11 +739,8 @@ int mq_timedsend(mqd_t personal, const char *msg, size_t msgLen, unsigned int ms (VOID)pthread_mutex_lock(&g_mqueueMutex); privateMqPersonal = MqGetPrivDataBuff(personal); - if (privateMqPersonal == NULL) { - goto ERROUT_UNLOCK; - } - OS_MQ_GOTO_ERROUT_UNLOCK_IF(privateMqPersonal->mq_status != MQ_USE_MAGIC, EBADF); + OS_MQ_GOTO_ERROUT_UNLOCK_IF(privateMqPersonal == NULL || privateMqPersonal->mq_status != MQ_USE_MAGIC, EBADF); mqueueCB = privateMqPersonal->mq_posixdes; OS_MQ_GOTO_ERROUT_UNLOCK_IF(msgLen > (size_t)(mqueueCB->mqcb->queueSize - sizeof(UINT32)), EMSGSIZE); @@ -786,10 +783,7 @@ ssize_t mq_timedreceive(mqd_t personal, char *msg, size_t msgLen, unsigned int * (VOID)pthread_mutex_lock(&g_mqueueMutex); privateMqPersonal = MqGetPrivDataBuff(personal); - if (privateMqPersonal == NULL) { - goto ERROUT_UNLOCK; - } - if (privateMqPersonal->mq_status != MQ_USE_MAGIC) { + if (privateMqPersonal == NULL || privateMqPersonal->mq_status != MQ_USE_MAGIC) { errno = EBADF; goto ERROUT_UNLOCK; } diff --git a/kernel/base/vm/shm.c b/kernel/base/vm/shm.c index 9de9d54e..aadca5f1 100644 --- a/kernel/base/vm/shm.c +++ b/kernel/base/vm/shm.c @@ -435,11 +435,6 @@ INT32 ShmGet(key_t key, size_t size, INT32 shmflg) INT32 shmid; SYSV_SHM_LOCK(); - if (!((UINT32)shmflg & IPC_CREAT) && - ((UINT32)shmflg & IPC_EXCL)) { - ret = -EINVAL; - goto ERROR; - } if (key == IPC_PRIVATE) { ret = ShmAllocSeg(key, size, shmflg); @@ -454,6 +449,11 @@ INT32 ShmGet(key_t key, size_t size, INT32 shmflg) } } else { shmid = ret; + if (((UINT32)shmflg & IPC_CREAT) && + ((UINT32)shmflg & IPC_EXCL)) { + ret = -EEXIST; + goto ERROR; + } ret = ShmPermCheck(ShmFindSeg(shmid), (UINT32)shmflg & ACCESSPERMS); if (ret != 0) { ret = -ret; From 4b0e47fd03fea67d755e8b1eb88ea5d194cfbc9f Mon Sep 17 00:00:00 2001 From: JING Date: Thu, 29 Apr 2021 20:09:06 +0800 Subject: [PATCH 06/36] =?UTF-8?q?=E4=BF=AE=E5=A4=8D/userdata=E5=88=86?= =?UTF-8?q?=E5=8C=BA=E6=93=A6=E9=99=A4=E5=90=8E=E6=97=A0=E6=B3=95=E6=8C=82?= =?UTF-8?q?=E8=BD=BD=E7=9A=84=E9=97=AE=E9=A2=98=20issue#I3O8IF=E7=9A=84?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=AD=EF=BC=8C=E5=B0=86fat=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=AF=86=E5=88=AB=E7=9A=84=E6=A0=BC=E5=BC=8F=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=A0=81=E7=94=B1ENOENT=E6=94=B9=E4=B8=BAENOTSUP?= =?UTF-8?q?=E3=80=82=E6=AD=A4=E5=A4=84=E4=BF=AE=E6=94=B9=E6=9C=89=E9=81=97?= =?UTF-8?q?=E6=BC=8F=EF=BC=8C=E9=80=A0=E6=88=90=E6=97=A0fat=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E7=9A=84userdata=E5=88=86=E5=8C=BA=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=8C=82=E8=BD=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/common/los_rootfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/common/los_rootfs.c b/kernel/common/los_rootfs.c index 7d9f39e1..9db34881 100644 --- a/kernel/common/los_rootfs.c +++ b/kernel/common/los_rootfs.c @@ -444,7 +444,7 @@ STATIC VOID OsMountUserdata(const CHAR *fsType) return; } err = get_errno(); - if (err == ENOENT) { + if (err == ENOTSUP) { #ifdef LOSCFG_FS_FAT ret = format(emmcUserdataDev, 0, FM_FAT32); if (ret != LOS_OK) { From c14d95f8b57434207f044aafb0747c1c8c0236df Mon Sep 17 00:00:00 2001 From: JING Date: Thu, 29 Apr 2021 20:22:12 +0800 Subject: [PATCH 07/36] revert irrelevant commit --- .../fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp | 27 +------------------ 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp b/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp index 23182f4f..6e0bcc13 100644 --- a/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp +++ b/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp @@ -41,11 +41,7 @@ static int TestUmask(const char *path) mode_t mode; int ret; struct stat buf = { 0 }; - struct stat buf1 = { 0 }; - struct stat buf2 = { 0 }; char filename[128] = {0}; - char filename1[128] = {0}; - char filename2[128] = {0}; printf("%s, %d\n", __FUNCTION__, __LINE__); @@ -58,29 +54,8 @@ static int TestUmask(const char *path) ICUNIT_ASSERT_EQUAL(ret, 0, ret); ret = stat(filename, &buf); ICUNIT_ASSERT_EQUAL(ret, 0, ret); - ICUNIT_ASSERT_EQUAL(buf.st_mode, 040755, buf.st_mode); // mode: 040755 + ICUNIT_ASSERT_EQUAL(buf.st_mode, 040755, buf.st_mode); rmdir(filename); - - sprintf(filename1, "%s/%s", path, "file"); - ret = open(filename1, O_CREAT | O_RDWR, HIGHEST_AUTHORITY); - ICUNIT_ASSERT_NOT_EQUAL(ret, -1, ret); - ret = close(ret); - ICUNIT_ASSERT_EQUAL(ret, 0, ret); - ret = stat(filename1, &buf1); - ICUNIT_ASSERT_EQUAL(ret, 0, ret); - ICUNIT_ASSERT_EQUAL(buf1.st_mode, 0100755, buf1.st_mode); // mode: 0100755 - unlink(filename1); - - sprintf(filename2, "%s/%s", path, "file1"); - ret = creat(filename2, HIGHEST_AUTHORITY); - ICUNIT_ASSERT_NOT_EQUAL(ret, -1, ret); - ret = close(ret); - ICUNIT_ASSERT_EQUAL(ret, 0, ret); - ret = stat(filename2, &buf2); - ICUNIT_ASSERT_EQUAL(ret, 0, ret); - ICUNIT_ASSERT_EQUAL(buf2.st_mode, 0100755, buf2.st_mode); // mode: 0100755 - unlink(filename2); - return 0; } From e64e1e726089858526df0dacb9c321a4321ffe34 Mon Sep 17 00:00:00 2001 From: mucor Date: Thu, 29 Apr 2021 21:08:52 +0800 Subject: [PATCH 08/36] add testcase for capability ReadSearch Change-Id: I19834ced919e7f03a7ac9862bfbaf360637e29bf --- .../fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp | 68 +++++++++++++++++-- 1 file changed, 64 insertions(+), 4 deletions(-) diff --git a/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp b/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp index 6e0bcc13..33f32d8f 100644 --- a/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp +++ b/testsuites/unittest/fs/jffs/smoke/It_vfs_jffs_Dac_001.cpp @@ -371,6 +371,58 @@ static int TestAccess(const char *path) return 0; } +static int SetReadAndSearch() +{ + int capNum = 2; + struct __user_cap_header_struct capheader; + struct __user_cap_data_struct capdata[capNum]; + int ret; + + memset(&capheader, 0, sizeof(struct __user_cap_header_struct)); + memset(capdata, 0, capNum * sizeof(struct __user_cap_data_struct)); + capdata[0].permitted = 0xffffffff; + capdata[1].permitted = 0xffffffff; + capheader.version = _LINUX_CAPABILITY_VERSION_3; + capdata[CAP_TO_INDEX(CAP_SETPCAP)].effective |= CAP_TO_MASK(CAP_SETPCAP); + capdata[CAP_TO_INDEX(CAP_SETUID)].effective |= CAP_TO_MASK(CAP_SETUID); + capdata[CAP_TO_INDEX(CAP_SETGID)].effective |= CAP_TO_MASK(CAP_SETGID); + capdata[CAP_TO_INDEX(CAP_CHOWN)].effective |= CAP_TO_MASK(CAP_CHOWN); + capdata[CAP_TO_INDEX(CAP_DAC_READ_SEARCH)].effective |= CAP_TO_MASK(CAP_DAC_READ_SEARCH); + ret = capset(&capheader, &capdata[0]); + ICUNIT_ASSERT_EQUAL(ret, 0, ret); + return 0; +} + +static int TestCapReadSearch() +{ + int ret; + char filenameParent[64] = {0}; + char filenameChild[64] = {0}; + + ret = setuid(0); + ICUNIT_ASSERT_EQUAL(ret, 0, ret); + ret = setgid(0); + ICUNIT_ASSERT_EQUAL(ret, 0, ret); + + ret = mkdir("/storage/test_jffs2", 0757); // mode 0757 + ICUNIT_ASSERT_EQUAL(ret, 0, ret); + sprintf(filenameParent, "%s/%s", "/storage/test_jffs2", "testParent"); + sprintf(filenameChild, "%s/%s", filenameParent, "testChild"); + ret = mkdir(filenameParent, 0222); // mode 0222 + ICUNIT_ASSERT_EQUAL(ret, 0, ret); + SetReadAndSearch(); + ret = mkdir(filenameChild, 0777); // mode 0777 + ICUNIT_ASSERT_NOT_EQUAL(ret, 0, ret); + + ret = rmdir(filenameParent); + ICUNIT_ASSERT_EQUAL(ret, 0, ret); + + ret = rmdir("/storage/test_jffs2"); + ICUNIT_ASSERT_EQUAL(ret, 0, ret); + + return 0; +} + /* execve */ /* access */ @@ -433,9 +485,6 @@ static int ChildFunc(VOID) ret = setgid(2); // gid: 2 ICUNIT_ASSERT_EQUAL(ret, 0, ret); - capdata[0].effective = 0xffffffff; - capdata[1].effective = 0xffffffff; - (void)capset(&capheader, capdata); return 0; } @@ -444,13 +493,24 @@ static int testcase(VOID) int ret; int status = 0; pid_t pid = fork(); - ICUNIT_GOTO_WITHIN_EQUAL(pid, 0, 100000, pid, EXIT); + ICUNIT_GOTO_WITHIN_EQUAL(pid, 0, 100000, pid, EXIT); // pid must in range 0 - 100000 if (pid == 0) { ret = ChildFunc(); printf("err line :%d error code: %d\n", 0, 0); exit(0); } + ret = waitpid(pid, &status, 0); + ICUNIT_GOTO_EQUAL(ret, pid, ret, EXIT); + + pid = fork(); + ICUNIT_GOTO_WITHIN_EQUAL(pid, 0, 100000, pid, EXIT); // pid must in range 0 - 100000 + if (pid == 0) { + ret = TestCapReadSearch(); + printf("err line :%d error code: %d\n", 0, 0); + exit(0); + } + ret = waitpid(pid, &status, 0); ICUNIT_GOTO_EQUAL(ret, pid, ret, EXIT); status = WEXITSTATUS(status); From 022768ab584c2833546468bebc9912f963a591da Mon Sep 17 00:00:00 2001 From: Haryslee Date: Fri, 30 Apr 2021 10:21:49 +0800 Subject: [PATCH 09/36] Delete redundant code Change-Id: Id75a1b146766f448838afc80ad11cfd9d990e94e --- arch/arm/arm/src/los_arch_mmu.c | 6 +++--- kernel/base/vm/los_vm_map.c | 33 --------------------------------- 2 files changed, 3 insertions(+), 36 deletions(-) diff --git a/arch/arm/arm/src/los_arch_mmu.c b/arch/arm/arm/src/los_arch_mmu.c index 39ef435f..edb22e47 100644 --- a/arch/arm/arm/src/los_arch_mmu.c +++ b/arch/arm/arm/src/los_arch_mmu.c @@ -892,9 +892,9 @@ STATIC VOID OsSetKSectionAttr(UINTPTR virtAddr, BOOL uncached) length = sizeof(mmuKernelMappings) / sizeof(LosArchMmuInitMapping); for (i = 0; i < length; i++) { kernelMap = &mmuKernelMappings[i]; - if (uncached) { - flags |= VM_MAP_REGION_FLAG_UNCACHED; - } + if (uncached) { + kernelMap->flags |= VM_MAP_REGION_FLAG_UNCACHED; + } status = LOS_ArchMmuMap(&kSpace->archMmu, kernelMap->virt, kernelMap->phys, kernelMap->size >> MMU_DESCRIPTOR_L2_SMALL_SHIFT, kernelMap->flags); if (status != (kernelMap->size >> MMU_DESCRIPTOR_L2_SMALL_SHIFT)) { diff --git a/kernel/base/vm/los_vm_map.c b/kernel/base/vm/los_vm_map.c index 3f4010c9..95242796 100644 --- a/kernel/base/vm/los_vm_map.c +++ b/kernel/base/vm/los_vm_map.c @@ -238,34 +238,6 @@ STATIC BOOL OsVmSpaceParamCheck(LosVmSpace *vmSpace) return TRUE; } -LosVmMapRegion *OsShareRegionClone(LosVmMapRegion *oldRegion) -{ - /* no need to create vm object */ - LosVmMapRegion *newRegion = LOS_MemAlloc(m_aucSysMem0, sizeof(LosVmMapRegion)); - if (newRegion == NULL) { - VM_ERR("malloc new region struct failed."); - return NULL; - } - - /* todo: */ - *newRegion = *oldRegion; - return newRegion; -} - -LosVmMapRegion *OsPrivateRegionClone(LosVmMapRegion *oldRegion) -{ - /* need to create vm object */ - LosVmMapRegion *newRegion = LOS_MemAlloc(m_aucSysMem0, sizeof(LosVmMapRegion)); - if (newRegion == NULL) { - VM_ERR("malloc new region struct failed."); - return NULL; - } - - /* todo: */ - *newRegion = *oldRegion; - return newRegion; -} - STATUS_T LOS_VmSpaceClone(LosVmSpace *oldVmSpace, LosVmSpace *newVmSpace) { LosVmMapRegion *oldRegion = NULL; @@ -840,11 +812,6 @@ STATUS_T OsIsRegionCanExpand(LosVmSpace *space, LosVmMapRegion *region, size_t s return LOS_NOK; } - /* if next node is head, then we can expand */ - if (OsIsVmRegionEmpty(space) == TRUE) { - return LOS_OK; - } - nextRegion = (LosVmMapRegion *)LOS_RbSuccessorNode(&space->regionRbTree, ®ion->rbNode); /* if the gap is larger than size, then we can expand */ if ((nextRegion != NULL) && ((nextRegion->range.base - region->range.base) >= size)) { From 6fe4a3f946054295d3e5054b253fa0688cfc37b4 Mon Sep 17 00:00:00 2001 From: lnlan Date: Thu, 29 Apr 2021 18:56:24 +0800 Subject: [PATCH 10/36] testsuites fixed Change-Id: I7f4add72f2fd1cc3770bcf103d1909add4829822 --- BUILD.gn | 1 + testsuites/unittest/BUILD.gn | 68 +- testsuites/unittest/IO/BUILD.gn | 85 +- testsuites/unittest/IO/io_test.cpp | 3 +- testsuites/unittest/IPC/BUILD.gn | 10 +- testsuites/unittest/IPC/ipc_test.cpp | 2 + testsuites/unittest/common/include/osTest.h | 3 - testsuites/unittest/config.gni | 6 +- testsuites/unittest/drivers/hid/BUILD.gn | 8 +- .../unittest/drivers/hid/drivers_hid_test.cpp | 2 + testsuites/unittest/drivers/storage/BUILD.gn | 9 +- .../drivers/storage/drivers_storage_test.cpp | 2 + testsuites/unittest/dynload/BUILD.gn | 10 +- testsuites/unittest/dynload/dynload_test.cpp | 2 + testsuites/unittest/exc/BUILD.gn | 18 +- testsuites/unittest/exc/exc_test.cpp | 3 +- testsuites/unittest/fs/BUILD.gn | 1480 +++++++++-------- testsuites/unittest/fs/proc/BUILD.gn | 18 +- testsuites/unittest/fs/vfat2/BUILD.gn | 282 ++-- testsuites/unittest/liteipc/BUILD.gn | 10 +- testsuites/unittest/mem/shm/BUILD.gn | 35 +- testsuites/unittest/mem/shm/mem_shm_test.cpp | 9 +- .../unittest/mem/shm/smoke/shm_test_001.cpp | 1 + testsuites/unittest/mem/vm/BUILD.gn | 36 +- testsuites/unittest/mem/vm/mem_vm_test.cpp | 2 + testsuites/unittest/misc/BUILD.gn | 42 +- testsuites/unittest/misc/misc_test.cpp | 26 +- .../misc/{full => smoke}/misc_test_001.cpp | 0 .../misc/{full => smoke}/misc_test_002.cpp | 0 .../misc/{full => smoke}/misc_test_003.cpp | 0 .../misc/{full => smoke}/misc_test_004.cpp | 0 .../misc/{full => smoke}/misc_test_005.cpp | 0 .../misc/{full => smoke}/misc_test_008.cpp | 0 .../misc/{full => smoke}/misc_test_009.cpp | 0 .../misc/{full => smoke}/misc_test_014.cpp | 0 testsuites/unittest/net/netdb/BUILD.gn | 49 +- testsuites/unittest/net/resolv/BUILD.gn | 21 +- testsuites/unittest/net/socket/BUILD.gn | 31 +- .../net/socket/smoke/net_socket_test_008.cpp | 2 +- .../net/socket/smoke/net_socket_test_009.cpp | 2 +- .../net/socket/smoke/net_socket_test_011.cpp | 19 +- testsuites/unittest/posix/mem/BUILD.gn | 12 +- testsuites/unittest/posix/mqueue/BUILD.gn | 360 ++-- .../unittest/posix/mqueue/It_posix_queue.h | 4 +- .../posix/mqueue/posix_mqueue_test.cpp | 19 +- .../{full => smoke}/It_posix_queue_053.cpp | 27 +- .../{full => smoke}/It_posix_queue_144.cpp | 2 +- testsuites/unittest/posix/pthread/BUILD.gn | 242 +-- testsuites/unittest/process/mutex/BUILD.gn | 56 +- .../process/mutex/process_mutex_test.cpp | 3 +- testsuites/unittest/process/process/BUILD.gn | 154 +- .../process/process/process_process_test.cpp | 3 +- testsuites/unittest/process/pthread/BUILD.gn | 54 +- .../process/pthread/process_pthread_test.cpp | 6 +- testsuites/unittest/process/rwlock/BUILD.gn | 10 +- .../process/rwlock/process_rwlock_test.cpp | 2 + testsuites/unittest/process/spinlock/BUILD.gn | 8 +- .../spinlock/process_spinlock_test.cpp | 2 + .../unittest/security/capability/BUILD.gn | 8 +- .../capability/security_capability_test.cpp | 2 + testsuites/unittest/security/reugid/BUILD.gn | 8 +- .../security/reugid/security_reugid_test.cpp | 2 + testsuites/unittest/security/vid/BUILD.gn | 8 +- .../security/vid/security_vid_test.cpp | 2 + testsuites/unittest/signal/BUILD.gn | 132 +- testsuites/unittest/signal/signal_test.cpp | 2 + testsuites/unittest/sys/BUILD.gn | 64 +- testsuites/unittest/sys/sys_unit_test.cpp | 2 + testsuites/unittest/time/clock/BUILD.gn | 36 +- .../clock/{smoke => full}/clock_test_010.cpp | 2 +- .../unittest/time/clock/time_clock_test.cpp | 2 + testsuites/unittest/time/timer/BUILD.gn | 21 +- .../unittest/time/timer/time_timer_test.cpp | 6 +- testsuites/unittest/util/BUILD.gn | 27 +- .../util/{full => smoke}/it_test_util_100.cpp | 0 .../util/{full => smoke}/it_test_util_101.cpp | 0 .../util/{full => smoke}/util_test_001.cpp | 0 .../util/{full => smoke}/util_test_002.cpp | 0 .../util/{full => smoke}/util_test_003.cpp | 0 .../util/{full => smoke}/util_test_004.cpp | 0 .../util/{full => smoke}/util_test_005.cpp | 0 .../util/{full => smoke}/util_test_006.cpp | 0 .../util/{full => smoke}/util_test_007.cpp | 0 testsuites/unittest/util/util_test.cpp | 2 +- 84 files changed, 1897 insertions(+), 1690 deletions(-) rename testsuites/unittest/misc/{full => smoke}/misc_test_001.cpp (100%) rename testsuites/unittest/misc/{full => smoke}/misc_test_002.cpp (100%) rename testsuites/unittest/misc/{full => smoke}/misc_test_003.cpp (100%) rename testsuites/unittest/misc/{full => smoke}/misc_test_004.cpp (100%) rename testsuites/unittest/misc/{full => smoke}/misc_test_005.cpp (100%) rename testsuites/unittest/misc/{full => smoke}/misc_test_008.cpp (100%) rename testsuites/unittest/misc/{full => smoke}/misc_test_009.cpp (100%) rename testsuites/unittest/misc/{full => smoke}/misc_test_014.cpp (100%) rename testsuites/unittest/posix/mqueue/{full => smoke}/It_posix_queue_053.cpp (84%) rename testsuites/unittest/posix/mqueue/{full => smoke}/It_posix_queue_144.cpp (98%) rename testsuites/unittest/time/clock/{smoke => full}/clock_test_010.cpp (98%) rename testsuites/unittest/util/{full => smoke}/it_test_util_100.cpp (100%) rename testsuites/unittest/util/{full => smoke}/it_test_util_101.cpp (100%) rename testsuites/unittest/util/{full => smoke}/util_test_001.cpp (100%) rename testsuites/unittest/util/{full => smoke}/util_test_002.cpp (100%) rename testsuites/unittest/util/{full => smoke}/util_test_003.cpp (100%) rename testsuites/unittest/util/{full => smoke}/util_test_004.cpp (100%) rename testsuites/unittest/util/{full => smoke}/util_test_005.cpp (100%) rename testsuites/unittest/util/{full => smoke}/util_test_006.cpp (100%) rename testsuites/unittest/util/{full => smoke}/util_test_007.cpp (100%) diff --git a/BUILD.gn b/BUILD.gn index ad48b121..5ef86eac 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -67,6 +67,7 @@ lite_subsystem("kernel") { } } else { deps = [ ":make" ] + deps += [ "//kernel/liteos_a/testsuites/unittest:unittest" ] } } diff --git a/testsuites/unittest/BUILD.gn b/testsuites/unittest/BUILD.gn index ed2b8b3c..1a2b7efd 100644 --- a/testsuites/unittest/BUILD.gn +++ b/testsuites/unittest/BUILD.gn @@ -59,97 +59,103 @@ config("public_config") { group("unittest") { deps = [] - if (LOSCFG_USER_TEST_UTIL == true) { + if (LOSCFG_USER_TEST_UTIL == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "util:liteos_a_util_unittest" ] } - if (LOSCFG_USER_TEST_TIME_TIMER == true) { + if (LOSCFG_USER_TEST_TIME_TIMER == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "time/timer:liteos_a_time_timer_unittest" ] } - if (LOSCFG_USER_TEST_TIME_CLOCK == true) { + if (LOSCFG_USER_TEST_TIME_CLOCK == true && + (LOSCFG_USER_TEST_SMOKE == true || LOSCFG_USER_TEST_FULL == true)) { deps += [ "time/clock:liteos_a_time_clock_unittest" ] } - if (LOSCFG_USER_TEST_SYS == true) { + if (LOSCFG_USER_TEST_SYS == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "sys:liteos_a_sys_unittest" ] } - if (LOSCFG_USER_TEST_SIGNAL == true) { + if (LOSCFG_USER_TEST_SIGNAL == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "signal:liteos_a_signal_unittest" ] } - if (LOSCFG_USER_TEST_SECURITY_REUGID == true) { + if (LOSCFG_USER_TEST_SECURITY_REUGID == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "security/reugid:liteos_a_security_reugid_unittest" ] } - if (LOSCFG_USER_TEST_SECURITY_CAPABILITY == true) { + if (LOSCFG_USER_TEST_SECURITY_CAPABILITY == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "security/capability:liteos_a_security_capability_unittest" ] } - if (LOSCFG_USER_TEST_SECURITY_VID == true) { + if (LOSCFG_USER_TEST_SECURITY_VID == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "security/vid:liteos_a_security_vid_unittest" ] } - if (LOSCFG_USER_TEST_MUTEX == true) { + if (LOSCFG_USER_TEST_MUTEX == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "process/mutex:liteos_a_mutex_unittest" ] } - if (LOSCFG_USER_TEST_PROCESS == true) { + if (LOSCFG_USER_TEST_PROCESS == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "process/process:liteos_a_process_unittest" ] } - if (LOSCFG_USER_TEST_PTHREAD == true) { + if (LOSCFG_USER_TEST_PTHREAD == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "process/pthread:liteos_a_pthread_unittest" ] } - if (LOSCFG_USER_TEST_RWLOCK == true) { + if (LOSCFG_USER_TEST_RWLOCK == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "process/rwlock:liteos_a_rwlock_unittest" ] } - if (LOSCFG_USER_TEST_SPINLOCK == true) { + if (LOSCFG_USER_TEST_SPINLOCK == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "process/spinlock:liteos_a_spinlock_unittest" ] } - if (LOSCFG_USER_TEST_POSIX_MEM == true) { + if (LOSCFG_USER_TEST_POSIX_MEM == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "posix/mem:liteos_a_posix_mem_unittest" ] } - if (LOSCFG_USER_TEST_POSIX_MQUEUE == true) { + if (LOSCFG_USER_TEST_POSIX_MQUEUE == true && + (LOSCFG_USER_TEST_SMOKE == true || LOSCFG_USER_TEST_FULL == true)) { deps += [ "posix/mqueue:liteos_a_posix_mqueue_unittest" ] } - if (LOSCFG_USER_TEST_POSIX_PTHREAD == true) { + if (LOSCFG_USER_TEST_POSIX_PTHREAD == true && + (LOSCFG_USER_TEST_SMOKE == true || LOSCFG_USER_TEST_FULL == true)) { deps += [ "posix/pthread:liteos_a_posix_pthread_unittest" ] } - if (LOSCFG_USER_TEST_MISC == true) { + if (LOSCFG_USER_TEST_MISC == true && + (LOSCFG_USER_TEST_SMOKE == true || LOSCFG_USER_TEST_FULL == true)) { deps += [ "misc:liteos_a_misc_unittest" ] } - if (LOSCFG_USER_TEST_MEM_SHM == true) { + if (LOSCFG_USER_TEST_MEM_SHM == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "mem/shm:liteos_a_mem_shm_unittest" ] } - if (LOSCFG_USER_TEST_MEM_VM == true) { + if (LOSCFG_USER_TEST_MEM_VM == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "mem/vm:liteos_a_mem_vm_unittest" ] } - if (LOSCFG_USER_TEST_IO == true) { + if (LOSCFG_USER_TEST_IO == true && LOSCFG_USER_TEST_FULL == true) { deps += [ "IO:liteos_a_io_unittest" ] } - if (LOSCFG_USER_TEST_EXC == true) { + if (LOSCFG_USER_TEST_EXC == true && LOSCFG_USER_TEST_FULL == true) { deps += [ "exc:liteos_a_exc_unittest" ] } - if (LOSCFG_USER_TEST_DYNLOAD == true) { + if (LOSCFG_USER_TEST_DYNLOAD == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "dynload:liteos_a_dynload_unittest" ] } - if (LOSCFG_USER_TEST_DRIVERS_HID == true) { + if (LOSCFG_USER_TEST_DRIVERS_HID == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "drivers/hid:liteos_a_drivers_hid_unittest" ] } - if (LOSCFG_USER_TEST_DRIVERS_STORAGE == true) { + if (LOSCFG_USER_TEST_DRIVERS_STORAGE == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "drivers/storage:liteos_a_drivers_storage_unittest" ] } - if (LOSCFG_USER_TEST_NET_NETDB == true) { + if (LOSCFG_USER_TEST_NET_NETDB == true && LOSCFG_USER_TEST_FULL == true) { deps += [ "net/netdb:liteos_a_net_netdb_unittest" ] } - if (LOSCFG_USER_TEST_NET_RESOLV == true) { + if (LOSCFG_USER_TEST_NET_RESOLV == true && LOSCFG_USER_TEST_FULL == true) { deps += [ "net/resolv:liteos_a_net_resolv_unittest" ] } - if (LOSCFG_USER_TEST_NET_SOCKET == true) { + if (LOSCFG_USER_TEST_NET_SOCKET == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "net/socket:liteos_a_net_socket_unittest" ] } - if (LOSCFG_USER_TEST_IPC == true) { + if (LOSCFG_USER_TEST_IPC == true && LOSCFG_USER_TEST_FULL == true) { deps += [ "IPC:liteos_a_ipc_unittest" ] } - if (LOSCFG_USER_TEST_LITEIPC == true) { + if (LOSCFG_USER_TEST_LITEIPC == true && LOSCFG_USER_TEST_SMOKE == true) { deps += [ "liteipc:liteos_a_liteipc_unittest" ] } - if (LOSCFG_USER_TEST_FS_JFFS == true) { + if (LOSCFG_USER_TEST_FS_JFFS == true && + (LOSCFG_USER_TEST_SMOKE == true || LOSCFG_USER_TEST_FULL == true || LOSCFG_USER_TEST_PRESSURE == true)) { deps += [ "fs:liteos_a_fs_unittest" ] } - if (LOSCFG_USER_TEST_FS_VFAT == true) { + if (LOSCFG_USER_TEST_FS_VFAT == true && + (LOSCFG_USER_TEST_SMOKE == true || LOSCFG_USER_TEST_FULL == true || LOSCFG_USER_TEST_PRESSURE == true)) { deps += [ "fs/vfat2:liteos_a_fs_vfat_unittest" ] } } diff --git a/testsuites/unittest/IO/BUILD.gn b/testsuites/unittest/IO/BUILD.gn index d4fb644b..1eae54fe 100644 --- a/testsuites/unittest/IO/BUILD.gn +++ b/testsuites/unittest/IO/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../config.gni") unittest("liteos_a_io_unittest") { output_extension = "bin" @@ -38,49 +39,51 @@ unittest("liteos_a_io_unittest") { ] sources = [ "../common/osTest.cpp", - "full/IO_test_005.cpp", - "full/IO_test_008.cpp", - "full/IO_test_010.cpp", - "full/IO_test_013.cpp", - "full/IO_test_confstr_001.cpp", - "full/IO_test_dcgettext_001.cpp", - "full/IO_test_dcgettext_002.cpp", - "full/IO_test_dcngettext_001.cpp", - "full/IO_test_dcngettext_002.cpp", - "full/IO_test_dngettext_001.cpp", - "full/IO_test_dngettext_002.cpp", - "full/IO_test_duplocale_001.cpp", - "full/IO_test_locale_001.cpp", - "full/IO_test_locale_002.cpp", - "full/IO_test_ngettext_001.cpp", - "full/IO_test_nl_langinfo_001.cpp", - "full/IO_test_nl_langinfo_l_001.cpp", - "full/IO_test_strcasecmp_l_001.cpp", - "full/IO_test_strcasecmp_l_002.cpp", - "full/IO_test_strfmon_l_001.cpp", - "full/IO_test_strfmon_l_002.cpp", - "full/It_locale_localeconv_001.cpp", - "full/It_stdio_fputws_001.cpp", - "full/It_stdio_fwprintf_001.cpp", - "full/It_stdio_getc_unlocked_001.cpp", - "full/It_stdio_hasmntopt_001.cpp", - "full/It_stdio_mblen_001.cpp", - "full/It_stdio_mbrlen_001.cpp", - "full/It_stdio_putwc_001.cpp", - "full/It_stdio_readv_001.cpp", - "full/It_stdio_rindex_001.cpp", - "full/It_stdio_setlogmask_001.cpp", - "full/It_stdlib_gcvt_001.cpp", - "full/It_stdlib_poll_002.cpp", - "full/It_stdlib_poll_003.cpp", - "full/IO_test_gettext_001.cpp", - #"full/IO_test_ppoll_001.cpp", - #"full/IO_test_ppoll_002.cpp", - #"full/IO_test_pselect_001.cpp", - "full/IO_test_strncasecmp_l_001.cpp", - "full/IO_test_strncasecmp_l_002.cpp", "io_test.cpp", ] + if (LOSCFG_USER_TEST_FULL == true) { + sources_full = [ + "full/IO_test_005.cpp", + "full/IO_test_008.cpp", + "full/IO_test_010.cpp", + "full/IO_test_013.cpp", + "full/IO_test_confstr_001.cpp", + "full/IO_test_dcgettext_001.cpp", + "full/IO_test_dcgettext_002.cpp", + "full/IO_test_dcngettext_001.cpp", + "full/IO_test_dcngettext_002.cpp", + "full/IO_test_dngettext_001.cpp", + "full/IO_test_dngettext_002.cpp", + "full/IO_test_duplocale_001.cpp", + "full/IO_test_locale_001.cpp", + "full/IO_test_locale_002.cpp", + "full/IO_test_ngettext_001.cpp", + "full/IO_test_nl_langinfo_001.cpp", + "full/IO_test_nl_langinfo_l_001.cpp", + "full/IO_test_strcasecmp_l_001.cpp", + "full/IO_test_strcasecmp_l_002.cpp", + "full/IO_test_strfmon_l_001.cpp", + "full/IO_test_strfmon_l_002.cpp", + "full/It_locale_localeconv_001.cpp", + "full/It_stdio_fputws_001.cpp", + "full/It_stdio_fwprintf_001.cpp", + "full/It_stdio_getc_unlocked_001.cpp", + "full/It_stdio_hasmntopt_001.cpp", + "full/It_stdio_mblen_001.cpp", + "full/It_stdio_mbrlen_001.cpp", + "full/It_stdio_putwc_001.cpp", + "full/It_stdio_readv_001.cpp", + "full/It_stdio_rindex_001.cpp", + "full/It_stdio_setlogmask_001.cpp", + "full/It_stdlib_gcvt_001.cpp", + "full/It_stdlib_poll_002.cpp", + "full/It_stdlib_poll_003.cpp", + "full/IO_test_gettext_001.cpp", + "full/IO_test_strncasecmp_l_001.cpp", + "full/IO_test_strncasecmp_l_002.cpp", + ] + sources += sources_full + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "..:public_config" ] } diff --git a/testsuites/unittest/IO/io_test.cpp b/testsuites/unittest/IO/io_test.cpp index ada51466..020be401 100644 --- a/testsuites/unittest/IO/io_test.cpp +++ b/testsuites/unittest/IO/io_test.cpp @@ -43,6 +43,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_FULL) /* * * @tc.name: IT_TEST_IO_005 * @tc.desc: function for IoTest @@ -233,5 +234,5 @@ HWTEST_F(IoTest, ItStdioMbrlen001, TestSize.Level0) { ItStdioMbrlen001(); } - +#endif } // namespace OHOS diff --git a/testsuites/unittest/IPC/BUILD.gn b/testsuites/unittest/IPC/BUILD.gn index 8d0375cb..db9a18e5 100644 --- a/testsuites/unittest/IPC/BUILD.gn +++ b/testsuites/unittest/IPC/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../config.gni") unittest("liteos_a_ipc_unittest") { output_extension = "bin" @@ -38,10 +39,15 @@ unittest("liteos_a_ipc_unittest") { ] sources = [ "../common/osTest.cpp", - "full/IPC_test_mkfifoat_001.cpp", - "full/IPC_test_mkfifoat_002.cpp", "ipc_test.cpp", ] + if (LOSCFG_USER_TEST_FULL == true) { + sources_full = [ + "full/IPC_test_mkfifoat_001.cpp", + "full/IPC_test_mkfifoat_002.cpp", + ] + sources += sources_full + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "..:public_config" ] } diff --git a/testsuites/unittest/IPC/ipc_test.cpp b/testsuites/unittest/IPC/ipc_test.cpp index 1152c584..95b89e56 100644 --- a/testsuites/unittest/IPC/ipc_test.cpp +++ b/testsuites/unittest/IPC/ipc_test.cpp @@ -41,6 +41,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_FULL) /* * * @tc.name: IPC_TEST_MKFIFOAT_001 * @tc.desc: function for IoTest:mkfifoat-normal test @@ -66,4 +67,5 @@ HWTEST_F(IoTest, IPC_TEST_MKFIFOAT_002, TestSize.Level0) IPC_TEST_MKFIFOAT_002(); } #endif +#endif } // namespace OHOS diff --git a/testsuites/unittest/common/include/osTest.h b/testsuites/unittest/common/include/osTest.h index 0289a4f0..5fa25e69 100644 --- a/testsuites/unittest/common/include/osTest.h +++ b/testsuites/unittest/common/include/osTest.h @@ -68,9 +68,6 @@ #define OK 0 #endif -#define LOSCFG_USER_TEST_SMOKE 1 -#define LOSCFG_USER_TEST_FULL 1 - #define dprintf printf #define ENOERR OK #define LOSCFG_BASE_CORE_TSK_CONFIG 1024 diff --git a/testsuites/unittest/config.gni b/testsuites/unittest/config.gni index ba3e2e14..62136719 100644 --- a/testsuites/unittest/config.gni +++ b/testsuites/unittest/config.gni @@ -30,7 +30,7 @@ LOSCFG_USER_TEST_LLT = false LOSCFG_USER_TEST_SMOKE = true LOSCFG_USER_TEST_PRESSURE = false -LOSCFG_USER_TEST_FULL = true +LOSCFG_USER_TEST_FULL = false LOSCFG_USER_TEST_DRIVERS_STORAGE = true LOSCFG_USER_TEST_DRIVERS_HID = true @@ -61,5 +61,5 @@ LOSCFG_USER_TEST_NET_RESOLV = true LOSCFG_USER_TEST_NET_SOCKET = true LOSCFG_USER_TEST_IPC = false LOSCFG_USER_TEST_LITEIPC = false -LOSCFG_USER_TEST_FS_JFFS = true -LOSCFG_USER_TEST_FS_VFAT = true +LOSCFG_USER_TEST_FS_JFFS = false +LOSCFG_USER_TEST_FS_VFAT = false diff --git a/testsuites/unittest/drivers/hid/BUILD.gn b/testsuites/unittest/drivers/hid/BUILD.gn index e1da3729..7e6afb1b 100644 --- a/testsuites/unittest/drivers/hid/BUILD.gn +++ b/testsuites/unittest/drivers/hid/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../../config.gni") unittest("liteos_a_drivers_hid_unittest") { output_extension = "bin" @@ -39,8 +40,13 @@ unittest("liteos_a_drivers_hid_unittest") { sources = [ "../../common/osTest.cpp", "drivers_hid_test.cpp", - "smoke/hid_test_001.cpp", ] + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/hid_test_001.cpp", + ] + sources += sources_smoke + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "../..:public_config" ] } diff --git a/testsuites/unittest/drivers/hid/drivers_hid_test.cpp b/testsuites/unittest/drivers/hid/drivers_hid_test.cpp index 871659a9..1120011d 100644 --- a/testsuites/unittest/drivers/hid/drivers_hid_test.cpp +++ b/testsuites/unittest/drivers/hid/drivers_hid_test.cpp @@ -40,6 +40,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_SMOKE) /* * * @tc.name: it_test_hid_001 * @tc.desc: function for drivers hid @@ -50,4 +51,5 @@ HWTEST_F(DriversHidTest, ItTestHid001, TestSize.Level0) { ItTestHid001(); } +#endif } // namespace OHOS diff --git a/testsuites/unittest/drivers/storage/BUILD.gn b/testsuites/unittest/drivers/storage/BUILD.gn index 175869ce..43324c52 100644 --- a/testsuites/unittest/drivers/storage/BUILD.gn +++ b/testsuites/unittest/drivers/storage/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../../config.gni") unittest("liteos_a_drivers_storage_unittest") { output_extension = "bin" @@ -39,7 +40,13 @@ unittest("liteos_a_drivers_storage_unittest") { sources = [ "../../common/osTest.cpp", "drivers_storage_test.cpp", - "smoke/storage_test_001.cpp", ] + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/storage_test_001.cpp", + ] + sources += sources_smoke + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] + configs = [ "../..:public_config" ] } diff --git a/testsuites/unittest/drivers/storage/drivers_storage_test.cpp b/testsuites/unittest/drivers/storage/drivers_storage_test.cpp index ad2aadd1..fe69c0e5 100644 --- a/testsuites/unittest/drivers/storage/drivers_storage_test.cpp +++ b/testsuites/unittest/drivers/storage/drivers_storage_test.cpp @@ -40,6 +40,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_SMOKE) /* * * @tc.name: it_test_storage_001 * @tc.desc: function for drivers storage @@ -50,4 +51,5 @@ HWTEST_F(DriversStorageTest, ItTestStorage001, TestSize.Level0) { ItTestStorage001(); } +#endif } // namespace OHOS diff --git a/testsuites/unittest/dynload/BUILD.gn b/testsuites/unittest/dynload/BUILD.gn index 3f663549..8ac18fd1 100644 --- a/testsuites/unittest/dynload/BUILD.gn +++ b/testsuites/unittest/dynload/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../config.gni") unittest("liteos_a_dynload_unittest") { output_extension = "bin" @@ -39,9 +40,14 @@ unittest("liteos_a_dynload_unittest") { sources = [ "../common/osTest.cpp", "dynload_test.cpp", - "smoke/dynload_test_002.cpp", - "smoke/dynload_test_004.cpp", ] + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/dynload_test_002.cpp", + "smoke/dynload_test_004.cpp", + ] + sources += sources_smoke + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "..:public_config" ] } diff --git a/testsuites/unittest/dynload/dynload_test.cpp b/testsuites/unittest/dynload/dynload_test.cpp index 7ede1841..937c109b 100644 --- a/testsuites/unittest/dynload/dynload_test.cpp +++ b/testsuites/unittest/dynload/dynload_test.cpp @@ -41,6 +41,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_SMOKE) /* * * @tc.name: it_test_dynload_002 * @tc.desc: function for DynloadTest @@ -62,4 +63,5 @@ HWTEST_F(DynloadTest, ItTestDynload004, TestSize.Level0) { ItTestDynload004(); } +#endif } // namespace OHOS diff --git a/testsuites/unittest/exc/BUILD.gn b/testsuites/unittest/exc/BUILD.gn index d9d4131b..292980f7 100644 --- a/testsuites/unittest/exc/BUILD.gn +++ b/testsuites/unittest/exc/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../config.gni") unittest("liteos_a_exc_unittest") { output_extension = "bin" @@ -39,13 +40,18 @@ unittest("liteos_a_exc_unittest") { sources = [ "../common/osTest.cpp", "exc_test.cpp", - "full/it_test_exc_001.cpp", - "full/it_test_exc_002.cpp", - "full/it_test_exc_003.cpp", - "full/it_test_exc_004.cpp", - "full/it_test_exc_005.cpp", - "full/it_test_fexecve_001.cpp", ] + if (LOSCFG_USER_TEST_FULL == true) { + sources_full = [ + "full/it_test_exc_001.cpp", + "full/it_test_exc_002.cpp", + "full/it_test_exc_003.cpp", + "full/it_test_exc_004.cpp", + "full/it_test_exc_005.cpp", + "full/it_test_fexecve_001.cpp", + ] + sources += sources_full + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "..:public_config" ] } diff --git a/testsuites/unittest/exc/exc_test.cpp b/testsuites/unittest/exc/exc_test.cpp index 4dac8d7e..655d88dd 100644 --- a/testsuites/unittest/exc/exc_test.cpp +++ b/testsuites/unittest/exc/exc_test.cpp @@ -41,6 +41,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_FULL) /* * * @tc.name: ItTestExc005 * @tc.desc: function for ExcTest @@ -95,5 +96,5 @@ HWTEST_F(ExcTest, ItTestExc004, TestSize.Level0) { ItTestExc004(); } - +#endif } // namespace OHOS diff --git a/testsuites/unittest/fs/BUILD.gn b/testsuites/unittest/fs/BUILD.gn index c7b4d77e..1e9d0e96 100644 --- a/testsuites/unittest/fs/BUILD.gn +++ b/testsuites/unittest/fs/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../config.gni") unittest("liteos_a_fs_unittest") { output_extension = "bin" @@ -40,741 +41,752 @@ unittest("liteos_a_fs_unittest") { sources = [ "//kernel/liteos_a/testsuites/unittest/common/osTest.cpp", "jffs/vfs_jffs_test.cpp", - "jffs/full/It_jffs_001.cpp", - "jffs/full/It_jffs_002.cpp", - "jffs/full/It_jffs_003.cpp", - "jffs/full/It_jffs_004.cpp", - "jffs/full/It_jffs_005.cpp", - "jffs/full/It_jffs_006.cpp", - "jffs/full/It_jffs_007.cpp", - "jffs/full/It_jffs_008.cpp", - "jffs/full/It_jffs_009.cpp", - "jffs/full/It_jffs_010.cpp", - "jffs/full/It_jffs_011.cpp", - "jffs/full/It_jffs_012.cpp", - "jffs/full/It_jffs_013.cpp", - "jffs/full/It_jffs_014.cpp", - "jffs/full/It_jffs_015.cpp", - "jffs/full/It_jffs_016.cpp", - "jffs/full/It_jffs_017.cpp", - "jffs/full/It_jffs_018.cpp", - "jffs/full/It_jffs_019.cpp", - "jffs/full/It_jffs_020.cpp", - "jffs/full/It_jffs_021.cpp", - "jffs/full/It_jffs_022.cpp", - "jffs/full/It_jffs_023.cpp", - "jffs/full/It_jffs_024.cpp", - "jffs/full/It_jffs_025.cpp", - "jffs/full/It_jffs_026.cpp", - "jffs/full/It_jffs_027.cpp", - "jffs/full/It_jffs_028.cpp", - "jffs/full/It_jffs_029.cpp", - "jffs/full/It_jffs_030.cpp", - "jffs/full/It_jffs_031.cpp", - "jffs/full/It_jffs_032.cpp", - "jffs/full/It_jffs_033.cpp", - "jffs/full/It_jffs_034.cpp", - "jffs/full/It_jffs_035.cpp", - "jffs/full/It_jffs_036.cpp", - "jffs/full/It_jffs_037.cpp", - "jffs/full/It_jffs_038.cpp", - "jffs/full/It_jffs_039.cpp", - "jffs/full/It_jffs_040.cpp", - "jffs/full/It_jffs_041.cpp", - "jffs/full/It_jffs_042.cpp", - "jffs/full/It_jffs_043.cpp", - "jffs/full/It_jffs_044.cpp", - "jffs/full/It_vfs_jffs_004.cpp", - "jffs/full/It_vfs_jffs_006.cpp", - "jffs/full/It_vfs_jffs_007.cpp", - "jffs/full/It_vfs_jffs_008.cpp", - "jffs/full/It_vfs_jffs_009.cpp", - "jffs/full/It_vfs_jffs_010.cpp", - "jffs/full/It_vfs_jffs_011.cpp", - "jffs/full/It_vfs_jffs_012.cpp", - "jffs/full/It_vfs_jffs_013.cpp", - "jffs/full/It_vfs_jffs_014.cpp", - "jffs/full/It_vfs_jffs_015.cpp", - "jffs/full/It_vfs_jffs_016.cpp", - "jffs/full/It_vfs_jffs_017.cpp", - "jffs/full/It_vfs_jffs_018.cpp", - "jffs/full/It_vfs_jffs_019.cpp", - "jffs/full/It_vfs_jffs_020.cpp", - "jffs/full/It_vfs_jffs_023.cpp", - "jffs/full/It_vfs_jffs_024.cpp", - "jffs/full/It_vfs_jffs_025.cpp", - "jffs/full/It_vfs_jffs_028.cpp", - "jffs/full/It_vfs_jffs_029.cpp", - "jffs/full/It_vfs_jffs_030.cpp", - "jffs/full/It_vfs_jffs_031.cpp", - "jffs/full/It_vfs_jffs_032.cpp", - "jffs/full/It_vfs_jffs_033.cpp", - "jffs/full/It_vfs_jffs_037.cpp", - "jffs/full/It_vfs_jffs_038.cpp", - "jffs/full/It_vfs_jffs_039.cpp", - "jffs/full/It_vfs_jffs_040.cpp", - "jffs/full/It_vfs_jffs_041.cpp", - "jffs/full/It_vfs_jffs_042.cpp", - "jffs/full/It_vfs_jffs_043.cpp", - "jffs/full/It_vfs_jffs_044.cpp", - "jffs/full/It_vfs_jffs_045.cpp", - "jffs/full/It_vfs_jffs_046.cpp", - "jffs/full/It_vfs_jffs_048.cpp", - "jffs/full/It_vfs_jffs_049.cpp", - "jffs/full/It_vfs_jffs_050.cpp", - #"jffs/full/It_vfs_jffs_051.cpp", - "jffs/full/It_vfs_jffs_053.cpp", - "jffs/full/It_vfs_jffs_055.cpp", - "jffs/full/It_vfs_jffs_056.cpp", - "jffs/full/It_vfs_jffs_057.cpp", - "jffs/full/It_vfs_jffs_058.cpp", - "jffs/full/It_vfs_jffs_059.cpp", - "jffs/full/It_vfs_jffs_060.cpp", - "jffs/full/It_vfs_jffs_061.cpp", - "jffs/full/It_vfs_jffs_062.cpp", - "jffs/full/It_vfs_jffs_063.cpp", - "jffs/full/It_vfs_jffs_064.cpp", - "jffs/full/It_vfs_jffs_065.cpp", - "jffs/full/It_vfs_jffs_066.cpp", - "jffs/full/It_vfs_jffs_067.cpp", - "jffs/full/It_vfs_jffs_068.cpp", - "jffs/full/It_vfs_jffs_069.cpp", - "jffs/full/It_vfs_jffs_070.cpp", - "jffs/full/It_vfs_jffs_071.cpp", - "jffs/full/It_vfs_jffs_072.cpp", - "jffs/full/It_vfs_jffs_073.cpp", - "jffs/full/It_vfs_jffs_074.cpp", - "jffs/full/It_vfs_jffs_076.cpp", - "jffs/full/It_vfs_jffs_077.cpp", - "jffs/full/It_vfs_jffs_078.cpp", - "jffs/full/It_vfs_jffs_079.cpp", - "jffs/full/It_vfs_jffs_080.cpp", - "jffs/full/It_vfs_jffs_081.cpp", - "jffs/full/It_vfs_jffs_082.cpp", - "jffs/full/It_vfs_jffs_083.cpp", - "jffs/full/It_vfs_jffs_084.cpp", - "jffs/full/It_vfs_jffs_085.cpp", - "jffs/full/It_vfs_jffs_086.cpp", - "jffs/full/It_vfs_jffs_088.cpp", - "jffs/full/It_vfs_jffs_090.cpp", - "jffs/full/It_vfs_jffs_092.cpp", - "jffs/full/It_vfs_jffs_093.cpp", - "jffs/full/It_vfs_jffs_096.cpp", - "jffs/full/It_vfs_jffs_097.cpp", - "jffs/full/It_vfs_jffs_099.cpp", - "jffs/full/It_vfs_jffs_100.cpp", - "jffs/full/It_vfs_jffs_101.cpp", - "jffs/full/It_vfs_jffs_102.cpp", - "jffs/full/It_vfs_jffs_104.cpp", - "jffs/full/It_vfs_jffs_105.cpp", - "jffs/full/It_vfs_jffs_106.cpp", - "jffs/full/It_vfs_jffs_107.cpp", - "jffs/full/It_vfs_jffs_116.cpp", - "jffs/full/It_vfs_jffs_117.cpp", - "jffs/full/It_vfs_jffs_118.cpp", - "jffs/full/It_vfs_jffs_119.cpp", - "jffs/full/It_vfs_jffs_120.cpp", - "jffs/full/It_vfs_jffs_121.cpp", - "jffs/full/It_vfs_jffs_122.cpp", - "jffs/full/It_vfs_jffs_123.cpp", - "jffs/full/It_vfs_jffs_124.cpp", - "jffs/full/It_vfs_jffs_125.cpp", - "jffs/full/It_vfs_jffs_126.cpp", - "jffs/full/It_vfs_jffs_127.cpp", - "jffs/full/It_vfs_jffs_128.cpp", - "jffs/full/It_vfs_jffs_129.cpp", - "jffs/full/It_vfs_jffs_130.cpp", - "jffs/full/It_vfs_jffs_131.cpp", - "jffs/full/It_vfs_jffs_132.cpp", - "jffs/full/It_vfs_jffs_133.cpp", - "jffs/full/It_vfs_jffs_134.cpp", - "jffs/full/It_vfs_jffs_135.cpp", - "jffs/full/It_vfs_jffs_136.cpp", - "jffs/full/It_vfs_jffs_137.cpp", - "jffs/full/It_vfs_jffs_138.cpp", - "jffs/full/It_vfs_jffs_139.cpp", - "jffs/full/It_vfs_jffs_140.cpp", - "jffs/full/It_vfs_jffs_141.cpp", - "jffs/full/It_vfs_jffs_142.cpp", - "jffs/full/It_vfs_jffs_143.cpp", - "jffs/full/It_vfs_jffs_144.cpp", - "jffs/full/It_vfs_jffs_145.cpp", - "jffs/full/It_vfs_jffs_146.cpp", - "jffs/full/It_vfs_jffs_147.cpp", - "jffs/full/It_vfs_jffs_148.cpp", - "jffs/full/It_vfs_jffs_149.cpp", - "jffs/full/It_vfs_jffs_150.cpp", - "jffs/full/It_vfs_jffs_151.cpp", - "jffs/full/It_vfs_jffs_152.cpp", - "jffs/full/It_vfs_jffs_153.cpp", - "jffs/full/It_vfs_jffs_154.cpp", - "jffs/full/It_vfs_jffs_155.cpp", - "jffs/full/It_vfs_jffs_156.cpp", - "jffs/full/It_vfs_jffs_157.cpp", - "jffs/full/It_vfs_jffs_158.cpp", - "jffs/full/It_vfs_jffs_159.cpp", - "jffs/full/It_vfs_jffs_160.cpp", - "jffs/full/It_vfs_jffs_161.cpp", - "jffs/full/It_vfs_jffs_162.cpp", - "jffs/full/It_vfs_jffs_163.cpp", - "jffs/full/It_vfs_jffs_164.cpp", - "jffs/full/It_vfs_jffs_165.cpp", - "jffs/full/It_vfs_jffs_166.cpp", - "jffs/full/It_vfs_jffs_167.cpp", - "jffs/full/It_vfs_jffs_168.cpp", - "jffs/full/It_vfs_jffs_169.cpp", - "jffs/full/It_vfs_jffs_170.cpp", - "jffs/full/It_vfs_jffs_171.cpp", - "jffs/full/It_vfs_jffs_172.cpp", - "jffs/full/It_vfs_jffs_173.cpp", - "jffs/full/It_vfs_jffs_174.cpp", - "jffs/full/It_vfs_jffs_175.cpp", - "jffs/full/It_vfs_jffs_176.cpp", - "jffs/full/It_vfs_jffs_177.cpp", - "jffs/full/It_vfs_jffs_178.cpp", - "jffs/full/It_vfs_jffs_179.cpp", - "jffs/full/It_vfs_jffs_180.cpp", - "jffs/full/It_vfs_jffs_182.cpp", - "jffs/full/It_vfs_jffs_183.cpp", - "jffs/full/It_vfs_jffs_184.cpp", - "jffs/full/It_vfs_jffs_185.cpp", - "jffs/full/It_vfs_jffs_187.cpp", - "jffs/full/It_vfs_jffs_188.cpp", - "jffs/full/It_vfs_jffs_189.cpp", - "jffs/full/It_vfs_jffs_190.cpp", - "jffs/full/It_vfs_jffs_191.cpp", - "jffs/full/It_vfs_jffs_192.cpp", - "jffs/full/It_vfs_jffs_193.cpp", - "jffs/full/It_vfs_jffs_194.cpp", - "jffs/full/It_vfs_jffs_195.cpp", - "jffs/full/It_vfs_jffs_196.cpp", - "jffs/full/It_vfs_jffs_197.cpp", - "jffs/full/It_vfs_jffs_198.cpp", - "jffs/full/It_vfs_jffs_199.cpp", - "jffs/full/It_vfs_jffs_200.cpp", - "jffs/full/It_vfs_jffs_201.cpp", - "jffs/full/It_vfs_jffs_202.cpp", - "jffs/full/It_vfs_jffs_203.cpp", - "jffs/full/It_vfs_jffs_204.cpp", - "jffs/full/It_vfs_jffs_205.cpp", - "jffs/full/It_vfs_jffs_206.cpp", - "jffs/full/It_vfs_jffs_207.cpp", - "jffs/full/It_vfs_jffs_208.cpp", - "jffs/full/It_vfs_jffs_209.cpp", - "jffs/full/It_vfs_jffs_210.cpp", - "jffs/full/It_vfs_jffs_211.cpp", - "jffs/full/It_vfs_jffs_212.cpp", - "jffs/full/It_vfs_jffs_213.cpp", - "jffs/full/It_vfs_jffs_214.cpp", - "jffs/full/It_vfs_jffs_215.cpp", - "jffs/full/It_vfs_jffs_216.cpp", - "jffs/full/It_vfs_jffs_217.cpp", - "jffs/full/It_vfs_jffs_218.cpp", - "jffs/full/It_vfs_jffs_219.cpp", - "jffs/full/It_vfs_jffs_220.cpp", - "jffs/full/It_vfs_jffs_221.cpp", - "jffs/full/It_vfs_jffs_222.cpp", - "jffs/full/It_vfs_jffs_223.cpp", - "jffs/full/It_vfs_jffs_224.cpp", - "jffs/full/It_vfs_jffs_225.cpp", - "jffs/full/It_vfs_jffs_226.cpp", - "jffs/full/It_vfs_jffs_227.cpp", - "jffs/full/It_vfs_jffs_228.cpp", - "jffs/full/It_vfs_jffs_229.cpp", - "jffs/full/It_vfs_jffs_230.cpp", - "jffs/full/It_vfs_jffs_231.cpp", - "jffs/full/It_vfs_jffs_232.cpp", - "jffs/full/It_vfs_jffs_233.cpp", - "jffs/full/It_vfs_jffs_234.cpp", - "jffs/full/It_vfs_jffs_235.cpp", - "jffs/full/It_vfs_jffs_236.cpp", - "jffs/full/It_vfs_jffs_237.cpp", - "jffs/full/It_vfs_jffs_238.cpp", - "jffs/full/It_vfs_jffs_239.cpp", - "jffs/full/It_vfs_jffs_240.cpp", - "jffs/full/It_vfs_jffs_241.cpp", - "jffs/full/It_vfs_jffs_242.cpp", - "jffs/full/It_vfs_jffs_243.cpp", - "jffs/full/It_vfs_jffs_244.cpp", - "jffs/full/It_vfs_jffs_245.cpp", - "jffs/full/It_vfs_jffs_246.cpp", - "jffs/full/It_vfs_jffs_247.cpp", - "jffs/full/It_vfs_jffs_248.cpp", - "jffs/full/It_vfs_jffs_249.cpp", - "jffs/full/It_vfs_jffs_250.cpp", - "jffs/full/It_vfs_jffs_251.cpp", - "jffs/full/It_vfs_jffs_252.cpp", - "jffs/full/It_vfs_jffs_253.cpp", - "jffs/full/It_vfs_jffs_254.cpp", - "jffs/full/It_vfs_jffs_255.cpp", - "jffs/full/It_vfs_jffs_256.cpp", - "jffs/full/It_vfs_jffs_257.cpp", - "jffs/full/It_vfs_jffs_258.cpp", - "jffs/full/It_vfs_jffs_259.cpp", - "jffs/full/It_vfs_jffs_260.cpp", - "jffs/full/It_vfs_jffs_261.cpp", - "jffs/full/It_vfs_jffs_262.cpp", - "jffs/full/It_vfs_jffs_263.cpp", - "jffs/full/It_vfs_jffs_264.cpp", - "jffs/full/It_vfs_jffs_265.cpp", - "jffs/full/It_vfs_jffs_266.cpp", - "jffs/full/It_vfs_jffs_267.cpp", - "jffs/full/It_vfs_jffs_268.cpp", - "jffs/full/It_vfs_jffs_269.cpp", - "jffs/full/It_vfs_jffs_270.cpp", - "jffs/full/It_vfs_jffs_271.cpp", - "jffs/full/It_vfs_jffs_272.cpp", - "jffs/full/It_vfs_jffs_273.cpp", - "jffs/full/It_vfs_jffs_274.cpp", - "jffs/full/It_vfs_jffs_275.cpp", - "jffs/full/It_vfs_jffs_276.cpp", - "jffs/full/It_vfs_jffs_277.cpp", - "jffs/full/It_vfs_jffs_278.cpp", - "jffs/full/It_vfs_jffs_279.cpp", - "jffs/full/It_vfs_jffs_280.cpp", - "jffs/full/It_vfs_jffs_281.cpp", - "jffs/full/It_vfs_jffs_282.cpp", - "jffs/full/It_vfs_jffs_283.cpp", - "jffs/full/It_vfs_jffs_284.cpp", - "jffs/full/It_vfs_jffs_285.cpp", - "jffs/full/It_vfs_jffs_286.cpp", - "jffs/full/It_vfs_jffs_287.cpp", - "jffs/full/It_vfs_jffs_288.cpp", - "jffs/full/It_vfs_jffs_289.cpp", - "jffs/full/It_vfs_jffs_290.cpp", - "jffs/full/It_vfs_jffs_291.cpp", - "jffs/full/It_vfs_jffs_292.cpp", - "jffs/full/It_vfs_jffs_293.cpp", - "jffs/full/It_vfs_jffs_294.cpp", - "jffs/full/It_vfs_jffs_295.cpp", - "jffs/full/It_vfs_jffs_296.cpp", - "jffs/full/It_vfs_jffs_297.cpp", - "jffs/full/It_vfs_jffs_298.cpp", - "jffs/full/It_vfs_jffs_299.cpp", - "jffs/full/It_vfs_jffs_300.cpp", - "jffs/full/It_vfs_jffs_301.cpp", - "jffs/full/It_vfs_jffs_302.cpp", - "jffs/full/It_vfs_jffs_303.cpp", - "jffs/full/It_vfs_jffs_304.cpp", - "jffs/full/It_vfs_jffs_305.cpp", - "jffs/full/It_vfs_jffs_306.cpp", - "jffs/full/It_vfs_jffs_307.cpp", - "jffs/full/It_vfs_jffs_308.cpp", - "jffs/full/It_vfs_jffs_309.cpp", - "jffs/full/It_vfs_jffs_310.cpp", - "jffs/full/It_vfs_jffs_311.cpp", - "jffs/full/It_vfs_jffs_312.cpp", - "jffs/full/It_vfs_jffs_313.cpp", - "jffs/full/It_vfs_jffs_314.cpp", - "jffs/full/It_vfs_jffs_315.cpp", - "jffs/full/It_vfs_jffs_316.cpp", - "jffs/full/It_vfs_jffs_317.cpp", - "jffs/full/It_vfs_jffs_318.cpp", - "jffs/full/It_vfs_jffs_319.cpp", - "jffs/full/It_vfs_jffs_320.cpp", - "jffs/full/It_vfs_jffs_321.cpp", - "jffs/full/It_vfs_jffs_322.cpp", - "jffs/full/It_vfs_jffs_323.cpp", - "jffs/full/It_vfs_jffs_324.cpp", - "jffs/full/It_vfs_jffs_325.cpp", - "jffs/full/It_vfs_jffs_326.cpp", - "jffs/full/It_vfs_jffs_327.cpp", - "jffs/full/It_vfs_jffs_328.cpp", - "jffs/full/It_vfs_jffs_329.cpp", - "jffs/full/It_vfs_jffs_330.cpp", - "jffs/full/It_vfs_jffs_331.cpp", - "jffs/full/It_vfs_jffs_332.cpp", - "jffs/full/It_vfs_jffs_333.cpp", - "jffs/full/It_vfs_jffs_334.cpp", - "jffs/full/It_vfs_jffs_335.cpp", - "jffs/full/It_vfs_jffs_336.cpp", - "jffs/full/It_vfs_jffs_337.cpp", - "jffs/full/It_vfs_jffs_338.cpp", - "jffs/full/It_vfs_jffs_339.cpp", - "jffs/full/It_vfs_jffs_340.cpp", - "jffs/full/It_vfs_jffs_342.cpp", - "jffs/full/It_vfs_jffs_343.cpp", - "jffs/full/It_vfs_jffs_344.cpp", - "jffs/full/It_vfs_jffs_346.cpp", - "jffs/full/It_vfs_jffs_352.cpp", - "jffs/full/It_vfs_jffs_353.cpp", - "jffs/full/It_vfs_jffs_354.cpp", - "jffs/full/It_vfs_jffs_355.cpp", - "jffs/full/It_vfs_jffs_356.cpp", - "jffs/full/It_vfs_jffs_357.cpp", - "jffs/full/It_vfs_jffs_358.cpp", - "jffs/full/It_vfs_jffs_359.cpp", - "jffs/full/It_vfs_jffs_360.cpp", - "jffs/full/It_vfs_jffs_361.cpp", - "jffs/full/It_vfs_jffs_362.cpp", - "jffs/full/It_vfs_jffs_364.cpp", - "jffs/full/It_vfs_jffs_365.cpp", - "jffs/full/It_vfs_jffs_366.cpp", - "jffs/full/It_vfs_jffs_367.cpp", - "jffs/full/It_vfs_jffs_368.cpp", - "jffs/full/It_vfs_jffs_369.cpp", - "jffs/full/It_vfs_jffs_370.cpp", - "jffs/full/It_vfs_jffs_371.cpp", - "jffs/full/It_vfs_jffs_372.cpp", - "jffs/full/It_vfs_jffs_373.cpp", - "jffs/full/It_vfs_jffs_374.cpp", - "jffs/full/It_vfs_jffs_375.cpp", - "jffs/full/It_vfs_jffs_376.cpp", - "jffs/full/It_vfs_jffs_377.cpp", - "jffs/full/It_vfs_jffs_378.cpp", - "jffs/full/It_vfs_jffs_379.cpp", - "jffs/full/It_vfs_jffs_380.cpp", - "jffs/full/It_vfs_jffs_381.cpp", - "jffs/full/It_vfs_jffs_382.cpp", - "jffs/full/It_vfs_jffs_383.cpp", - "jffs/full/It_vfs_jffs_384.cpp", - "jffs/full/It_vfs_jffs_385.cpp", - "jffs/full/It_vfs_jffs_386.cpp", - "jffs/full/It_vfs_jffs_387.cpp", - "jffs/full/It_vfs_jffs_388.cpp", - "jffs/full/It_vfs_jffs_389.cpp", - "jffs/full/It_vfs_jffs_390.cpp", - "jffs/full/It_vfs_jffs_391.cpp", - "jffs/full/It_vfs_jffs_392.cpp", - "jffs/full/It_vfs_jffs_393.cpp", - "jffs/full/It_vfs_jffs_394.cpp", - "jffs/full/It_vfs_jffs_395.cpp", - "jffs/full/It_vfs_jffs_396.cpp", - "jffs/full/It_vfs_jffs_397.cpp", - "jffs/full/It_vfs_jffs_398.cpp", - "jffs/full/It_vfs_jffs_399.cpp", - "jffs/full/It_vfs_jffs_400.cpp", - "jffs/full/It_vfs_jffs_401.cpp", - "jffs/full/It_vfs_jffs_402.cpp", - "jffs/full/It_vfs_jffs_403.cpp", - "jffs/full/It_vfs_jffs_404.cpp", - "jffs/full/It_vfs_jffs_405.cpp", - "jffs/full/It_vfs_jffs_406.cpp", - "jffs/full/It_vfs_jffs_407.cpp", - "jffs/full/It_vfs_jffs_408.cpp", - "jffs/full/It_vfs_jffs_409.cpp", - "jffs/full/It_vfs_jffs_410.cpp", - "jffs/full/It_vfs_jffs_411.cpp", - "jffs/full/It_vfs_jffs_412.cpp", - "jffs/full/It_vfs_jffs_413.cpp", - "jffs/full/It_vfs_jffs_414.cpp", - "jffs/full/It_vfs_jffs_415.cpp", - "jffs/full/It_vfs_jffs_416.cpp", - "jffs/full/It_vfs_jffs_417.cpp", - "jffs/full/It_vfs_jffs_418.cpp", - "jffs/full/It_vfs_jffs_419.cpp", - "jffs/full/It_vfs_jffs_420.cpp", - "jffs/full/It_vfs_jffs_421.cpp", - "jffs/full/It_vfs_jffs_422.cpp", - "jffs/full/It_vfs_jffs_423.cpp", - "jffs/full/It_vfs_jffs_424.cpp", - "jffs/full/It_vfs_jffs_425.cpp", - "jffs/full/It_vfs_jffs_426.cpp", - "jffs/full/It_vfs_jffs_427.cpp", - "jffs/full/It_vfs_jffs_428.cpp", - "jffs/full/It_vfs_jffs_429.cpp", - "jffs/full/It_vfs_jffs_430.cpp", - "jffs/full/It_vfs_jffs_431.cpp", - "jffs/full/It_vfs_jffs_432.cpp", - "jffs/full/It_vfs_jffs_433.cpp", - "jffs/full/It_vfs_jffs_434.cpp", - "jffs/full/It_vfs_jffs_435.cpp", - "jffs/full/It_vfs_jffs_454.cpp", - "jffs/full/It_vfs_jffs_455.cpp", - "jffs/full/It_vfs_jffs_456.cpp", - "jffs/full/It_vfs_jffs_457.cpp", - "jffs/full/It_vfs_jffs_458.cpp", - "jffs/full/It_vfs_jffs_459.cpp", - "jffs/full/It_vfs_jffs_460.cpp", - "jffs/full/It_vfs_jffs_461.cpp", - "jffs/full/It_vfs_jffs_462.cpp", - "jffs/full/It_vfs_jffs_487.cpp", - "jffs/full/It_vfs_jffs_488.cpp", - "jffs/full/It_vfs_jffs_489.cpp", - "jffs/full/It_vfs_jffs_490.cpp", - "jffs/full/It_vfs_jffs_491.cpp", - "jffs/full/It_vfs_jffs_492.cpp", - "jffs/full/It_vfs_jffs_493.cpp", - "jffs/full/It_vfs_jffs_494.cpp", - "jffs/full/It_vfs_jffs_495.cpp", - "jffs/full/It_vfs_jffs_496.cpp", - "jffs/full/It_vfs_jffs_497.cpp", - "jffs/full/It_vfs_jffs_498.cpp", - "jffs/full/It_vfs_jffs_499.cpp", - "jffs/full/It_vfs_jffs_500.cpp", - "jffs/full/It_vfs_jffs_501.cpp", - "jffs/full/It_vfs_jffs_502.cpp", - "jffs/full/It_vfs_jffs_503.cpp", - "jffs/full/It_vfs_jffs_504.cpp", - "jffs/full/It_vfs_jffs_505.cpp", - "jffs/full/It_vfs_jffs_506.cpp", - "jffs/full/It_vfs_jffs_507.cpp", - "jffs/full/It_vfs_jffs_508.cpp", - "jffs/full/It_vfs_jffs_509.cpp", - "jffs/full/It_vfs_jffs_510.cpp", - "jffs/full/It_vfs_jffs_511.cpp", - "jffs/full/It_vfs_jffs_512.cpp", - "jffs/full/It_vfs_jffs_513.cpp", - "jffs/full/It_vfs_jffs_514.cpp", - "jffs/full/It_vfs_jffs_515.cpp", - "jffs/full/It_vfs_jffs_516.cpp", - "jffs/full/It_vfs_jffs_517.cpp", - "jffs/full/It_vfs_jffs_518.cpp", - "jffs/full/It_vfs_jffs_519.cpp", - "jffs/full/It_vfs_jffs_520.cpp", - "jffs/full/It_vfs_jffs_521.cpp", - "jffs/full/It_vfs_jffs_522.cpp", - "jffs/full/It_vfs_jffs_523.cpp", - "jffs/full/It_vfs_jffs_524.cpp", - "jffs/full/It_vfs_jffs_526.cpp", - "jffs/full/It_vfs_jffs_528.cpp", - "jffs/full/It_vfs_jffs_529.cpp", - "jffs/full/It_vfs_jffs_530.cpp", - "jffs/full/It_vfs_jffs_531.cpp", - "jffs/full/It_vfs_jffs_532.cpp", - "jffs/full/It_vfs_jffs_533.cpp", - "jffs/full/It_vfs_jffs_534.cpp", - "jffs/full/It_vfs_jffs_541.cpp", - "jffs/full/It_vfs_jffs_542.cpp", - "jffs/full/It_vfs_jffs_543.cpp", - "jffs/full/It_vfs_jffs_544.cpp", - "jffs/full/It_vfs_jffs_545.cpp", - "jffs/full/It_vfs_jffs_546.cpp", - "jffs/full/It_vfs_jffs_547.cpp", - "jffs/full/It_vfs_jffs_548.cpp", - "jffs/full/It_vfs_jffs_549.cpp", - "jffs/full/It_vfs_jffs_550.cpp", - "jffs/full/It_vfs_jffs_551.cpp", - "jffs/full/It_vfs_jffs_552.cpp", - "jffs/full/It_vfs_jffs_553.cpp", - "jffs/full/It_vfs_jffs_554.cpp", - "jffs/full/It_vfs_jffs_555.cpp", - "jffs/full/It_vfs_jffs_556.cpp", - "jffs/full/It_vfs_jffs_557.cpp", - "jffs/full/It_vfs_jffs_560.cpp", - "jffs/full/It_vfs_jffs_562.cpp", - "jffs/full/It_vfs_jffs_563.cpp", - "jffs/full/It_vfs_jffs_564.cpp", - "jffs/full/It_vfs_jffs_565.cpp", - "jffs/full/It_vfs_jffs_566.cpp", - "jffs/full/It_vfs_jffs_567.cpp", - "jffs/full/It_vfs_jffs_568.cpp", - "jffs/full/It_vfs_jffs_569.cpp", - "jffs/full/It_vfs_jffs_570.cpp", - "jffs/full/It_vfs_jffs_571.cpp", - "jffs/full/It_vfs_jffs_572.cpp", - "jffs/full/It_vfs_jffs_573.cpp", - "jffs/full/It_vfs_jffs_574.cpp", - "jffs/full/It_vfs_jffs_583.cpp", - "jffs/full/It_vfs_jffs_584.cpp", - "jffs/full/It_vfs_jffs_586.cpp", - "jffs/full/It_vfs_jffs_589.cpp", - "jffs/full/It_vfs_jffs_590.cpp", - "jffs/full/It_vfs_jffs_591.cpp", - "jffs/full/It_vfs_jffs_592.cpp", - "jffs/full/It_vfs_jffs_593.cpp", - "jffs/full/It_vfs_jffs_594.cpp", - "jffs/full/It_vfs_jffs_595.cpp", - "jffs/full/It_vfs_jffs_596.cpp", - "jffs/full/It_vfs_jffs_603.cpp", - "jffs/full/It_vfs_jffs_636.cpp", - "jffs/full/It_vfs_jffs_643.cpp", - "jffs/full/It_vfs_jffs_644.cpp", - "jffs/full/It_vfs_jffs_645.cpp", - "jffs/full/It_vfs_jffs_646.cpp", - "jffs/full/It_vfs_jffs_648.cpp", - "jffs/full/It_vfs_jffs_649.cpp", - "jffs/full/It_vfs_jffs_650.cpp", - "jffs/full/It_vfs_jffs_651.cpp", - "jffs/full/It_vfs_jffs_652.cpp", - "jffs/full/It_vfs_jffs_653.cpp", - "jffs/full/It_vfs_jffs_654.cpp", - "jffs/full/It_vfs_jffs_655.cpp", - "jffs/full/It_vfs_jffs_656.cpp", - "jffs/full/It_vfs_jffs_663.cpp", - "jffs/full/It_vfs_jffs_664.cpp", - "jffs/full/It_vfs_jffs_665.cpp", - "jffs/full/It_vfs_jffs_666.cpp", - "jffs/full/It_vfs_jffs_668.cpp", - "jffs/full/It_vfs_jffs_669.cpp", - "jffs/full/It_vfs_jffs_670.cpp", - "jffs/full/It_vfs_jffs_671.cpp", - "jffs/full/It_vfs_jffs_672.cpp", - "jffs/full/It_vfs_jffs_673.cpp", - "jffs/full/It_vfs_jffs_674.cpp", - "jffs/full/It_vfs_jffs_675.cpp", - "jffs/full/It_vfs_jffs_676.cpp", - "jffs/full/It_vfs_jffs_690.cpp", - "jffs/full/It_vfs_jffs_694.cpp", - "jffs/full/It_vfs_jffs_696.cpp", - "jffs/full/It_vfs_jffs_697.cpp", - "jffs/full/It_vfs_jffs_700.cpp", - "jffs/full/It_vfs_jffs_701.cpp", - "jffs/full/It_vfs_jffs_807.cpp", - "jffs/full/It_vfs_jffs_808.cpp", - - - "jffs/smoke/It_vfs_jffs_001.cpp", - "jffs/smoke/It_vfs_jffs_002.cpp", - "jffs/smoke/It_vfs_jffs_003.cpp", - "jffs/smoke/It_vfs_jffs_005.cpp", - "jffs/smoke/It_vfs_jffs_021.cpp", - "jffs/smoke/It_vfs_jffs_022.cpp", - "jffs/smoke/It_vfs_jffs_026.cpp", - "jffs/smoke/It_vfs_jffs_027.cpp", - "jffs/smoke/It_vfs_jffs_034.cpp", - "jffs/smoke/It_vfs_jffs_035.cpp", - "jffs/smoke/It_vfs_jffs_094.cpp", - "jffs/smoke/It_vfs_jffs_095.cpp", - #"jffs/smoke/It_vfs_jffs_103.cpp", - "jffs/smoke/It_vfs_jffs_535.cpp", - "jffs/smoke/It_vfs_jffs_Dac_001.cpp", - - - "jffs/pressure/It_fs_jffs_performance_001.cpp", - "jffs/pressure/It_fs_jffs_performance_002.cpp", - "jffs/pressure/It_fs_jffs_performance_003.cpp", - "jffs/pressure/It_fs_jffs_performance_004.cpp", - "jffs/pressure/It_fs_jffs_performance_005.cpp", - "jffs/pressure/It_fs_jffs_performance_006.cpp", - "jffs/pressure/It_fs_jffs_performance_007.cpp", - "jffs/pressure/It_fs_jffs_performance_008.cpp", - "jffs/pressure/It_fs_jffs_performance_009.cpp", - "jffs/pressure/It_fs_jffs_performance_010.cpp", - "jffs/pressure/It_fs_jffs_performance_011.cpp", - "jffs/pressure/It_fs_jffs_performance_012.cpp", - "jffs/pressure/It_fs_jffs_performance_013.cpp", - "jffs/pressure/It_fs_jffs_pressure_001.cpp", - "jffs/pressure/It_fs_jffs_pressure_002.cpp", - "jffs/pressure/It_fs_jffs_pressure_003.cpp", - "jffs/pressure/It_fs_jffs_pressure_004.cpp", - "jffs/pressure/It_fs_jffs_pressure_005.cpp", - "jffs/pressure/It_fs_jffs_pressure_006.cpp", - "jffs/pressure/It_fs_jffs_pressure_007.cpp", - "jffs/pressure/It_fs_jffs_pressure_008.cpp", - "jffs/pressure/It_fs_jffs_pressure_009.cpp", - "jffs/pressure/It_fs_jffs_pressure_010.cpp", - "jffs/pressure/It_fs_jffs_pressure_011.cpp", - "jffs/pressure/It_fs_jffs_pressure_012.cpp", - "jffs/pressure/It_fs_jffs_pressure_014.cpp", - "jffs/pressure/It_fs_jffs_pressure_015.cpp", - "jffs/pressure/It_fs_jffs_pressure_016.cpp", - "jffs/pressure/It_fs_jffs_pressure_017.cpp", - "jffs/pressure/It_fs_jffs_pressure_018.cpp", - "jffs/pressure/It_fs_jffs_pressure_019.cpp", - "jffs/pressure/It_fs_jffs_pressure_020.cpp", - "jffs/pressure/It_fs_jffs_pressure_021.cpp", - "jffs/pressure/It_fs_jffs_pressure_022.cpp", - "jffs/pressure/It_fs_jffs_pressure_023.cpp", - "jffs/pressure/It_fs_jffs_pressure_024.cpp", - "jffs/pressure/It_fs_jffs_pressure_025.cpp", - "jffs/pressure/It_fs_jffs_pressure_026.cpp", - "jffs/pressure/It_fs_jffs_pressure_027.cpp", - "jffs/pressure/It_fs_jffs_pressure_028.cpp", - "jffs/pressure/It_fs_jffs_pressure_029.cpp", - "jffs/pressure/It_fs_jffs_pressure_030.cpp", - "jffs/pressure/It_fs_jffs_pressure_031.cpp", - "jffs/pressure/It_fs_jffs_pressure_032.cpp", - "jffs/pressure/It_fs_jffs_pressure_033.cpp", - "jffs/pressure/It_fs_jffs_pressure_034.cpp", - "jffs/pressure/It_fs_jffs_pressure_035.cpp", - "jffs/pressure/It_fs_jffs_pressure_036.cpp", - "jffs/pressure/It_fs_jffs_pressure_037.cpp", - "jffs/pressure/It_fs_jffs_pressure_038.cpp", - "jffs/pressure/It_fs_jffs_pressure_039.cpp", - "jffs/pressure/It_fs_jffs_pressure_040.cpp", - "jffs/pressure/It_fs_jffs_pressure_041.cpp", - "jffs/pressure/It_fs_jffs_pressure_042.cpp", - "jffs/pressure/It_fs_jffs_pressure_043.cpp", - "jffs/pressure/It_fs_jffs_pressure_044.cpp", - "jffs/pressure/It_fs_jffs_pressure_045.cpp", - "jffs/pressure/It_fs_jffs_pressure_046.cpp", - "jffs/pressure/It_fs_jffs_pressure_047.cpp", - "jffs/pressure/It_fs_jffs_pressure_048.cpp", - "jffs/pressure/It_fs_jffs_pressure_049.cpp", - "jffs/pressure/It_fs_jffs_pressure_050.cpp", - "jffs/pressure/It_fs_jffs_pressure_051.cpp", - "jffs/pressure/It_fs_jffs_pressure_052.cpp", - "jffs/pressure/It_fs_jffs_pressure_053.cpp", - "jffs/pressure/It_fs_jffs_pressure_301.cpp", - "jffs/pressure/It_fs_jffs_pressure_302.cpp", - #"jffs/pressure/It_fs_jffs_pressure_303.cpp", - "jffs/pressure/It_fs_jffs_pressure_304.cpp", - "jffs/pressure/It_fs_jffs_pressure_305.cpp", - "jffs/pressure/It_fs_jffs_pressure_306.cpp", - "jffs/pressure/It_fs_jffs_pressure_307.cpp", - "jffs/pressure/It_fs_jffs_pressure_308.cpp", - "jffs/pressure/It_fs_jffs_pressure_309.cpp", - "jffs/pressure/It_fs_jffs_pressure_310.cpp", - "jffs/pressure/It_fs_jffs_pressure_311.cpp", - "jffs/pressure/It_fs_jffs_pressure_312.cpp", - "jffs/pressure/It_fs_jffs_pressure_313.cpp", - "jffs/pressure/It_fs_jffs_pressure_314.cpp", - "jffs/pressure/It_fs_jffs_pressure_315.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_001.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_002.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_003.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_004.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_005.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_006.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_007.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_008.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_009.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_010.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_011.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_012.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_013.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_014.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_015.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_016.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_017.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_018.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_019.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_020.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_021.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_022.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_023.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_024.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_025.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_026.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_027.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_028.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_029.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_030.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_031.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_032.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_033.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_034.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_035.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_036.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_037.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_038.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_039.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_040.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_041.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_042.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_043.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_044.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_045.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_046.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_047.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_048.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_049.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_050.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_051.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_052.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_053.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_054.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_055.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_056.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_057.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_058.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_059.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_060.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_061.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_062.cpp", - "jffs/pressure/It_vfs_jffs_multipthread_063.cpp", ] + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "jffs/smoke/It_vfs_jffs_001.cpp", + "jffs/smoke/It_vfs_jffs_002.cpp", + "jffs/smoke/It_vfs_jffs_003.cpp", + "jffs/smoke/It_vfs_jffs_005.cpp", + "jffs/smoke/It_vfs_jffs_021.cpp", + "jffs/smoke/It_vfs_jffs_022.cpp", + "jffs/smoke/It_vfs_jffs_026.cpp", + "jffs/smoke/It_vfs_jffs_027.cpp", + "jffs/smoke/It_vfs_jffs_034.cpp", + "jffs/smoke/It_vfs_jffs_035.cpp", + "jffs/smoke/It_vfs_jffs_094.cpp", + "jffs/smoke/It_vfs_jffs_095.cpp", + #"jffs/smoke/It_vfs_jffs_103.cpp", + "jffs/smoke/It_vfs_jffs_535.cpp", + "jffs/smoke/It_vfs_jffs_Dac_001.cpp", + ] + sources += sources_smoke + } + if (LOSCFG_USER_TEST_PRESSURE == true) { + sources_pressure = [ + "jffs/pressure/It_fs_jffs_performance_001.cpp", + "jffs/pressure/It_fs_jffs_performance_002.cpp", + "jffs/pressure/It_fs_jffs_performance_003.cpp", + "jffs/pressure/It_fs_jffs_performance_004.cpp", + "jffs/pressure/It_fs_jffs_performance_005.cpp", + "jffs/pressure/It_fs_jffs_performance_006.cpp", + "jffs/pressure/It_fs_jffs_performance_007.cpp", + "jffs/pressure/It_fs_jffs_performance_008.cpp", + "jffs/pressure/It_fs_jffs_performance_009.cpp", + "jffs/pressure/It_fs_jffs_performance_010.cpp", + "jffs/pressure/It_fs_jffs_performance_011.cpp", + "jffs/pressure/It_fs_jffs_performance_012.cpp", + "jffs/pressure/It_fs_jffs_performance_013.cpp", + "jffs/pressure/It_fs_jffs_pressure_001.cpp", + "jffs/pressure/It_fs_jffs_pressure_002.cpp", + "jffs/pressure/It_fs_jffs_pressure_003.cpp", + "jffs/pressure/It_fs_jffs_pressure_004.cpp", + "jffs/pressure/It_fs_jffs_pressure_005.cpp", + "jffs/pressure/It_fs_jffs_pressure_006.cpp", + "jffs/pressure/It_fs_jffs_pressure_007.cpp", + "jffs/pressure/It_fs_jffs_pressure_008.cpp", + "jffs/pressure/It_fs_jffs_pressure_009.cpp", + "jffs/pressure/It_fs_jffs_pressure_010.cpp", + "jffs/pressure/It_fs_jffs_pressure_011.cpp", + "jffs/pressure/It_fs_jffs_pressure_012.cpp", + "jffs/pressure/It_fs_jffs_pressure_014.cpp", + "jffs/pressure/It_fs_jffs_pressure_015.cpp", + "jffs/pressure/It_fs_jffs_pressure_016.cpp", + "jffs/pressure/It_fs_jffs_pressure_017.cpp", + "jffs/pressure/It_fs_jffs_pressure_018.cpp", + "jffs/pressure/It_fs_jffs_pressure_019.cpp", + "jffs/pressure/It_fs_jffs_pressure_020.cpp", + "jffs/pressure/It_fs_jffs_pressure_021.cpp", + "jffs/pressure/It_fs_jffs_pressure_022.cpp", + "jffs/pressure/It_fs_jffs_pressure_023.cpp", + "jffs/pressure/It_fs_jffs_pressure_024.cpp", + "jffs/pressure/It_fs_jffs_pressure_025.cpp", + "jffs/pressure/It_fs_jffs_pressure_026.cpp", + "jffs/pressure/It_fs_jffs_pressure_027.cpp", + "jffs/pressure/It_fs_jffs_pressure_028.cpp", + "jffs/pressure/It_fs_jffs_pressure_029.cpp", + "jffs/pressure/It_fs_jffs_pressure_030.cpp", + "jffs/pressure/It_fs_jffs_pressure_031.cpp", + "jffs/pressure/It_fs_jffs_pressure_032.cpp", + "jffs/pressure/It_fs_jffs_pressure_033.cpp", + "jffs/pressure/It_fs_jffs_pressure_034.cpp", + "jffs/pressure/It_fs_jffs_pressure_035.cpp", + "jffs/pressure/It_fs_jffs_pressure_036.cpp", + "jffs/pressure/It_fs_jffs_pressure_037.cpp", + "jffs/pressure/It_fs_jffs_pressure_038.cpp", + "jffs/pressure/It_fs_jffs_pressure_039.cpp", + "jffs/pressure/It_fs_jffs_pressure_040.cpp", + "jffs/pressure/It_fs_jffs_pressure_041.cpp", + "jffs/pressure/It_fs_jffs_pressure_042.cpp", + "jffs/pressure/It_fs_jffs_pressure_043.cpp", + "jffs/pressure/It_fs_jffs_pressure_044.cpp", + "jffs/pressure/It_fs_jffs_pressure_045.cpp", + "jffs/pressure/It_fs_jffs_pressure_046.cpp", + "jffs/pressure/It_fs_jffs_pressure_047.cpp", + "jffs/pressure/It_fs_jffs_pressure_048.cpp", + "jffs/pressure/It_fs_jffs_pressure_049.cpp", + "jffs/pressure/It_fs_jffs_pressure_050.cpp", + "jffs/pressure/It_fs_jffs_pressure_051.cpp", + "jffs/pressure/It_fs_jffs_pressure_052.cpp", + "jffs/pressure/It_fs_jffs_pressure_053.cpp", + "jffs/pressure/It_fs_jffs_pressure_301.cpp", + "jffs/pressure/It_fs_jffs_pressure_302.cpp", + #"jffs/pressure/It_fs_jffs_pressure_303.cpp", + "jffs/pressure/It_fs_jffs_pressure_304.cpp", + "jffs/pressure/It_fs_jffs_pressure_305.cpp", + "jffs/pressure/It_fs_jffs_pressure_306.cpp", + "jffs/pressure/It_fs_jffs_pressure_307.cpp", + "jffs/pressure/It_fs_jffs_pressure_308.cpp", + "jffs/pressure/It_fs_jffs_pressure_309.cpp", + "jffs/pressure/It_fs_jffs_pressure_310.cpp", + "jffs/pressure/It_fs_jffs_pressure_311.cpp", + "jffs/pressure/It_fs_jffs_pressure_312.cpp", + "jffs/pressure/It_fs_jffs_pressure_313.cpp", + "jffs/pressure/It_fs_jffs_pressure_314.cpp", + "jffs/pressure/It_fs_jffs_pressure_315.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_001.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_002.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_003.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_004.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_005.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_006.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_007.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_008.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_009.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_010.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_011.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_012.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_013.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_014.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_015.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_016.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_017.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_018.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_019.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_020.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_021.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_022.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_023.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_024.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_025.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_026.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_027.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_028.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_029.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_030.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_031.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_032.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_033.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_034.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_035.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_036.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_037.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_038.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_039.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_040.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_041.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_042.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_043.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_044.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_045.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_046.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_047.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_048.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_049.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_050.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_051.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_052.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_053.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_054.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_055.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_056.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_057.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_058.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_059.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_060.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_061.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_062.cpp", + "jffs/pressure/It_vfs_jffs_multipthread_063.cpp", + ] + sources += sources_pressure + } + if (LOSCFG_USER_TEST_FULL == true) { + sources_full = [ + "jffs/full/It_jffs_001.cpp", + "jffs/full/It_jffs_002.cpp", + "jffs/full/It_jffs_003.cpp", + "jffs/full/It_jffs_004.cpp", + "jffs/full/It_jffs_005.cpp", + "jffs/full/It_jffs_006.cpp", + "jffs/full/It_jffs_007.cpp", + "jffs/full/It_jffs_008.cpp", + "jffs/full/It_jffs_009.cpp", + "jffs/full/It_jffs_010.cpp", + "jffs/full/It_jffs_011.cpp", + "jffs/full/It_jffs_012.cpp", + "jffs/full/It_jffs_013.cpp", + "jffs/full/It_jffs_014.cpp", + "jffs/full/It_jffs_015.cpp", + "jffs/full/It_jffs_016.cpp", + "jffs/full/It_jffs_017.cpp", + "jffs/full/It_jffs_018.cpp", + "jffs/full/It_jffs_019.cpp", + "jffs/full/It_jffs_020.cpp", + "jffs/full/It_jffs_021.cpp", + "jffs/full/It_jffs_022.cpp", + "jffs/full/It_jffs_023.cpp", + "jffs/full/It_jffs_024.cpp", + "jffs/full/It_jffs_025.cpp", + "jffs/full/It_jffs_026.cpp", + "jffs/full/It_jffs_027.cpp", + "jffs/full/It_jffs_028.cpp", + "jffs/full/It_jffs_029.cpp", + "jffs/full/It_jffs_030.cpp", + "jffs/full/It_jffs_031.cpp", + "jffs/full/It_jffs_032.cpp", + "jffs/full/It_jffs_033.cpp", + "jffs/full/It_jffs_034.cpp", + "jffs/full/It_jffs_035.cpp", + "jffs/full/It_jffs_036.cpp", + "jffs/full/It_jffs_037.cpp", + "jffs/full/It_jffs_038.cpp", + "jffs/full/It_jffs_039.cpp", + "jffs/full/It_jffs_040.cpp", + "jffs/full/It_jffs_041.cpp", + "jffs/full/It_jffs_042.cpp", + "jffs/full/It_jffs_043.cpp", + "jffs/full/It_jffs_044.cpp", + "jffs/full/It_vfs_jffs_004.cpp", + "jffs/full/It_vfs_jffs_006.cpp", + "jffs/full/It_vfs_jffs_007.cpp", + "jffs/full/It_vfs_jffs_008.cpp", + "jffs/full/It_vfs_jffs_009.cpp", + "jffs/full/It_vfs_jffs_010.cpp", + "jffs/full/It_vfs_jffs_011.cpp", + "jffs/full/It_vfs_jffs_012.cpp", + "jffs/full/It_vfs_jffs_013.cpp", + "jffs/full/It_vfs_jffs_014.cpp", + "jffs/full/It_vfs_jffs_015.cpp", + "jffs/full/It_vfs_jffs_016.cpp", + "jffs/full/It_vfs_jffs_017.cpp", + "jffs/full/It_vfs_jffs_018.cpp", + "jffs/full/It_vfs_jffs_019.cpp", + "jffs/full/It_vfs_jffs_020.cpp", + "jffs/full/It_vfs_jffs_023.cpp", + "jffs/full/It_vfs_jffs_024.cpp", + "jffs/full/It_vfs_jffs_025.cpp", + "jffs/full/It_vfs_jffs_028.cpp", + "jffs/full/It_vfs_jffs_029.cpp", + "jffs/full/It_vfs_jffs_030.cpp", + "jffs/full/It_vfs_jffs_031.cpp", + "jffs/full/It_vfs_jffs_032.cpp", + "jffs/full/It_vfs_jffs_033.cpp", + "jffs/full/It_vfs_jffs_037.cpp", + "jffs/full/It_vfs_jffs_038.cpp", + "jffs/full/It_vfs_jffs_039.cpp", + "jffs/full/It_vfs_jffs_040.cpp", + "jffs/full/It_vfs_jffs_041.cpp", + "jffs/full/It_vfs_jffs_042.cpp", + "jffs/full/It_vfs_jffs_043.cpp", + "jffs/full/It_vfs_jffs_044.cpp", + "jffs/full/It_vfs_jffs_045.cpp", + "jffs/full/It_vfs_jffs_046.cpp", + "jffs/full/It_vfs_jffs_048.cpp", + "jffs/full/It_vfs_jffs_049.cpp", + "jffs/full/It_vfs_jffs_050.cpp", + #"jffs/full/It_vfs_jffs_051.cpp", + "jffs/full/It_vfs_jffs_053.cpp", + "jffs/full/It_vfs_jffs_055.cpp", + "jffs/full/It_vfs_jffs_056.cpp", + "jffs/full/It_vfs_jffs_057.cpp", + "jffs/full/It_vfs_jffs_058.cpp", + "jffs/full/It_vfs_jffs_059.cpp", + "jffs/full/It_vfs_jffs_060.cpp", + "jffs/full/It_vfs_jffs_061.cpp", + "jffs/full/It_vfs_jffs_062.cpp", + "jffs/full/It_vfs_jffs_063.cpp", + "jffs/full/It_vfs_jffs_064.cpp", + "jffs/full/It_vfs_jffs_065.cpp", + "jffs/full/It_vfs_jffs_066.cpp", + "jffs/full/It_vfs_jffs_067.cpp", + "jffs/full/It_vfs_jffs_068.cpp", + "jffs/full/It_vfs_jffs_069.cpp", + "jffs/full/It_vfs_jffs_070.cpp", + "jffs/full/It_vfs_jffs_071.cpp", + "jffs/full/It_vfs_jffs_072.cpp", + "jffs/full/It_vfs_jffs_073.cpp", + "jffs/full/It_vfs_jffs_074.cpp", + "jffs/full/It_vfs_jffs_076.cpp", + "jffs/full/It_vfs_jffs_077.cpp", + "jffs/full/It_vfs_jffs_078.cpp", + "jffs/full/It_vfs_jffs_079.cpp", + "jffs/full/It_vfs_jffs_080.cpp", + "jffs/full/It_vfs_jffs_081.cpp", + "jffs/full/It_vfs_jffs_082.cpp", + "jffs/full/It_vfs_jffs_083.cpp", + "jffs/full/It_vfs_jffs_084.cpp", + "jffs/full/It_vfs_jffs_085.cpp", + "jffs/full/It_vfs_jffs_086.cpp", + "jffs/full/It_vfs_jffs_088.cpp", + "jffs/full/It_vfs_jffs_090.cpp", + "jffs/full/It_vfs_jffs_092.cpp", + "jffs/full/It_vfs_jffs_093.cpp", + "jffs/full/It_vfs_jffs_096.cpp", + "jffs/full/It_vfs_jffs_097.cpp", + "jffs/full/It_vfs_jffs_099.cpp", + "jffs/full/It_vfs_jffs_100.cpp", + "jffs/full/It_vfs_jffs_101.cpp", + "jffs/full/It_vfs_jffs_102.cpp", + "jffs/full/It_vfs_jffs_104.cpp", + "jffs/full/It_vfs_jffs_105.cpp", + "jffs/full/It_vfs_jffs_106.cpp", + "jffs/full/It_vfs_jffs_107.cpp", + "jffs/full/It_vfs_jffs_116.cpp", + "jffs/full/It_vfs_jffs_117.cpp", + "jffs/full/It_vfs_jffs_118.cpp", + "jffs/full/It_vfs_jffs_119.cpp", + "jffs/full/It_vfs_jffs_120.cpp", + "jffs/full/It_vfs_jffs_121.cpp", + "jffs/full/It_vfs_jffs_122.cpp", + "jffs/full/It_vfs_jffs_123.cpp", + "jffs/full/It_vfs_jffs_124.cpp", + "jffs/full/It_vfs_jffs_125.cpp", + "jffs/full/It_vfs_jffs_126.cpp", + "jffs/full/It_vfs_jffs_127.cpp", + "jffs/full/It_vfs_jffs_128.cpp", + "jffs/full/It_vfs_jffs_129.cpp", + "jffs/full/It_vfs_jffs_130.cpp", + "jffs/full/It_vfs_jffs_131.cpp", + "jffs/full/It_vfs_jffs_132.cpp", + "jffs/full/It_vfs_jffs_133.cpp", + "jffs/full/It_vfs_jffs_134.cpp", + "jffs/full/It_vfs_jffs_135.cpp", + "jffs/full/It_vfs_jffs_136.cpp", + "jffs/full/It_vfs_jffs_137.cpp", + "jffs/full/It_vfs_jffs_138.cpp", + "jffs/full/It_vfs_jffs_139.cpp", + "jffs/full/It_vfs_jffs_140.cpp", + "jffs/full/It_vfs_jffs_141.cpp", + "jffs/full/It_vfs_jffs_142.cpp", + "jffs/full/It_vfs_jffs_143.cpp", + "jffs/full/It_vfs_jffs_144.cpp", + "jffs/full/It_vfs_jffs_145.cpp", + "jffs/full/It_vfs_jffs_146.cpp", + "jffs/full/It_vfs_jffs_147.cpp", + "jffs/full/It_vfs_jffs_148.cpp", + "jffs/full/It_vfs_jffs_149.cpp", + "jffs/full/It_vfs_jffs_150.cpp", + "jffs/full/It_vfs_jffs_151.cpp", + "jffs/full/It_vfs_jffs_152.cpp", + "jffs/full/It_vfs_jffs_153.cpp", + "jffs/full/It_vfs_jffs_154.cpp", + "jffs/full/It_vfs_jffs_155.cpp", + "jffs/full/It_vfs_jffs_156.cpp", + "jffs/full/It_vfs_jffs_157.cpp", + "jffs/full/It_vfs_jffs_158.cpp", + "jffs/full/It_vfs_jffs_159.cpp", + "jffs/full/It_vfs_jffs_160.cpp", + "jffs/full/It_vfs_jffs_161.cpp", + "jffs/full/It_vfs_jffs_162.cpp", + "jffs/full/It_vfs_jffs_163.cpp", + "jffs/full/It_vfs_jffs_164.cpp", + "jffs/full/It_vfs_jffs_165.cpp", + "jffs/full/It_vfs_jffs_166.cpp", + "jffs/full/It_vfs_jffs_167.cpp", + "jffs/full/It_vfs_jffs_168.cpp", + "jffs/full/It_vfs_jffs_169.cpp", + "jffs/full/It_vfs_jffs_170.cpp", + "jffs/full/It_vfs_jffs_171.cpp", + "jffs/full/It_vfs_jffs_172.cpp", + "jffs/full/It_vfs_jffs_173.cpp", + "jffs/full/It_vfs_jffs_174.cpp", + "jffs/full/It_vfs_jffs_175.cpp", + "jffs/full/It_vfs_jffs_176.cpp", + "jffs/full/It_vfs_jffs_177.cpp", + "jffs/full/It_vfs_jffs_178.cpp", + "jffs/full/It_vfs_jffs_179.cpp", + "jffs/full/It_vfs_jffs_180.cpp", + "jffs/full/It_vfs_jffs_182.cpp", + "jffs/full/It_vfs_jffs_183.cpp", + "jffs/full/It_vfs_jffs_184.cpp", + "jffs/full/It_vfs_jffs_185.cpp", + "jffs/full/It_vfs_jffs_187.cpp", + "jffs/full/It_vfs_jffs_188.cpp", + "jffs/full/It_vfs_jffs_189.cpp", + "jffs/full/It_vfs_jffs_190.cpp", + "jffs/full/It_vfs_jffs_191.cpp", + "jffs/full/It_vfs_jffs_192.cpp", + "jffs/full/It_vfs_jffs_193.cpp", + "jffs/full/It_vfs_jffs_194.cpp", + "jffs/full/It_vfs_jffs_195.cpp", + "jffs/full/It_vfs_jffs_196.cpp", + "jffs/full/It_vfs_jffs_197.cpp", + "jffs/full/It_vfs_jffs_198.cpp", + "jffs/full/It_vfs_jffs_199.cpp", + "jffs/full/It_vfs_jffs_200.cpp", + "jffs/full/It_vfs_jffs_201.cpp", + "jffs/full/It_vfs_jffs_202.cpp", + "jffs/full/It_vfs_jffs_203.cpp", + "jffs/full/It_vfs_jffs_204.cpp", + "jffs/full/It_vfs_jffs_205.cpp", + "jffs/full/It_vfs_jffs_206.cpp", + "jffs/full/It_vfs_jffs_207.cpp", + "jffs/full/It_vfs_jffs_208.cpp", + "jffs/full/It_vfs_jffs_209.cpp", + "jffs/full/It_vfs_jffs_210.cpp", + "jffs/full/It_vfs_jffs_211.cpp", + "jffs/full/It_vfs_jffs_212.cpp", + "jffs/full/It_vfs_jffs_213.cpp", + "jffs/full/It_vfs_jffs_214.cpp", + "jffs/full/It_vfs_jffs_215.cpp", + "jffs/full/It_vfs_jffs_216.cpp", + "jffs/full/It_vfs_jffs_217.cpp", + "jffs/full/It_vfs_jffs_218.cpp", + "jffs/full/It_vfs_jffs_219.cpp", + "jffs/full/It_vfs_jffs_220.cpp", + "jffs/full/It_vfs_jffs_221.cpp", + "jffs/full/It_vfs_jffs_222.cpp", + "jffs/full/It_vfs_jffs_223.cpp", + "jffs/full/It_vfs_jffs_224.cpp", + "jffs/full/It_vfs_jffs_225.cpp", + "jffs/full/It_vfs_jffs_226.cpp", + "jffs/full/It_vfs_jffs_227.cpp", + "jffs/full/It_vfs_jffs_228.cpp", + "jffs/full/It_vfs_jffs_229.cpp", + "jffs/full/It_vfs_jffs_230.cpp", + "jffs/full/It_vfs_jffs_231.cpp", + "jffs/full/It_vfs_jffs_232.cpp", + "jffs/full/It_vfs_jffs_233.cpp", + "jffs/full/It_vfs_jffs_234.cpp", + "jffs/full/It_vfs_jffs_235.cpp", + "jffs/full/It_vfs_jffs_236.cpp", + "jffs/full/It_vfs_jffs_237.cpp", + "jffs/full/It_vfs_jffs_238.cpp", + "jffs/full/It_vfs_jffs_239.cpp", + "jffs/full/It_vfs_jffs_240.cpp", + "jffs/full/It_vfs_jffs_241.cpp", + "jffs/full/It_vfs_jffs_242.cpp", + "jffs/full/It_vfs_jffs_243.cpp", + "jffs/full/It_vfs_jffs_244.cpp", + "jffs/full/It_vfs_jffs_245.cpp", + "jffs/full/It_vfs_jffs_246.cpp", + "jffs/full/It_vfs_jffs_247.cpp", + "jffs/full/It_vfs_jffs_248.cpp", + "jffs/full/It_vfs_jffs_249.cpp", + "jffs/full/It_vfs_jffs_250.cpp", + "jffs/full/It_vfs_jffs_251.cpp", + "jffs/full/It_vfs_jffs_252.cpp", + "jffs/full/It_vfs_jffs_253.cpp", + "jffs/full/It_vfs_jffs_254.cpp", + "jffs/full/It_vfs_jffs_255.cpp", + "jffs/full/It_vfs_jffs_256.cpp", + "jffs/full/It_vfs_jffs_257.cpp", + "jffs/full/It_vfs_jffs_258.cpp", + "jffs/full/It_vfs_jffs_259.cpp", + "jffs/full/It_vfs_jffs_260.cpp", + "jffs/full/It_vfs_jffs_261.cpp", + "jffs/full/It_vfs_jffs_262.cpp", + "jffs/full/It_vfs_jffs_263.cpp", + "jffs/full/It_vfs_jffs_264.cpp", + "jffs/full/It_vfs_jffs_265.cpp", + "jffs/full/It_vfs_jffs_266.cpp", + "jffs/full/It_vfs_jffs_267.cpp", + "jffs/full/It_vfs_jffs_268.cpp", + "jffs/full/It_vfs_jffs_269.cpp", + "jffs/full/It_vfs_jffs_270.cpp", + "jffs/full/It_vfs_jffs_271.cpp", + "jffs/full/It_vfs_jffs_272.cpp", + "jffs/full/It_vfs_jffs_273.cpp", + "jffs/full/It_vfs_jffs_274.cpp", + "jffs/full/It_vfs_jffs_275.cpp", + "jffs/full/It_vfs_jffs_276.cpp", + "jffs/full/It_vfs_jffs_277.cpp", + "jffs/full/It_vfs_jffs_278.cpp", + "jffs/full/It_vfs_jffs_279.cpp", + "jffs/full/It_vfs_jffs_280.cpp", + "jffs/full/It_vfs_jffs_281.cpp", + "jffs/full/It_vfs_jffs_282.cpp", + "jffs/full/It_vfs_jffs_283.cpp", + "jffs/full/It_vfs_jffs_284.cpp", + "jffs/full/It_vfs_jffs_285.cpp", + "jffs/full/It_vfs_jffs_286.cpp", + "jffs/full/It_vfs_jffs_287.cpp", + "jffs/full/It_vfs_jffs_288.cpp", + "jffs/full/It_vfs_jffs_289.cpp", + "jffs/full/It_vfs_jffs_290.cpp", + "jffs/full/It_vfs_jffs_291.cpp", + "jffs/full/It_vfs_jffs_292.cpp", + "jffs/full/It_vfs_jffs_293.cpp", + "jffs/full/It_vfs_jffs_294.cpp", + "jffs/full/It_vfs_jffs_295.cpp", + "jffs/full/It_vfs_jffs_296.cpp", + "jffs/full/It_vfs_jffs_297.cpp", + "jffs/full/It_vfs_jffs_298.cpp", + "jffs/full/It_vfs_jffs_299.cpp", + "jffs/full/It_vfs_jffs_300.cpp", + "jffs/full/It_vfs_jffs_301.cpp", + "jffs/full/It_vfs_jffs_302.cpp", + "jffs/full/It_vfs_jffs_303.cpp", + "jffs/full/It_vfs_jffs_304.cpp", + "jffs/full/It_vfs_jffs_305.cpp", + "jffs/full/It_vfs_jffs_306.cpp", + "jffs/full/It_vfs_jffs_307.cpp", + "jffs/full/It_vfs_jffs_308.cpp", + "jffs/full/It_vfs_jffs_309.cpp", + "jffs/full/It_vfs_jffs_310.cpp", + "jffs/full/It_vfs_jffs_311.cpp", + "jffs/full/It_vfs_jffs_312.cpp", + "jffs/full/It_vfs_jffs_313.cpp", + "jffs/full/It_vfs_jffs_314.cpp", + "jffs/full/It_vfs_jffs_315.cpp", + "jffs/full/It_vfs_jffs_316.cpp", + "jffs/full/It_vfs_jffs_317.cpp", + "jffs/full/It_vfs_jffs_318.cpp", + "jffs/full/It_vfs_jffs_319.cpp", + "jffs/full/It_vfs_jffs_320.cpp", + "jffs/full/It_vfs_jffs_321.cpp", + "jffs/full/It_vfs_jffs_322.cpp", + "jffs/full/It_vfs_jffs_323.cpp", + "jffs/full/It_vfs_jffs_324.cpp", + "jffs/full/It_vfs_jffs_325.cpp", + "jffs/full/It_vfs_jffs_326.cpp", + "jffs/full/It_vfs_jffs_327.cpp", + "jffs/full/It_vfs_jffs_328.cpp", + "jffs/full/It_vfs_jffs_329.cpp", + "jffs/full/It_vfs_jffs_330.cpp", + "jffs/full/It_vfs_jffs_331.cpp", + "jffs/full/It_vfs_jffs_332.cpp", + "jffs/full/It_vfs_jffs_333.cpp", + "jffs/full/It_vfs_jffs_334.cpp", + "jffs/full/It_vfs_jffs_335.cpp", + "jffs/full/It_vfs_jffs_336.cpp", + "jffs/full/It_vfs_jffs_337.cpp", + "jffs/full/It_vfs_jffs_338.cpp", + "jffs/full/It_vfs_jffs_339.cpp", + "jffs/full/It_vfs_jffs_340.cpp", + "jffs/full/It_vfs_jffs_342.cpp", + "jffs/full/It_vfs_jffs_343.cpp", + "jffs/full/It_vfs_jffs_344.cpp", + "jffs/full/It_vfs_jffs_346.cpp", + "jffs/full/It_vfs_jffs_352.cpp", + "jffs/full/It_vfs_jffs_353.cpp", + "jffs/full/It_vfs_jffs_354.cpp", + "jffs/full/It_vfs_jffs_355.cpp", + "jffs/full/It_vfs_jffs_356.cpp", + "jffs/full/It_vfs_jffs_357.cpp", + "jffs/full/It_vfs_jffs_358.cpp", + "jffs/full/It_vfs_jffs_359.cpp", + "jffs/full/It_vfs_jffs_360.cpp", + "jffs/full/It_vfs_jffs_361.cpp", + "jffs/full/It_vfs_jffs_362.cpp", + "jffs/full/It_vfs_jffs_364.cpp", + "jffs/full/It_vfs_jffs_365.cpp", + "jffs/full/It_vfs_jffs_366.cpp", + "jffs/full/It_vfs_jffs_367.cpp", + "jffs/full/It_vfs_jffs_368.cpp", + "jffs/full/It_vfs_jffs_369.cpp", + "jffs/full/It_vfs_jffs_370.cpp", + "jffs/full/It_vfs_jffs_371.cpp", + "jffs/full/It_vfs_jffs_372.cpp", + "jffs/full/It_vfs_jffs_373.cpp", + "jffs/full/It_vfs_jffs_374.cpp", + "jffs/full/It_vfs_jffs_375.cpp", + "jffs/full/It_vfs_jffs_376.cpp", + "jffs/full/It_vfs_jffs_377.cpp", + "jffs/full/It_vfs_jffs_378.cpp", + "jffs/full/It_vfs_jffs_379.cpp", + "jffs/full/It_vfs_jffs_380.cpp", + "jffs/full/It_vfs_jffs_381.cpp", + "jffs/full/It_vfs_jffs_382.cpp", + "jffs/full/It_vfs_jffs_383.cpp", + "jffs/full/It_vfs_jffs_384.cpp", + "jffs/full/It_vfs_jffs_385.cpp", + "jffs/full/It_vfs_jffs_386.cpp", + "jffs/full/It_vfs_jffs_387.cpp", + "jffs/full/It_vfs_jffs_388.cpp", + "jffs/full/It_vfs_jffs_389.cpp", + "jffs/full/It_vfs_jffs_390.cpp", + "jffs/full/It_vfs_jffs_391.cpp", + "jffs/full/It_vfs_jffs_392.cpp", + "jffs/full/It_vfs_jffs_393.cpp", + "jffs/full/It_vfs_jffs_394.cpp", + "jffs/full/It_vfs_jffs_395.cpp", + "jffs/full/It_vfs_jffs_396.cpp", + "jffs/full/It_vfs_jffs_397.cpp", + "jffs/full/It_vfs_jffs_398.cpp", + "jffs/full/It_vfs_jffs_399.cpp", + "jffs/full/It_vfs_jffs_400.cpp", + "jffs/full/It_vfs_jffs_401.cpp", + "jffs/full/It_vfs_jffs_402.cpp", + "jffs/full/It_vfs_jffs_403.cpp", + "jffs/full/It_vfs_jffs_404.cpp", + "jffs/full/It_vfs_jffs_405.cpp", + "jffs/full/It_vfs_jffs_406.cpp", + "jffs/full/It_vfs_jffs_407.cpp", + "jffs/full/It_vfs_jffs_408.cpp", + "jffs/full/It_vfs_jffs_409.cpp", + "jffs/full/It_vfs_jffs_410.cpp", + "jffs/full/It_vfs_jffs_411.cpp", + "jffs/full/It_vfs_jffs_412.cpp", + "jffs/full/It_vfs_jffs_413.cpp", + "jffs/full/It_vfs_jffs_414.cpp", + "jffs/full/It_vfs_jffs_415.cpp", + "jffs/full/It_vfs_jffs_416.cpp", + "jffs/full/It_vfs_jffs_417.cpp", + "jffs/full/It_vfs_jffs_418.cpp", + "jffs/full/It_vfs_jffs_419.cpp", + "jffs/full/It_vfs_jffs_420.cpp", + "jffs/full/It_vfs_jffs_421.cpp", + "jffs/full/It_vfs_jffs_422.cpp", + "jffs/full/It_vfs_jffs_423.cpp", + "jffs/full/It_vfs_jffs_424.cpp", + "jffs/full/It_vfs_jffs_425.cpp", + "jffs/full/It_vfs_jffs_426.cpp", + "jffs/full/It_vfs_jffs_427.cpp", + "jffs/full/It_vfs_jffs_428.cpp", + "jffs/full/It_vfs_jffs_429.cpp", + "jffs/full/It_vfs_jffs_430.cpp", + "jffs/full/It_vfs_jffs_431.cpp", + "jffs/full/It_vfs_jffs_432.cpp", + "jffs/full/It_vfs_jffs_433.cpp", + "jffs/full/It_vfs_jffs_434.cpp", + "jffs/full/It_vfs_jffs_435.cpp", + "jffs/full/It_vfs_jffs_454.cpp", + "jffs/full/It_vfs_jffs_455.cpp", + "jffs/full/It_vfs_jffs_456.cpp", + "jffs/full/It_vfs_jffs_457.cpp", + "jffs/full/It_vfs_jffs_458.cpp", + "jffs/full/It_vfs_jffs_459.cpp", + "jffs/full/It_vfs_jffs_460.cpp", + "jffs/full/It_vfs_jffs_461.cpp", + "jffs/full/It_vfs_jffs_462.cpp", + "jffs/full/It_vfs_jffs_487.cpp", + "jffs/full/It_vfs_jffs_488.cpp", + "jffs/full/It_vfs_jffs_489.cpp", + "jffs/full/It_vfs_jffs_490.cpp", + "jffs/full/It_vfs_jffs_491.cpp", + "jffs/full/It_vfs_jffs_492.cpp", + "jffs/full/It_vfs_jffs_493.cpp", + "jffs/full/It_vfs_jffs_494.cpp", + "jffs/full/It_vfs_jffs_495.cpp", + "jffs/full/It_vfs_jffs_496.cpp", + "jffs/full/It_vfs_jffs_497.cpp", + "jffs/full/It_vfs_jffs_498.cpp", + "jffs/full/It_vfs_jffs_499.cpp", + "jffs/full/It_vfs_jffs_500.cpp", + "jffs/full/It_vfs_jffs_501.cpp", + "jffs/full/It_vfs_jffs_502.cpp", + "jffs/full/It_vfs_jffs_503.cpp", + "jffs/full/It_vfs_jffs_504.cpp", + "jffs/full/It_vfs_jffs_505.cpp", + "jffs/full/It_vfs_jffs_506.cpp", + "jffs/full/It_vfs_jffs_507.cpp", + "jffs/full/It_vfs_jffs_508.cpp", + "jffs/full/It_vfs_jffs_509.cpp", + "jffs/full/It_vfs_jffs_510.cpp", + "jffs/full/It_vfs_jffs_511.cpp", + "jffs/full/It_vfs_jffs_512.cpp", + "jffs/full/It_vfs_jffs_513.cpp", + "jffs/full/It_vfs_jffs_514.cpp", + "jffs/full/It_vfs_jffs_515.cpp", + "jffs/full/It_vfs_jffs_516.cpp", + "jffs/full/It_vfs_jffs_517.cpp", + "jffs/full/It_vfs_jffs_518.cpp", + "jffs/full/It_vfs_jffs_519.cpp", + "jffs/full/It_vfs_jffs_520.cpp", + "jffs/full/It_vfs_jffs_521.cpp", + "jffs/full/It_vfs_jffs_522.cpp", + "jffs/full/It_vfs_jffs_523.cpp", + "jffs/full/It_vfs_jffs_524.cpp", + "jffs/full/It_vfs_jffs_526.cpp", + "jffs/full/It_vfs_jffs_528.cpp", + "jffs/full/It_vfs_jffs_529.cpp", + "jffs/full/It_vfs_jffs_530.cpp", + "jffs/full/It_vfs_jffs_531.cpp", + "jffs/full/It_vfs_jffs_532.cpp", + "jffs/full/It_vfs_jffs_533.cpp", + "jffs/full/It_vfs_jffs_534.cpp", + "jffs/full/It_vfs_jffs_541.cpp", + "jffs/full/It_vfs_jffs_542.cpp", + "jffs/full/It_vfs_jffs_543.cpp", + "jffs/full/It_vfs_jffs_544.cpp", + "jffs/full/It_vfs_jffs_545.cpp", + "jffs/full/It_vfs_jffs_546.cpp", + "jffs/full/It_vfs_jffs_547.cpp", + "jffs/full/It_vfs_jffs_548.cpp", + "jffs/full/It_vfs_jffs_549.cpp", + "jffs/full/It_vfs_jffs_550.cpp", + "jffs/full/It_vfs_jffs_551.cpp", + "jffs/full/It_vfs_jffs_552.cpp", + "jffs/full/It_vfs_jffs_553.cpp", + "jffs/full/It_vfs_jffs_554.cpp", + "jffs/full/It_vfs_jffs_555.cpp", + "jffs/full/It_vfs_jffs_556.cpp", + "jffs/full/It_vfs_jffs_557.cpp", + "jffs/full/It_vfs_jffs_560.cpp", + "jffs/full/It_vfs_jffs_562.cpp", + "jffs/full/It_vfs_jffs_563.cpp", + "jffs/full/It_vfs_jffs_564.cpp", + "jffs/full/It_vfs_jffs_565.cpp", + "jffs/full/It_vfs_jffs_566.cpp", + "jffs/full/It_vfs_jffs_567.cpp", + "jffs/full/It_vfs_jffs_568.cpp", + "jffs/full/It_vfs_jffs_569.cpp", + "jffs/full/It_vfs_jffs_570.cpp", + "jffs/full/It_vfs_jffs_571.cpp", + "jffs/full/It_vfs_jffs_572.cpp", + "jffs/full/It_vfs_jffs_573.cpp", + "jffs/full/It_vfs_jffs_574.cpp", + "jffs/full/It_vfs_jffs_583.cpp", + "jffs/full/It_vfs_jffs_584.cpp", + "jffs/full/It_vfs_jffs_586.cpp", + "jffs/full/It_vfs_jffs_589.cpp", + "jffs/full/It_vfs_jffs_590.cpp", + "jffs/full/It_vfs_jffs_591.cpp", + "jffs/full/It_vfs_jffs_592.cpp", + "jffs/full/It_vfs_jffs_593.cpp", + "jffs/full/It_vfs_jffs_594.cpp", + "jffs/full/It_vfs_jffs_595.cpp", + "jffs/full/It_vfs_jffs_596.cpp", + "jffs/full/It_vfs_jffs_603.cpp", + "jffs/full/It_vfs_jffs_636.cpp", + "jffs/full/It_vfs_jffs_643.cpp", + "jffs/full/It_vfs_jffs_644.cpp", + "jffs/full/It_vfs_jffs_645.cpp", + "jffs/full/It_vfs_jffs_646.cpp", + "jffs/full/It_vfs_jffs_648.cpp", + "jffs/full/It_vfs_jffs_649.cpp", + "jffs/full/It_vfs_jffs_650.cpp", + "jffs/full/It_vfs_jffs_651.cpp", + "jffs/full/It_vfs_jffs_652.cpp", + "jffs/full/It_vfs_jffs_653.cpp", + "jffs/full/It_vfs_jffs_654.cpp", + "jffs/full/It_vfs_jffs_655.cpp", + "jffs/full/It_vfs_jffs_656.cpp", + "jffs/full/It_vfs_jffs_663.cpp", + "jffs/full/It_vfs_jffs_664.cpp", + "jffs/full/It_vfs_jffs_665.cpp", + "jffs/full/It_vfs_jffs_666.cpp", + "jffs/full/It_vfs_jffs_668.cpp", + "jffs/full/It_vfs_jffs_669.cpp", + "jffs/full/It_vfs_jffs_670.cpp", + "jffs/full/It_vfs_jffs_671.cpp", + "jffs/full/It_vfs_jffs_672.cpp", + "jffs/full/It_vfs_jffs_673.cpp", + "jffs/full/It_vfs_jffs_674.cpp", + "jffs/full/It_vfs_jffs_675.cpp", + "jffs/full/It_vfs_jffs_676.cpp", + "jffs/full/It_vfs_jffs_690.cpp", + "jffs/full/It_vfs_jffs_694.cpp", + "jffs/full/It_vfs_jffs_696.cpp", + "jffs/full/It_vfs_jffs_697.cpp", + "jffs/full/It_vfs_jffs_700.cpp", + "jffs/full/It_vfs_jffs_701.cpp", + "jffs/full/It_vfs_jffs_807.cpp", + "jffs/full/It_vfs_jffs_808.cpp", + ] + sources += sources_full + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "//kernel/liteos_a/testsuites/unittest:public_config" ] } diff --git a/testsuites/unittest/fs/proc/BUILD.gn b/testsuites/unittest/fs/proc/BUILD.gn index 552c6769..af413536 100644 --- a/testsuites/unittest/fs/proc/BUILD.gn +++ b/testsuites/unittest/fs/proc/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../../config.gni") unittest("liteos_a_fs_procfs_unittest") { output_extension = "bin" @@ -39,13 +40,18 @@ unittest("liteos_a_fs_procfs_unittest") { sources = [ "//kernel/liteos_a/test/unittest/common/osTest.cpp", "It_vfs_proc.cpp", - "full/It_vfs_proc_001.cpp", - "full/It_vfs_proc_002.cpp", - "full/It_vfs_proc_003.cpp", - "full/It_vfs_proc_004.cpp", - "full/It_vfs_proc_005.cpp", - "full/It_vfs_proc_006.cpp", ] + if (LOSCFG_USER_TEST_FULL == true) { + sources_full = [ + "full/It_vfs_proc_001.cpp", + "full/It_vfs_proc_002.cpp", + "full/It_vfs_proc_003.cpp", + "full/It_vfs_proc_004.cpp", + "full/It_vfs_proc_005.cpp", + "full/It_vfs_proc_006.cpp", + ] + sources += sources_full + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "//kernel/liteos_a/test/unittest:public_config" ] deps += [ "//kernel/liteos_a:kernel" ] diff --git a/testsuites/unittest/fs/vfat2/BUILD.gn b/testsuites/unittest/fs/vfat2/BUILD.gn index 58fe8ece..88d9be21 100644 --- a/testsuites/unittest/fs/vfat2/BUILD.gn +++ b/testsuites/unittest/fs/vfat2/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../../config.gni") unittest("liteos_a_fs_vfat_unittest") { output_extension = "bin" @@ -40,141 +41,154 @@ unittest("liteos_a_fs_vfat_unittest") { sources = [ "//kernel/liteos_a/testsuites/unittest/common/osTest.cpp", "VfsFatTest.cpp", - "full/It_vfs_fat_066.cpp", - "full/It_vfs_fat_068.cpp", - "full/It_vfs_fat_072.cpp", - "full/It_vfs_fat_073.cpp", - "full/It_vfs_fat_074.cpp", - "full/It_vfs_fat_496.cpp", - "full/It_vfs_fat_497.cpp", - "full/It_vfs_fat_498.cpp", - "full/It_vfs_fat_499.cpp", - "full/It_vfs_fat_500.cpp", - "full/It_vfs_fat_501.cpp", - "full/It_vfs_fat_502.cpp", - "full/It_vfs_fat_503.cpp", - "full/It_vfs_fat_504.cpp", - "full/It_vfs_fat_506.cpp", - "full/It_vfs_fat_507.cpp", - "full/It_vfs_fat_508.cpp", - "full/It_vfs_fat_509.cpp", - "full/It_vfs_fat_510.cpp", - "full/It_vfs_fat_511.cpp", - "full/It_vfs_fat_512.cpp", - "full/It_vfs_fat_513.cpp", - "full/It_vfs_fat_514.cpp", - "full/It_vfs_fat_515.cpp", - "full/It_vfs_fat_516.cpp", - "full/It_vfs_fat_517.cpp", - "full/It_vfs_fat_518.cpp", - "full/It_vfs_fat_519.cpp", - "full/It_vfs_fat_662.cpp", - "full/It_vfs_fat_663.cpp", - "full/It_vfs_fat_664.cpp", - "full/It_vfs_fat_665.cpp", - "full/It_vfs_fat_666.cpp", - "full/It_vfs_fat_667.cpp", - "full/It_vfs_fat_668.cpp", - "full/It_vfs_fat_669.cpp", - "full/It_vfs_fat_670.cpp", - "full/It_vfs_fat_671.cpp", - "full/It_vfs_fat_672.cpp", - "full/It_vfs_fat_673.cpp", - "full/It_vfs_fat_674.cpp", - "full/It_vfs_fat_675.cpp", - "full/It_vfs_fat_676.cpp", - "full/It_vfs_fat_677.cpp", - "full/It_vfs_fat_678.cpp", - "full/It_vfs_fat_679.cpp", - "full/It_vfs_fat_680.cpp", - "full/It_vfs_fat_681.cpp", - "full/It_vfs_fat_682.cpp", - "full/It_vfs_fat_683.cpp", - "full/It_vfs_fat_684.cpp", - "full/It_vfs_fat_685.cpp", - "full/It_vfs_fat_686.cpp", - "full/It_vfs_fat_687.cpp", - "full/It_vfs_fat_692.cpp", - "full/It_vfs_fat_693.cpp", - "full/It_vfs_fat_694.cpp", - "full/It_vfs_fat_870.cpp", - "full/It_vfs_fat_872.cpp", - "full/It_vfs_fat_873.cpp", - "full/It_vfs_fat_874.cpp", - "full/It_vfs_fat_875.cpp", - "full/It_vfs_fat_902.cpp", - "full/It_vfs_fat_903.cpp", - "full/It_vfs_fat_904.cpp", - "full/It_vfs_fat_909.cpp", - - "pressure/It_fs_fat_performance_001.cpp", - "pressure/It_fs_fat_performance_002.cpp", - "pressure/It_fs_fat_performance_003.cpp", - "pressure/It_fs_fat_performance_004.cpp", - "pressure/It_fs_fat_performance_005.cpp", - "pressure/It_fs_fat_performance_006.cpp", - "pressure/It_fs_fat_performance_007.cpp", - "pressure/It_fs_fat_performance_008.cpp", - "pressure/It_fs_fat_performance_013.cpp", - "pressure/It_fs_fat_performance_014.cpp", - "pressure/It_fs_fat_performance_015.cpp", - "pressure/It_fs_fat_performance_016.cpp", - - "pressure/It_fs_fat_pressure_029.cpp", - "pressure/It_fs_fat_pressure_030.cpp", - "pressure/It_fs_fat_pressure_031.cpp", - "pressure/It_fs_fat_pressure_038.cpp", - "pressure/It_fs_fat_pressure_040.cpp", - "pressure/It_fs_fat_pressure_041.cpp", - "pressure/It_fs_fat_pressure_042.cpp", - "pressure/It_fs_fat_pressure_301.cpp", - "pressure/It_fs_fat_pressure_302.cpp", - "pressure/It_fs_fat_pressure_303.cpp", - "pressure/It_fs_fat_pressure_305.cpp", - "pressure/It_fs_fat_pressure_306.cpp", - "pressure/It_fs_fat_pressure_309.cpp", - - "pressure/It_vfs_fat_mutipthread_003.cpp", - "pressure/It_vfs_fat_mutipthread_004.cpp", - "pressure/It_vfs_fat_mutipthread_005.cpp", - "pressure/It_vfs_fat_mutipthread_006.cpp", - "pressure/It_vfs_fat_mutipthread_008.cpp", - "pressure/It_vfs_fat_mutipthread_009.cpp", - "pressure/It_vfs_fat_mutipthread_010.cpp", - "pressure/It_vfs_fat_mutipthread_012.cpp", - "pressure/It_vfs_fat_mutipthread_014.cpp", - "pressure/It_vfs_fat_mutipthread_016.cpp", - "pressure/It_vfs_fat_mutipthread_017.cpp", - "pressure/It_vfs_fat_mutipthread_018.cpp", - "pressure/It_vfs_fat_mutipthread_019.cpp", - "pressure/It_vfs_fat_mutipthread_020.cpp", - "pressure/It_vfs_fat_mutipthread_021.cpp", - "pressure/It_vfs_fat_mutipthread_022.cpp", - "pressure/It_vfs_fat_mutipthread_023.cpp", - "pressure/It_vfs_fat_mutipthread_024.cpp", - "pressure/It_vfs_fat_mutipthread_027.cpp", - "pressure/It_vfs_fat_mutipthread_029.cpp", - "pressure/It_vfs_fat_mutipthread_030.cpp", - "pressure/It_vfs_fat_mutipthread_032.cpp", - "pressure/It_vfs_fat_mutipthread_033.cpp", - "pressure/It_vfs_fat_mutipthread_035.cpp", - "pressure/It_vfs_fat_mutipthread_036.cpp", - "pressure/It_vfs_fat_mutipthread_038.cpp", - "pressure/It_vfs_fat_mutipthread_039.cpp", - "pressure/It_vfs_fat_mutipthread_040.cpp", - "pressure/It_vfs_fat_mutipthread_041.cpp", - "pressure/It_vfs_fat_mutipthread_042.cpp", - "pressure/It_vfs_fat_mutipthread_043.cpp", - "pressure/It_vfs_fat_mutipthread_044.cpp", - "pressure/It_vfs_fat_mutipthread_045.cpp", - "pressure/It_vfs_fat_mutipthread_046.cpp", - "pressure/It_vfs_fat_mutipthread_047.cpp", - "pressure/It_vfs_fat_mutipthread_048.cpp", - "pressure/It_vfs_fat_mutipthread_049.cpp", - "pressure/It_vfs_fat_mutipthread_050.cpp", - - "smoke/It_vfs_fat_026.cpp", ] + if (LOSCFG_USER_TEST_PRESSURE == true) { + sources_pressure = [ + "pressure/It_fs_fat_performance_001.cpp", + "pressure/It_fs_fat_performance_002.cpp", + "pressure/It_fs_fat_performance_003.cpp", + "pressure/It_fs_fat_performance_004.cpp", + "pressure/It_fs_fat_performance_005.cpp", + "pressure/It_fs_fat_performance_006.cpp", + "pressure/It_fs_fat_performance_007.cpp", + "pressure/It_fs_fat_performance_008.cpp", + "pressure/It_fs_fat_performance_013.cpp", + "pressure/It_fs_fat_performance_014.cpp", + "pressure/It_fs_fat_performance_015.cpp", + "pressure/It_fs_fat_performance_016.cpp", + + "pressure/It_fs_fat_pressure_029.cpp", + "pressure/It_fs_fat_pressure_030.cpp", + "pressure/It_fs_fat_pressure_031.cpp", + "pressure/It_fs_fat_pressure_038.cpp", + "pressure/It_fs_fat_pressure_040.cpp", + "pressure/It_fs_fat_pressure_041.cpp", + "pressure/It_fs_fat_pressure_042.cpp", + "pressure/It_fs_fat_pressure_301.cpp", + "pressure/It_fs_fat_pressure_302.cpp", + "pressure/It_fs_fat_pressure_303.cpp", + "pressure/It_fs_fat_pressure_305.cpp", + "pressure/It_fs_fat_pressure_306.cpp", + "pressure/It_fs_fat_pressure_309.cpp", + + "pressure/It_vfs_fat_mutipthread_003.cpp", + "pressure/It_vfs_fat_mutipthread_004.cpp", + "pressure/It_vfs_fat_mutipthread_005.cpp", + "pressure/It_vfs_fat_mutipthread_006.cpp", + "pressure/It_vfs_fat_mutipthread_008.cpp", + "pressure/It_vfs_fat_mutipthread_009.cpp", + "pressure/It_vfs_fat_mutipthread_010.cpp", + "pressure/It_vfs_fat_mutipthread_012.cpp", + "pressure/It_vfs_fat_mutipthread_014.cpp", + "pressure/It_vfs_fat_mutipthread_016.cpp", + "pressure/It_vfs_fat_mutipthread_017.cpp", + "pressure/It_vfs_fat_mutipthread_018.cpp", + "pressure/It_vfs_fat_mutipthread_019.cpp", + "pressure/It_vfs_fat_mutipthread_020.cpp", + "pressure/It_vfs_fat_mutipthread_021.cpp", + "pressure/It_vfs_fat_mutipthread_022.cpp", + "pressure/It_vfs_fat_mutipthread_023.cpp", + "pressure/It_vfs_fat_mutipthread_024.cpp", + "pressure/It_vfs_fat_mutipthread_027.cpp", + "pressure/It_vfs_fat_mutipthread_029.cpp", + "pressure/It_vfs_fat_mutipthread_030.cpp", + "pressure/It_vfs_fat_mutipthread_032.cpp", + "pressure/It_vfs_fat_mutipthread_033.cpp", + "pressure/It_vfs_fat_mutipthread_035.cpp", + "pressure/It_vfs_fat_mutipthread_036.cpp", + "pressure/It_vfs_fat_mutipthread_038.cpp", + "pressure/It_vfs_fat_mutipthread_039.cpp", + "pressure/It_vfs_fat_mutipthread_040.cpp", + "pressure/It_vfs_fat_mutipthread_041.cpp", + "pressure/It_vfs_fat_mutipthread_042.cpp", + "pressure/It_vfs_fat_mutipthread_043.cpp", + "pressure/It_vfs_fat_mutipthread_044.cpp", + "pressure/It_vfs_fat_mutipthread_045.cpp", + "pressure/It_vfs_fat_mutipthread_046.cpp", + "pressure/It_vfs_fat_mutipthread_047.cpp", + "pressure/It_vfs_fat_mutipthread_048.cpp", + "pressure/It_vfs_fat_mutipthread_049.cpp", + "pressure/It_vfs_fat_mutipthread_050.cpp", + ] + sources += sources_pressure + } + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/It_vfs_fat_026.cpp", + ] + sources += sources_smoke + } + if (LOSCFG_USER_TEST_FULL == true) { + sources_full = [ + "full/It_vfs_fat_066.cpp", + "full/It_vfs_fat_068.cpp", + "full/It_vfs_fat_072.cpp", + "full/It_vfs_fat_073.cpp", + "full/It_vfs_fat_074.cpp", + "full/It_vfs_fat_496.cpp", + "full/It_vfs_fat_497.cpp", + "full/It_vfs_fat_498.cpp", + "full/It_vfs_fat_499.cpp", + "full/It_vfs_fat_500.cpp", + "full/It_vfs_fat_501.cpp", + "full/It_vfs_fat_502.cpp", + "full/It_vfs_fat_503.cpp", + "full/It_vfs_fat_504.cpp", + "full/It_vfs_fat_506.cpp", + "full/It_vfs_fat_507.cpp", + "full/It_vfs_fat_508.cpp", + "full/It_vfs_fat_509.cpp", + "full/It_vfs_fat_510.cpp", + "full/It_vfs_fat_511.cpp", + "full/It_vfs_fat_512.cpp", + "full/It_vfs_fat_513.cpp", + "full/It_vfs_fat_514.cpp", + "full/It_vfs_fat_515.cpp", + "full/It_vfs_fat_516.cpp", + "full/It_vfs_fat_517.cpp", + "full/It_vfs_fat_518.cpp", + "full/It_vfs_fat_519.cpp", + "full/It_vfs_fat_662.cpp", + "full/It_vfs_fat_663.cpp", + "full/It_vfs_fat_664.cpp", + "full/It_vfs_fat_665.cpp", + "full/It_vfs_fat_666.cpp", + "full/It_vfs_fat_667.cpp", + "full/It_vfs_fat_668.cpp", + "full/It_vfs_fat_669.cpp", + "full/It_vfs_fat_670.cpp", + "full/It_vfs_fat_671.cpp", + "full/It_vfs_fat_672.cpp", + "full/It_vfs_fat_673.cpp", + "full/It_vfs_fat_674.cpp", + "full/It_vfs_fat_675.cpp", + "full/It_vfs_fat_676.cpp", + "full/It_vfs_fat_677.cpp", + "full/It_vfs_fat_678.cpp", + "full/It_vfs_fat_679.cpp", + "full/It_vfs_fat_680.cpp", + "full/It_vfs_fat_681.cpp", + "full/It_vfs_fat_682.cpp", + "full/It_vfs_fat_683.cpp", + "full/It_vfs_fat_684.cpp", + "full/It_vfs_fat_685.cpp", + "full/It_vfs_fat_686.cpp", + "full/It_vfs_fat_687.cpp", + "full/It_vfs_fat_692.cpp", + "full/It_vfs_fat_693.cpp", + "full/It_vfs_fat_694.cpp", + "full/It_vfs_fat_870.cpp", + "full/It_vfs_fat_872.cpp", + "full/It_vfs_fat_873.cpp", + "full/It_vfs_fat_874.cpp", + "full/It_vfs_fat_875.cpp", + "full/It_vfs_fat_902.cpp", + "full/It_vfs_fat_903.cpp", + "full/It_vfs_fat_904.cpp", + "full/It_vfs_fat_909.cpp", + ] + sources += sources_full + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "//kernel/liteos_a/testsuites/unittest:public_config" ] } diff --git a/testsuites/unittest/liteipc/BUILD.gn b/testsuites/unittest/liteipc/BUILD.gn index 5819f665..84c5b39b 100644 --- a/testsuites/unittest/liteipc/BUILD.gn +++ b/testsuites/unittest/liteipc/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../config.gni") unittest("liteos_a_liteipc_unittest") { output_extension = "bin" @@ -38,11 +39,16 @@ unittest("liteos_a_liteipc_unittest") { ] sources = [ "../common/osTest.cpp", - "smoke/liteipc_test_001.cpp", - "smoke/liteipc_test_002.cpp", "smgr_demo.cpp", "it_test_liteipc.cpp", ] + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/liteipc_test_001.cpp", + "smoke/liteipc_test_002.cpp", + ] + sources += sources_smoke + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "..:public_config" ] } diff --git a/testsuites/unittest/mem/shm/BUILD.gn b/testsuites/unittest/mem/shm/BUILD.gn index 7919cfbf..d5534ee3 100644 --- a/testsuites/unittest/mem/shm/BUILD.gn +++ b/testsuites/unittest/mem/shm/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../../config.gni") unittest("liteos_a_mem_shm_unittest") { output_extension = "bin" @@ -39,22 +40,26 @@ unittest("liteos_a_mem_shm_unittest") { sources = [ "../../common/osTest.cpp", "mem_shm_test.cpp", - "smoke/shm_test_001.cpp", - "smoke/shm_test_002.cpp", - "smoke/shm_test_003.cpp", - "smoke/shm_test_004.cpp", - "smoke/shm_test_005.cpp", - "smoke/shm_test_006.cpp", - "smoke/shm_test_007.cpp", - "smoke/shm_test_008.cpp", - "smoke/shm_test_009.cpp", - "smoke/shm_test_010.cpp", - "smoke/shm_test_011.cpp", - "smoke/shm_test_012.cpp", - "smoke/shm_test_013.cpp", - "smoke/shm_test_014.cpp", - # "smoke/it_test_mem_100.cpp", ] + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/shm_test_001.cpp", + "smoke/shm_test_002.cpp", + "smoke/shm_test_003.cpp", + "smoke/shm_test_004.cpp", + "smoke/shm_test_005.cpp", + "smoke/shm_test_006.cpp", + "smoke/shm_test_007.cpp", + "smoke/shm_test_008.cpp", + "smoke/shm_test_009.cpp", + "smoke/shm_test_010.cpp", + "smoke/shm_test_011.cpp", + "smoke/shm_test_012.cpp", + "smoke/shm_test_013.cpp", + "smoke/shm_test_014.cpp", + ] + sources += sources_smoke + } configs = [ "../..:public_config" ] deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/mem/shm/mem_shm_test.cpp b/testsuites/unittest/mem/shm/mem_shm_test.cpp index 9c56e716..17d91275 100644 --- a/testsuites/unittest/mem/shm/mem_shm_test.cpp +++ b/testsuites/unittest/mem/shm/mem_shm_test.cpp @@ -41,6 +41,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_SMOKE) /* * * @tc.name: it_test_shm_001 * @tc.desc: function for MemShmTest @@ -91,10 +92,10 @@ HWTEST_F(MemShmTest, ItTestShm004, TestSize.Level0) * @tc.type: FUNC * @tc.require: AR000EEMQ9 */ -/*HWTEST_F(MemShmTest, ItTestShm005, TestSize.Level0) +HWTEST_F(MemShmTest, ItTestShm005, TestSize.Level0) { - ItTestShm005(); // bug, errno -} */ + ItTestShm005(); +} /* * * @tc.name: it_test_shm_006 @@ -161,6 +162,6 @@ HWTEST_F(MemShmTest, ItTestShm011, TestSize.Level0) { ItTestShm011(); } - +#endif } // namespace OHOS diff --git a/testsuites/unittest/mem/shm/smoke/shm_test_001.cpp b/testsuites/unittest/mem/shm/smoke/shm_test_001.cpp index 0c8c18b6..eb085b8b 100644 --- a/testsuites/unittest/mem/shm/smoke/shm_test_001.cpp +++ b/testsuites/unittest/mem/shm/smoke/shm_test_001.cpp @@ -159,6 +159,7 @@ static int Testcase(VOID) ICUNIT_ASSERT_EQUAL(ret, 0, ret); ICUNIT_ASSERT_EQUAL(g_threadCount, 2, g_threadCount); + return 0; } diff --git a/testsuites/unittest/mem/vm/BUILD.gn b/testsuites/unittest/mem/vm/BUILD.gn index 56231169..8957523d 100644 --- a/testsuites/unittest/mem/vm/BUILD.gn +++ b/testsuites/unittest/mem/vm/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../../config.gni") unittest("liteos_a_mem_vm_unittest") { output_extension = "bin" @@ -39,22 +40,27 @@ unittest("liteos_a_mem_vm_unittest") { sources = [ "../../common/osTest.cpp", "mem_vm_test.cpp", - "smoke/mmap_test_001.cpp", - "smoke/mmap_test_002.cpp", - "smoke/mmap_test_003.cpp", - "smoke/mmap_test_004.cpp", - "smoke/mmap_test_005.cpp", - "smoke/mmap_test_006.cpp", - "smoke/mmap_test_007.cpp", - "smoke/mmap_test_008.cpp", - "smoke/mmap_test_009.cpp", - "smoke/mmap_test_010.cpp", - "smoke/mprotect_test_001.cpp", - "smoke/mremap_test_001.cpp", - "smoke/oom_test_001.cpp", - "smoke/open_wmemstream_test_001.cpp", - "smoke/user_copy_test_001.cpp", ] + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/mmap_test_001.cpp", + "smoke/mmap_test_002.cpp", + "smoke/mmap_test_003.cpp", + "smoke/mmap_test_004.cpp", + "smoke/mmap_test_005.cpp", + "smoke/mmap_test_006.cpp", + "smoke/mmap_test_007.cpp", + "smoke/mmap_test_008.cpp", + "smoke/mmap_test_009.cpp", + "smoke/mmap_test_010.cpp", + "smoke/mprotect_test_001.cpp", + "smoke/mremap_test_001.cpp", + "smoke/oom_test_001.cpp", + "smoke/open_wmemstream_test_001.cpp", + "smoke/user_copy_test_001.cpp", + ] + sources += sources_smoke + } configs = [ "../..:public_config" ] deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/mem/vm/mem_vm_test.cpp b/testsuites/unittest/mem/vm/mem_vm_test.cpp index c0b5fdde..1f23739d 100644 --- a/testsuites/unittest/mem/vm/mem_vm_test.cpp +++ b/testsuites/unittest/mem/vm/mem_vm_test.cpp @@ -41,6 +41,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_SMOKE) /* * * @tc.name: it_test_mmap_001 * @tc.desc: function for MemVmTest @@ -208,4 +209,5 @@ HWTEST_F(MemVmTest, open_wmemstream_test_001, TestSize.Level0) { open_wmemstream_test_001(); } +#endif } // namespace OHOS diff --git a/testsuites/unittest/misc/BUILD.gn b/testsuites/unittest/misc/BUILD.gn index 3c7e27ab..63781029 100644 --- a/testsuites/unittest/misc/BUILD.gn +++ b/testsuites/unittest/misc/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../config.gni") unittest("liteos_a_misc_unittest") { output_extension = "bin" @@ -36,24 +37,37 @@ unittest("liteos_a_misc_unittest") { "../common/include", "../misc", ] + sources = [ "../common/osTest.cpp", - "full/misc_test_001.cpp", - "full/misc_test_002.cpp", - "full/misc_test_003.cpp", - "full/misc_test_004.cpp", - "full/misc_test_005.cpp", - "full/misc_test_006.cpp", - "full/misc_test_007.cpp", - "full/misc_test_008.cpp", - "full/misc_test_009.cpp", - "full/misc_test_010.cpp", - "full/misc_test_011.cpp", - "full/misc_test_012.cpp", - "full/misc_test_013.cpp", - "full/misc_test_014.cpp", "misc_test.cpp", ] + + if (LOSCFG_USER_TEST_FULL == true) { + sources_full = [ + "full/misc_test_006.cpp", + "full/misc_test_007.cpp", + "full/misc_test_010.cpp", + "full/misc_test_011.cpp", + "full/misc_test_012.cpp", + "full/misc_test_013.cpp", + ] + sources += sources_full + } + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/misc_test_001.cpp", + "smoke/misc_test_002.cpp", + "smoke/misc_test_003.cpp", + "smoke/misc_test_004.cpp", + "smoke/misc_test_005.cpp", + "smoke/misc_test_008.cpp", + "smoke/misc_test_009.cpp", + "smoke/misc_test_014.cpp", + ] + sources += sources_smoke + } + configs = [ "..:public_config" ] deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/misc/misc_test.cpp b/testsuites/unittest/misc/misc_test.cpp index 42d2ae8e..2bcc66e1 100644 --- a/testsuites/unittest/misc/misc_test.cpp +++ b/testsuites/unittest/misc/misc_test.cpp @@ -42,6 +42,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_SMOKE) /* * * @tc.name: IT_TEST_MISC_001 * @tc.desc: function for MiscTest @@ -97,6 +98,19 @@ HWTEST_F(MiscTest, ItTestMisc005, TestSize.Level0) ItTestMisc005(); } +/* * + * @tc.name: IT_TEST_MISC_014 + * @tc.desc: function for tmpnam test + * @tc.type: FUNC + * @tc.require: AR000EEMQ9 + */ +HWTEST_F(MiscTest, IT_TEST_MISC_014, TestSize.Level0) +{ + IT_TEST_MISC_014(); +} +#endif + +#if defined(LOSCFG_USER_TEST_FULL) /* * * @tc.name: IT_TEST_MISC_006 * @tc.desc: function for MiscTest @@ -151,16 +165,6 @@ HWTEST_F(MiscTest, ItTestMisc006, TestSize.Level0) { ItTestMisc013(); }*/ - -/* * - * @tc.name: IT_TEST_MISC_014 - * @tc.desc: function for tmpnam test - * @tc.type: FUNC - * @tc.require: AR000EEMQ9 - */ -HWTEST_F(MiscTest, IT_TEST_MISC_014, TestSize.Level0) -{ - IT_TEST_MISC_014(); -} +#endif } // namespace OHOS diff --git a/testsuites/unittest/misc/full/misc_test_001.cpp b/testsuites/unittest/misc/smoke/misc_test_001.cpp similarity index 100% rename from testsuites/unittest/misc/full/misc_test_001.cpp rename to testsuites/unittest/misc/smoke/misc_test_001.cpp diff --git a/testsuites/unittest/misc/full/misc_test_002.cpp b/testsuites/unittest/misc/smoke/misc_test_002.cpp similarity index 100% rename from testsuites/unittest/misc/full/misc_test_002.cpp rename to testsuites/unittest/misc/smoke/misc_test_002.cpp diff --git a/testsuites/unittest/misc/full/misc_test_003.cpp b/testsuites/unittest/misc/smoke/misc_test_003.cpp similarity index 100% rename from testsuites/unittest/misc/full/misc_test_003.cpp rename to testsuites/unittest/misc/smoke/misc_test_003.cpp diff --git a/testsuites/unittest/misc/full/misc_test_004.cpp b/testsuites/unittest/misc/smoke/misc_test_004.cpp similarity index 100% rename from testsuites/unittest/misc/full/misc_test_004.cpp rename to testsuites/unittest/misc/smoke/misc_test_004.cpp diff --git a/testsuites/unittest/misc/full/misc_test_005.cpp b/testsuites/unittest/misc/smoke/misc_test_005.cpp similarity index 100% rename from testsuites/unittest/misc/full/misc_test_005.cpp rename to testsuites/unittest/misc/smoke/misc_test_005.cpp diff --git a/testsuites/unittest/misc/full/misc_test_008.cpp b/testsuites/unittest/misc/smoke/misc_test_008.cpp similarity index 100% rename from testsuites/unittest/misc/full/misc_test_008.cpp rename to testsuites/unittest/misc/smoke/misc_test_008.cpp diff --git a/testsuites/unittest/misc/full/misc_test_009.cpp b/testsuites/unittest/misc/smoke/misc_test_009.cpp similarity index 100% rename from testsuites/unittest/misc/full/misc_test_009.cpp rename to testsuites/unittest/misc/smoke/misc_test_009.cpp diff --git a/testsuites/unittest/misc/full/misc_test_014.cpp b/testsuites/unittest/misc/smoke/misc_test_014.cpp similarity index 100% rename from testsuites/unittest/misc/full/misc_test_014.cpp rename to testsuites/unittest/misc/smoke/misc_test_014.cpp diff --git a/testsuites/unittest/net/netdb/BUILD.gn b/testsuites/unittest/net/netdb/BUILD.gn index 1c49d6df..7f34d79b 100644 --- a/testsuites/unittest/net/netdb/BUILD.gn +++ b/testsuites/unittest/net/netdb/BUILD.gn @@ -46,30 +46,35 @@ unittest("liteos_a_net_netdb_unittest") { ] sources = [ "../../common/osTest.cpp", - "full/net_netdb_test_001.cpp", - "full/net_netdb_test_002.cpp", - "full/net_netdb_test_003.cpp", - "full/net_netdb_test_004.cpp", - "full/net_netdb_test_005.cpp", - "full/net_netdb_test_006.cpp", - "full/net_netdb_test_007.cpp", - "full/net_netdb_test_008.cpp", - "full/net_netdb_test_009.cpp", - "full/net_netdb_test_010.cpp", - "full/net_netdb_test_011.cpp", - "full/net_netdb_test_012.cpp", - "full/net_netdb_test_013.cpp", - "full/net_netdb_test_014.cpp", - "full/net_netdb_test_015.cpp", - "full/net_netdb_test_016.cpp", - "full/net_netdb_test_017.cpp", - "full/net_netdb_test_018.cpp", - "full/net_netdb_test_019.cpp", - "full/net_netdb_test_020.cpp", - "full/net_netdb_test_021.cpp", - "full/net_netdb_test_022.cpp", "net_netdb_test.cpp", ] + if (LOSCFG_USER_TEST_FULL == true) { + sources_full = [ + "full/net_netdb_test_001.cpp", + "full/net_netdb_test_002.cpp", + "full/net_netdb_test_003.cpp", + "full/net_netdb_test_004.cpp", + "full/net_netdb_test_005.cpp", + "full/net_netdb_test_006.cpp", + "full/net_netdb_test_007.cpp", + "full/net_netdb_test_008.cpp", + "full/net_netdb_test_009.cpp", + "full/net_netdb_test_010.cpp", + "full/net_netdb_test_011.cpp", + "full/net_netdb_test_012.cpp", + "full/net_netdb_test_013.cpp", + "full/net_netdb_test_014.cpp", + "full/net_netdb_test_015.cpp", + "full/net_netdb_test_016.cpp", + "full/net_netdb_test_017.cpp", + "full/net_netdb_test_018.cpp", + "full/net_netdb_test_019.cpp", + "full/net_netdb_test_020.cpp", + "full/net_netdb_test_021.cpp", + "full/net_netdb_test_022.cpp", + ] + sources += sources_full + } configs = [ "../..:public_config", ":net_local_config", diff --git a/testsuites/unittest/net/resolv/BUILD.gn b/testsuites/unittest/net/resolv/BUILD.gn index 9f63b64c..c621e0b9 100644 --- a/testsuites/unittest/net/resolv/BUILD.gn +++ b/testsuites/unittest/net/resolv/BUILD.gn @@ -46,16 +46,21 @@ unittest("liteos_a_net_resolv_unittest") { ] sources = [ "../../common/osTest.cpp", - "full/net_resolv_test_001.cpp", - "full/net_resolv_test_002.cpp", - "full/net_resolv_test_003.cpp", - "full/net_resolv_test_004.cpp", - "full/net_resolv_test_005.cpp", - "full/net_resolv_test_006.cpp", - "full/net_resolv_test_007.cpp", - "full/net_resolv_test_008.cpp", "net_resolv_test.cpp", ] + if (LOSCFG_USER_TEST_FULL == true) { + sources_full = [ + "full/net_resolv_test_001.cpp", + "full/net_resolv_test_002.cpp", + "full/net_resolv_test_003.cpp", + "full/net_resolv_test_004.cpp", + "full/net_resolv_test_005.cpp", + "full/net_resolv_test_006.cpp", + "full/net_resolv_test_007.cpp", + "full/net_resolv_test_008.cpp", + ] + sources += sources_full + } configs = [ "../..:public_config", ":net_local_config", diff --git a/testsuites/unittest/net/socket/BUILD.gn b/testsuites/unittest/net/socket/BUILD.gn index d32b5e2c..37e18c9b 100644 --- a/testsuites/unittest/net/socket/BUILD.gn +++ b/testsuites/unittest/net/socket/BUILD.gn @@ -47,20 +47,25 @@ unittest("liteos_a_net_socket_unittest") { sources = [ "../../common/osTest.cpp", "net_socket_test.cpp", - "smoke/net_socket_test_001.cpp", - "smoke/net_socket_test_002.cpp", - "smoke/net_socket_test_003.cpp", - "smoke/net_socket_test_004.cpp", - "smoke/net_socket_test_005.cpp", - "smoke/net_socket_test_006.cpp", - "smoke/net_socket_test_007.cpp", - "smoke/net_socket_test_008.cpp", - "smoke/net_socket_test_009.cpp", - "smoke/net_socket_test_010.cpp", - "smoke/net_socket_test_011.cpp", - "smoke/net_socket_test_012.cpp", - "smoke/net_socket_test_013.cpp", ] + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/net_socket_test_001.cpp", + "smoke/net_socket_test_002.cpp", + "smoke/net_socket_test_003.cpp", + "smoke/net_socket_test_004.cpp", + "smoke/net_socket_test_005.cpp", + "smoke/net_socket_test_006.cpp", + "smoke/net_socket_test_007.cpp", + "smoke/net_socket_test_008.cpp", + "smoke/net_socket_test_009.cpp", + "smoke/net_socket_test_010.cpp", + "smoke/net_socket_test_011.cpp", + "smoke/net_socket_test_012.cpp", + "smoke/net_socket_test_013.cpp", + ] + sources += sources_smoke + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "../../:public_config", diff --git a/testsuites/unittest/net/socket/smoke/net_socket_test_008.cpp b/testsuites/unittest/net/socket/smoke/net_socket_test_008.cpp index 64069d34..dd76e80b 100644 --- a/testsuites/unittest/net/socket/smoke/net_socket_test_008.cpp +++ b/testsuites/unittest/net/socket/smoke/net_socket_test_008.cpp @@ -38,7 +38,7 @@ #define SERVER_PORT 6666 #define INVALID_SOCKET -1 -#define CLIENT_NUM 50 +#define CLIENT_NUM 25 #define BACKLOG CLIENT_NUM static int gFds[FD_SETSIZE]; diff --git a/testsuites/unittest/net/socket/smoke/net_socket_test_009.cpp b/testsuites/unittest/net/socket/smoke/net_socket_test_009.cpp index 080bb217..f864727e 100644 --- a/testsuites/unittest/net/socket/smoke/net_socket_test_009.cpp +++ b/testsuites/unittest/net/socket/smoke/net_socket_test_009.cpp @@ -38,7 +38,7 @@ #define SERVER_PORT 8888 #define INVALID_SOCKET -1 -#define CLIENT_NUM 50 +#define CLIENT_NUM 25 #define BACKLOG CLIENT_NUM static int gFds[FD_SETSIZE]; diff --git a/testsuites/unittest/net/socket/smoke/net_socket_test_011.cpp b/testsuites/unittest/net/socket/smoke/net_socket_test_011.cpp index 5d1ef166..e71a30c7 100644 --- a/testsuites/unittest/net/socket/smoke/net_socket_test_011.cpp +++ b/testsuites/unittest/net/socket/smoke/net_socket_test_011.cpp @@ -38,7 +38,7 @@ #define SERVER_PORT 7777 #define INVALID_SOCKET -1 -#define CLIENT_NUM 50 +#define CLIENT_NUM 25 static int gFds[FD_SETSIZE]; static int gBye; @@ -97,7 +97,7 @@ static int CloseAllFd(void) static int HandleRecv(int fd) { - char buf[256]; + char buf[128]; int ret = recv(fd, buf, sizeof(buf)-1, 0); if (ret < 0) { LogPrintln("[%d]Error: %s", fd, strerror(errno)); @@ -151,11 +151,11 @@ static void *ClientsThread(void *param) LogPrintln("[%d]<%d>connected to udp://%s:%d successful", fd, thrNo, inet_ntoa(sa.sin_addr), SERVER_PORT); const char *msg[] = { - "hello, ", "ohos, ", + "hello, ", "my name is net_socket_test_011, ", "see u next time, ", - "Bye!" + "Bye!", }; for (int i = 0; i < sizeof(msg) / sizeof(msg[0]); ++i) { @@ -172,15 +172,20 @@ static void *ClientsThread(void *param) static int StartClients(pthread_t *cli, int cliNum) { int ret; - pthread_attr_t attr; + pthread_attr_t attr = {0}; + struct sched_param param = { 0 }; + int policy; + ret = pthread_getschedparam(pthread_self(), &policy, ¶m); + ICUNIT_ASSERT_EQUAL(ret, 0, -ret); for (int i = 0; i < cliNum; ++i) { ret = pthread_attr_init(&attr); - ICUNIT_ASSERT_EQUAL(ret, 0, ret); + param.sched_priority = param.sched_priority + 1; + pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); + pthread_attr_setschedparam(&attr, ¶m); ret = pthread_create(&cli[i], &attr, ClientsThread, (void *)(intptr_t)i); ICUNIT_ASSERT_EQUAL(ret, 0, ret); - ret = pthread_attr_destroy(&attr); ICUNIT_ASSERT_EQUAL(ret, 0, ret); } diff --git a/testsuites/unittest/posix/mem/BUILD.gn b/testsuites/unittest/posix/mem/BUILD.gn index ef4eca42..ed4be413 100644 --- a/testsuites/unittest/posix/mem/BUILD.gn +++ b/testsuites/unittest/posix/mem/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../../config.gni") unittest("liteos_a_posix_mem_unittest") { output_extension = "bin" @@ -39,9 +40,16 @@ unittest("liteos_a_posix_mem_unittest") { sources = [ "../../common/osTest.cpp", "posix_mem_test.cpp", - "smoke/It_posix_mem_001.cpp", - "smoke/It_posix_mem_003.cpp", ] + + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/It_posix_mem_001.cpp", + "smoke/It_posix_mem_003.cpp", + ] + sources += sources_smoke + } + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "../..:public_config" ] } diff --git a/testsuites/unittest/posix/mqueue/BUILD.gn b/testsuites/unittest/posix/mqueue/BUILD.gn index 405c74a7..d840f775 100644 --- a/testsuites/unittest/posix/mqueue/BUILD.gn +++ b/testsuites/unittest/posix/mqueue/BUILD.gn @@ -42,208 +42,172 @@ unittest("liteos_a_posix_mqueue_unittest") { "../../common/include", "../../posix/mqueue", ] - sourcesllt = [] - - if (LOSCFG_USER_TEST_LLT == true) { - sourcesllt += [ - "llt/It_posix_queue_006.cpp", - "llt/It_posix_queue_009.cpp", - "llt/It_posix_queue_022.cpp", - "llt/It_posix_queue_023.cpp", - "llt/It_posix_queue_024.cpp", - "llt/It_posix_queue_029.cpp", - "llt/It_posix_queue_034.cpp", - "llt/It_posix_queue_035.cpp", - "llt/It_posix_queue_037.cpp", - "llt/It_posix_queue_039.cpp", - "llt/It_posix_queue_045.cpp", - "llt/It_posix_queue_051.cpp", - "llt/It_posix_queue_059.cpp", - "llt/It_posix_queue_068.cpp", - "llt/It_posix_queue_092.cpp", - "llt/It_posix_queue_099.cpp", - "llt/It_posix_queue_105.cpp", - "llt/It_posix_queue_107.cpp", - "llt/It_posix_queue_131.cpp", - "llt/It_posix_queue_132.cpp", - "llt/It_posix_queue_135.cpp", - "llt/It_posix_queue_137.cpp", - "llt/It_posix_queue_138.cpp", - "llt/It_posix_queue_139.cpp", - "llt/It_posix_queue_140.cpp", - "llt/It_posix_queue_141.cpp", - "llt/It_posix_queue_142.cpp", - "llt/It_posix_queue_158.cpp", - "llt/LLT_posix_queue_001.cpp", - "llt/LLT_posix_queue_002.cpp", - "llt/LLT_posix_queue_003.cpp", - "llt/LLT_posix_queue_004.cpp", - "llt/LLT_posix_queue_005.cpp", - "llt/LLT_posix_queue_006.cpp", - "llt/LLT_posix_queue_007.cpp", - "llt/LLT_posix_queue_008.cpp", - "llt/LLT_posix_queue_009.cpp", - "llt/LLT_posix_queue_010.cpp", - "llt/LLT_posix_queue_011.cpp", - "llt/LLT_posix_queue_012.cpp", - "llt/LLT_posix_queue_013.cpp", - ] - } sources = [ "../../common/osTest.cpp", - "full/It_posix_queue_002.cpp", - "full/It_posix_queue_005.cpp", - "full/It_posix_queue_008.cpp", - "full/It_posix_queue_011.cpp", - "full/It_posix_queue_013.cpp", - "full/It_posix_queue_014.cpp", - "full/It_posix_queue_015.cpp", - "full/It_posix_queue_016.cpp", - "full/It_posix_queue_018.cpp", - "full/It_posix_queue_019.cpp", - "full/It_posix_queue_020.cpp", - "full/It_posix_queue_021.cpp", - "full/It_posix_queue_025.cpp", - "full/It_posix_queue_026.cpp", - "full/It_posix_queue_027.cpp", - "full/It_posix_queue_030.cpp", - "full/It_posix_queue_031.cpp", - "full/It_posix_queue_032.cpp", - "full/It_posix_queue_033.cpp", - "full/It_posix_queue_036.cpp", - "full/It_posix_queue_038.cpp", - "full/It_posix_queue_040.cpp", - "full/It_posix_queue_041.cpp", - "full/It_posix_queue_042.cpp", - "full/It_posix_queue_043.cpp", - "full/It_posix_queue_044.cpp", - "full/It_posix_queue_046.cpp", - "full/It_posix_queue_047.cpp", - "full/It_posix_queue_048.cpp", - "full/It_posix_queue_049.cpp", - "full/It_posix_queue_050.cpp", - "full/It_posix_queue_052.cpp", - "full/It_posix_queue_053.cpp", - "full/It_posix_queue_054.cpp", - "full/It_posix_queue_055.cpp", - "full/It_posix_queue_056.cpp", - "full/It_posix_queue_057.cpp", - "full/It_posix_queue_058.cpp", - "full/It_posix_queue_060.cpp", - "full/It_posix_queue_061.cpp", - "full/It_posix_queue_063.cpp", - "full/It_posix_queue_064.cpp", - "full/It_posix_queue_065.cpp", - "full/It_posix_queue_066.cpp", - "full/It_posix_queue_067.cpp", - "full/It_posix_queue_069.cpp", - "full/It_posix_queue_070.cpp", - "full/It_posix_queue_071.cpp", - "full/It_posix_queue_072.cpp", - "full/It_posix_queue_073.cpp", - "full/It_posix_queue_074.cpp", - "full/It_posix_queue_075.cpp", - "full/It_posix_queue_076.cpp", - "full/It_posix_queue_077.cpp", - "full/It_posix_queue_078.cpp", - "full/It_posix_queue_079.cpp", - "full/It_posix_queue_080.cpp", - "full/It_posix_queue_081.cpp", - "full/It_posix_queue_082.cpp", - "full/It_posix_queue_083.cpp", - "full/It_posix_queue_084.cpp", - "full/It_posix_queue_085.cpp", - "full/It_posix_queue_086.cpp", - "full/It_posix_queue_087.cpp", - "full/It_posix_queue_088.cpp", - "full/It_posix_queue_089.cpp", - "full/It_posix_queue_090.cpp", - "full/It_posix_queue_091.cpp", - "full/It_posix_queue_093.cpp", - "full/It_posix_queue_094.cpp", - "full/It_posix_queue_095.cpp", - "full/It_posix_queue_096.cpp", - "full/It_posix_queue_097.cpp", - "full/It_posix_queue_098.cpp", - "full/It_posix_queue_100.cpp", - "full/It_posix_queue_101.cpp", - "full/It_posix_queue_102.cpp", - "full/It_posix_queue_103.cpp", - "full/It_posix_queue_104.cpp", - "full/It_posix_queue_106.cpp", - "full/It_posix_queue_108.cpp", - "full/It_posix_queue_109.cpp", - "full/It_posix_queue_110.cpp", - "full/It_posix_queue_111.cpp", - "full/It_posix_queue_112.cpp", - "full/It_posix_queue_113.cpp", - "full/It_posix_queue_114.cpp", - "full/It_posix_queue_115.cpp", - "full/It_posix_queue_116.cpp", - "full/It_posix_queue_117.cpp", - "full/It_posix_queue_118.cpp", - "full/It_posix_queue_119.cpp", - "full/It_posix_queue_120.cpp", - "full/It_posix_queue_121.cpp", - "full/It_posix_queue_122.cpp", - "full/It_posix_queue_123.cpp", - "full/It_posix_queue_124.cpp", - "full/It_posix_queue_125.cpp", - "full/It_posix_queue_126.cpp", - "full/It_posix_queue_127.cpp", - "full/It_posix_queue_128.cpp", - "full/It_posix_queue_129.cpp", - "full/It_posix_queue_130.cpp", - "full/It_posix_queue_133.cpp", - "full/It_posix_queue_134.cpp", - "full/It_posix_queue_136.cpp", - "full/It_posix_queue_143.cpp", - "full/It_posix_queue_144.cpp", - "full/It_posix_queue_145.cpp", - "full/It_posix_queue_146.cpp", - "full/It_posix_queue_147.cpp", - "full/It_posix_queue_148.cpp", - "full/It_posix_queue_149.cpp", - "full/It_posix_queue_150.cpp", - "full/It_posix_queue_151.cpp", - "full/It_posix_queue_152.cpp", - "full/It_posix_queue_153.cpp", - "full/It_posix_queue_154.cpp", - "full/It_posix_queue_155.cpp", - "full/It_posix_queue_156.cpp", - "full/It_posix_queue_157.cpp", - "full/It_posix_queue_159.cpp", - "full/It_posix_queue_160.cpp", - "full/It_posix_queue_161.cpp", - "full/It_posix_queue_162.cpp", - "full/It_posix_queue_163.cpp", - "full/It_posix_queue_164.cpp", - "full/It_posix_queue_165.cpp", - "full/It_posix_queue_166.cpp", - "full/It_posix_queue_168.cpp", - "full/It_posix_queue_169.cpp", - "full/It_posix_queue_173.cpp", - "full/It_posix_queue_175.cpp", - "full/It_posix_queue_176.cpp", - "full/It_posix_queue_177.cpp", - "full/It_posix_queue_187.cpp", - "full/It_posix_queue_200.cpp", - "full/It_posix_queue_201.cpp", - "full/It_posix_queue_202.cpp", - "full/It_posix_queue_203.cpp", - "full/It_posix_queue_204.cpp", "posix_mqueue_test.cpp", - "smoke/It_posix_queue_001.cpp", - "smoke/It_posix_queue_003.cpp", - "smoke/It_posix_queue_028.cpp", - "smoke/It_posix_queue_062.cpp", - "smoke/It_posix_queue_205.cpp", - "smoke/It_posix_queue_206.cpp", - "smoke/It_posix_queue_207.cpp", - "smoke/It_posix_queue_208.cpp", - "smoke/It_posix_queue_209.cpp", ] - sources += sourcesllt + + if (LOSCFG_USER_TEST_FULL == true) { + sources_full = [ + "full/It_posix_queue_002.cpp", + "full/It_posix_queue_005.cpp", + "full/It_posix_queue_008.cpp", + "full/It_posix_queue_011.cpp", + "full/It_posix_queue_013.cpp", + "full/It_posix_queue_014.cpp", + "full/It_posix_queue_015.cpp", + "full/It_posix_queue_016.cpp", + "full/It_posix_queue_018.cpp", + "full/It_posix_queue_019.cpp", + "full/It_posix_queue_020.cpp", + "full/It_posix_queue_021.cpp", + "full/It_posix_queue_025.cpp", + "full/It_posix_queue_026.cpp", + "full/It_posix_queue_027.cpp", + "full/It_posix_queue_030.cpp", + "full/It_posix_queue_031.cpp", + "full/It_posix_queue_032.cpp", + "full/It_posix_queue_033.cpp", + "full/It_posix_queue_036.cpp", + "full/It_posix_queue_038.cpp", + "full/It_posix_queue_040.cpp", + "full/It_posix_queue_041.cpp", + "full/It_posix_queue_042.cpp", + "full/It_posix_queue_043.cpp", + "full/It_posix_queue_044.cpp", + "full/It_posix_queue_046.cpp", + "full/It_posix_queue_047.cpp", + "full/It_posix_queue_048.cpp", + "full/It_posix_queue_049.cpp", + "full/It_posix_queue_050.cpp", + "full/It_posix_queue_052.cpp", + "full/It_posix_queue_054.cpp", + "full/It_posix_queue_055.cpp", + "full/It_posix_queue_056.cpp", + "full/It_posix_queue_057.cpp", + "full/It_posix_queue_058.cpp", + "full/It_posix_queue_060.cpp", + "full/It_posix_queue_061.cpp", + "full/It_posix_queue_063.cpp", + "full/It_posix_queue_064.cpp", + "full/It_posix_queue_065.cpp", + "full/It_posix_queue_066.cpp", + "full/It_posix_queue_067.cpp", + "full/It_posix_queue_069.cpp", + "full/It_posix_queue_070.cpp", + "full/It_posix_queue_071.cpp", + "full/It_posix_queue_072.cpp", + "full/It_posix_queue_073.cpp", + "full/It_posix_queue_074.cpp", + "full/It_posix_queue_075.cpp", + "full/It_posix_queue_076.cpp", + "full/It_posix_queue_077.cpp", + "full/It_posix_queue_078.cpp", + "full/It_posix_queue_079.cpp", + "full/It_posix_queue_080.cpp", + "full/It_posix_queue_081.cpp", + "full/It_posix_queue_082.cpp", + "full/It_posix_queue_083.cpp", + "full/It_posix_queue_084.cpp", + "full/It_posix_queue_085.cpp", + "full/It_posix_queue_086.cpp", + "full/It_posix_queue_087.cpp", + "full/It_posix_queue_088.cpp", + "full/It_posix_queue_089.cpp", + "full/It_posix_queue_090.cpp", + "full/It_posix_queue_091.cpp", + "full/It_posix_queue_093.cpp", + "full/It_posix_queue_094.cpp", + "full/It_posix_queue_095.cpp", + "full/It_posix_queue_096.cpp", + "full/It_posix_queue_097.cpp", + "full/It_posix_queue_098.cpp", + "full/It_posix_queue_100.cpp", + "full/It_posix_queue_101.cpp", + "full/It_posix_queue_102.cpp", + "full/It_posix_queue_103.cpp", + "full/It_posix_queue_104.cpp", + "full/It_posix_queue_106.cpp", + "full/It_posix_queue_108.cpp", + "full/It_posix_queue_109.cpp", + "full/It_posix_queue_110.cpp", + "full/It_posix_queue_111.cpp", + "full/It_posix_queue_112.cpp", + "full/It_posix_queue_113.cpp", + "full/It_posix_queue_114.cpp", + "full/It_posix_queue_115.cpp", + "full/It_posix_queue_116.cpp", + "full/It_posix_queue_117.cpp", + "full/It_posix_queue_118.cpp", + "full/It_posix_queue_119.cpp", + "full/It_posix_queue_120.cpp", + "full/It_posix_queue_121.cpp", + "full/It_posix_queue_122.cpp", + "full/It_posix_queue_123.cpp", + "full/It_posix_queue_124.cpp", + "full/It_posix_queue_125.cpp", + "full/It_posix_queue_126.cpp", + "full/It_posix_queue_127.cpp", + "full/It_posix_queue_128.cpp", + "full/It_posix_queue_129.cpp", + "full/It_posix_queue_130.cpp", + "full/It_posix_queue_133.cpp", + "full/It_posix_queue_134.cpp", + "full/It_posix_queue_136.cpp", + "full/It_posix_queue_143.cpp", + "full/It_posix_queue_145.cpp", + "full/It_posix_queue_146.cpp", + "full/It_posix_queue_147.cpp", + "full/It_posix_queue_148.cpp", + "full/It_posix_queue_149.cpp", + "full/It_posix_queue_150.cpp", + "full/It_posix_queue_151.cpp", + "full/It_posix_queue_152.cpp", + "full/It_posix_queue_153.cpp", + "full/It_posix_queue_154.cpp", + "full/It_posix_queue_155.cpp", + "full/It_posix_queue_156.cpp", + "full/It_posix_queue_157.cpp", + "full/It_posix_queue_159.cpp", + "full/It_posix_queue_160.cpp", + "full/It_posix_queue_161.cpp", + "full/It_posix_queue_162.cpp", + "full/It_posix_queue_163.cpp", + "full/It_posix_queue_164.cpp", + "full/It_posix_queue_165.cpp", + "full/It_posix_queue_166.cpp", + "full/It_posix_queue_168.cpp", + "full/It_posix_queue_169.cpp", + "full/It_posix_queue_173.cpp", + "full/It_posix_queue_175.cpp", + "full/It_posix_queue_176.cpp", + "full/It_posix_queue_177.cpp", + "full/It_posix_queue_187.cpp", + "full/It_posix_queue_200.cpp", + "full/It_posix_queue_201.cpp", + "full/It_posix_queue_202.cpp", + "full/It_posix_queue_203.cpp", + "full/It_posix_queue_204.cpp", + ] + sources += sources_full + } + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/It_posix_queue_001.cpp", + "smoke/It_posix_queue_003.cpp", + "smoke/It_posix_queue_028.cpp", + "smoke/It_posix_queue_053.cpp", + "smoke/It_posix_queue_144.cpp", + "smoke/It_posix_queue_062.cpp", + "smoke/It_posix_queue_205.cpp", + "smoke/It_posix_queue_206.cpp", + "smoke/It_posix_queue_207.cpp", + "smoke/It_posix_queue_208.cpp", + "smoke/It_posix_queue_209.cpp", + ] + sources += sources_smoke + } + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "../..:public_config" ] configs += [ ":mqueue_config" ] diff --git a/testsuites/unittest/posix/mqueue/It_posix_queue.h b/testsuites/unittest/posix/mqueue/It_posix_queue.h index f8ebc583..85d9d308 100644 --- a/testsuites/unittest/posix/mqueue/It_posix_queue.h +++ b/testsuites/unittest/posix/mqueue/It_posix_queue.h @@ -125,6 +125,8 @@ VOID ItPosixQueue206(VOID); VOID ItPosixQueue207(VOID); VOID ItPosixQueue208(VOID); VOID ItPosixQueue209(VOID); +VOID ItPosixQueue053(VOID); +VOID ItPosixQueue144(VOID); #endif #if defined(LOSCFG_USER_TEST_FULL) @@ -166,7 +168,6 @@ VOID ItPosixQueue048(VOID); VOID ItPosixQueue049(VOID); VOID ItPosixQueue050(VOID); VOID ItPosixQueue052(VOID); -VOID ItPosixQueue053(VOID); VOID ItPosixQueue054(VOID); VOID ItPosixQueue055(VOID); VOID ItPosixQueue056(VOID); @@ -241,7 +242,6 @@ VOID ItPosixQueue133(VOID); VOID ItPosixQueue134(VOID); VOID ItPosixQueue136(VOID); VOID ItPosixQueue143(VOID); -VOID ItPosixQueue144(VOID); VOID ItPosixQueue145(VOID); VOID ItPosixQueue146(VOID); VOID ItPosixQueue147(VOID); diff --git a/testsuites/unittest/posix/mqueue/posix_mqueue_test.cpp b/testsuites/unittest/posix/mqueue/posix_mqueue_test.cpp index 04195bac..794a63a2 100644 --- a/testsuites/unittest/posix/mqueue/posix_mqueue_test.cpp +++ b/testsuites/unittest/posix/mqueue/posix_mqueue_test.cpp @@ -279,7 +279,6 @@ HWTEST_F(PosixMqueueTest, ItPosixQueue113, TestSize.Level0) { ItPosixQueue113(); } - #endif /** * @tc.name: IT_POSIX_QUEUE_018 @@ -1194,10 +1193,10 @@ HWTEST_F(PosixMqueueTest, ItPosixQueue154, TestSize.Level0) * @tc.type: FUNC * @tc.require: AR000EEMQ9 */ -/* HWTEST_F(PosixMqueueTest, ItPosixQueue155, TestSize.Level0) +HWTEST_F(PosixMqueueTest, ItPosixQueue155, TestSize.Level0) { - ItPosixQueue155(); // bug, errno -} */ + ItPosixQueue155(); +} /** * @tc.name: IT_POSIX_QUEUE_156 @@ -1316,10 +1315,10 @@ HWTEST_F(PosixMqueueTest, ItPosixQueue187, TestSize.Level0) * @tc.type: FUNC * @tc.require: AR000EEMQ9 */ -/*HWTEST_F(PosixMqueueTest, ItPosixQueue200, TestSize.Level0) +HWTEST_F(PosixMqueueTest, ItPosixQueue200, TestSize.Level0) { - ItPosixQueue200(); // bug, errno -}*/ + ItPosixQueue200(); +} /** * @tc.name: IT_POSIX_QUEUE_201 @@ -1327,10 +1326,10 @@ HWTEST_F(PosixMqueueTest, ItPosixQueue187, TestSize.Level0) * @tc.type: FUNC * @tc.require: AR000EEMQ9 */ -/*HWTEST_F(PosixMqueueTest, ItPosixQueue201, TestSize.Level0) +HWTEST_F(PosixMqueueTest, ItPosixQueue201, TestSize.Level0) { - ItPosixQueue201(); // bug, errno -}*/ + ItPosixQueue201(); +} /** * @tc.name: IT_POSIX_QUEUE_202 diff --git a/testsuites/unittest/posix/mqueue/full/It_posix_queue_053.cpp b/testsuites/unittest/posix/mqueue/smoke/It_posix_queue_053.cpp similarity index 84% rename from testsuites/unittest/posix/mqueue/full/It_posix_queue_053.cpp rename to testsuites/unittest/posix/mqueue/smoke/It_posix_queue_053.cpp index 4c976834..2308073d 100644 --- a/testsuites/unittest/posix/mqueue/full/It_posix_queue_053.cpp +++ b/testsuites/unittest/posix/mqueue/smoke/It_posix_queue_053.cpp @@ -140,32 +140,7 @@ EXIT: return MQUEUE_NO_ERROR; } -/* * -*-@test IT_POSIX_MQUEUE_053 -*-@tspec The function test for mq_send -*-@ttitle Mq_send writes the mqueue interrupted by the signal -*-@tprecon The mqueue,signal and pthread module is open -*-@tbrief -1. use the pthread_create to create a legal pthread; -2. use the mq_send to write the mqueue in the pthread; -3. use the pthread_create to create another legal pthread; -4. use the mq_receive to read the mqueue in the second pthread; -5. use the mq_close to close the mqueue in the second pthread; -6. use the mq_unlink to delete the mqueue in the second pthread; -7. delete all the pthreads. -*-@texpect -1. Return successed -2. Return successed -3. Return successed -4. Return successed -5. Return successed -6. Return successed -7. Sucessful operation -*-@tprior 1 -*-@tauto TRUE -*-@tremark -*/ VOID ItPosixQueue053(VOID) { - TEST_ADD_CASE("IT_POSIX_QUEUE_053", Testcase, TEST_POSIX, TEST_QUE, TEST_LEVEL2, TEST_FUNCTION); + TEST_ADD_CASE("ItPosixQueue053", Testcase, TEST_POSIX, TEST_QUE, TEST_LEVEL2, TEST_FUNCTION); } diff --git a/testsuites/unittest/posix/mqueue/full/It_posix_queue_144.cpp b/testsuites/unittest/posix/mqueue/smoke/It_posix_queue_144.cpp similarity index 98% rename from testsuites/unittest/posix/mqueue/full/It_posix_queue_144.cpp rename to testsuites/unittest/posix/mqueue/smoke/It_posix_queue_144.cpp index 347aedd5..c9d07ef4 100644 --- a/testsuites/unittest/posix/mqueue/full/It_posix_queue_144.cpp +++ b/testsuites/unittest/posix/mqueue/smoke/It_posix_queue_144.cpp @@ -149,5 +149,5 @@ EXIT: VOID ItPosixQueue144(VOID) // IT_Layer_ModuleORFeature_No { - TEST_ADD_CASE("IT_POSIX_QUEUE_144", Testcase, TEST_POSIX, TEST_QUE, TEST_LEVEL2, TEST_FUNCTION); + TEST_ADD_CASE("ItPosixQueue144", Testcase, TEST_POSIX, TEST_QUE, TEST_LEVEL2, TEST_FUNCTION); } diff --git a/testsuites/unittest/posix/pthread/BUILD.gn b/testsuites/unittest/posix/pthread/BUILD.gn index 7a8516a9..5e5ed5cc 100644 --- a/testsuites/unittest/posix/pthread/BUILD.gn +++ b/testsuites/unittest/posix/pthread/BUILD.gn @@ -42,127 +42,135 @@ unittest("liteos_a_posix_pthread_unittest") { "../../common/include", "../../posix/pthread", ] - sourcesllt = [] sources = [ "../../common/osTest.cpp", - "full/It_posix_pthread_001.cpp", - "full/It_posix_pthread_002.cpp", - "full/It_posix_pthread_007.cpp", - "full/It_posix_pthread_010.cpp", - "full/It_posix_pthread_011.cpp", - "full/It_posix_pthread_013.cpp", - "full/It_posix_pthread_023.cpp", - "full/It_posix_pthread_025.cpp", - "full/It_posix_pthread_026.cpp", - "full/It_posix_pthread_027.cpp", - "full/It_posix_pthread_028.cpp", - "full/It_posix_pthread_029.cpp", - "full/It_posix_pthread_030.cpp", - "full/It_posix_pthread_031.cpp", - "full/It_posix_pthread_034.cpp", - "full/It_posix_pthread_035.cpp", - "full/It_posix_pthread_039.cpp", - "full/It_posix_pthread_040.cpp", - "full/It_posix_pthread_042.cpp", - "full/It_posix_pthread_044.cpp", - "full/It_posix_pthread_045.cpp", - "full/It_posix_pthread_046.cpp", - "full/It_posix_pthread_051.cpp", - "full/It_posix_pthread_052.cpp", - "full/It_posix_pthread_053.cpp", - "full/It_posix_pthread_054.cpp", - "full/It_posix_pthread_055.cpp", - "full/It_posix_pthread_057.cpp", - "full/It_posix_pthread_059.cpp", - "full/It_posix_pthread_060.cpp", - "full/It_posix_pthread_061.cpp", - "full/It_posix_pthread_062.cpp", - "full/It_posix_pthread_063.cpp", - "full/It_posix_pthread_064.cpp", - "full/It_posix_pthread_066.cpp", - "full/It_posix_pthread_069.cpp", - "full/It_posix_pthread_070.cpp", - "full/It_posix_pthread_071.cpp", - "full/It_posix_pthread_072.cpp", - "full/It_posix_pthread_073.cpp", - "full/It_posix_pthread_074.cpp", - "full/It_posix_pthread_078.cpp", - "full/It_posix_pthread_079.cpp", - "full/It_posix_pthread_080.cpp", - "full/It_posix_pthread_081.cpp", - "full/It_posix_pthread_082.cpp", - "full/It_posix_pthread_083.cpp", - "full/It_posix_pthread_084.cpp", - "full/It_posix_pthread_085.cpp", - "full/It_posix_pthread_087.cpp", - "full/It_posix_pthread_088.cpp", - "full/It_posix_pthread_089.cpp", - "full/It_posix_pthread_090.cpp", - "full/It_posix_pthread_091.cpp", - "full/It_posix_pthread_092.cpp", - "full/It_posix_pthread_094.cpp", - "full/It_posix_pthread_095.cpp", - "full/It_posix_pthread_106.cpp", - "full/It_posix_pthread_107.cpp", - "full/It_posix_pthread_116.cpp", - "full/It_posix_pthread_123.cpp", - "full/It_posix_pthread_124.cpp", - "full/It_posix_pthread_125.cpp", - "full/It_posix_pthread_127.cpp", - "full/It_posix_pthread_129.cpp", - "full/It_posix_pthread_132.cpp", - "full/It_posix_pthread_133.cpp", - "full/It_posix_pthread_134.cpp", - "full/It_posix_pthread_136.cpp", - "full/It_posix_pthread_138.cpp", - "full/It_posix_pthread_141.cpp", - "full/It_posix_pthread_142.cpp", - "full/It_posix_pthread_144.cpp", - "full/It_posix_pthread_152.cpp", - "full/It_posix_pthread_154.cpp", - "full/It_posix_pthread_166.cpp", - "full/It_posix_pthread_167.cpp", - "full/It_posix_pthread_173.cpp", - "full/It_posix_pthread_175.cpp", - "full/It_posix_pthread_176.cpp", - "full/It_posix_pthread_177.cpp", - "full/It_posix_pthread_182.cpp", - "full/It_posix_pthread_185.cpp", - "full/It_posix_pthread_186.cpp", - "full/It_posix_pthread_187.cpp", - "full/It_posix_pthread_188.cpp", - "full/It_posix_pthread_193.cpp", - "full/It_posix_pthread_194.cpp", - "full/It_posix_pthread_200.cpp", - "full/It_posix_pthread_204.cpp", - "full/It_posix_pthread_205.cpp", - "full/It_posix_pthread_206.cpp", - "full/It_posix_pthread_209.cpp", - "full/It_posix_pthread_213.cpp", - "full/It_posix_pthread_217.cpp", - "full/It_posix_pthread_218.cpp", - "full/It_posix_pthread_219.cpp", - "full/It_posix_pthread_221.cpp", - "full/It_posix_pthread_224.cpp", - "full/It_posix_pthread_226.cpp", - "full/It_posix_pthread_233.cpp", - "full/It_posix_pthread_238.cpp", - "full/It_posix_pthread_239.cpp", - "full/It_posix_pthread_240.cpp", - "full/It_posix_pthread_241.cpp", "posix_pthread_test.cpp", - "smoke/It_posix_pthread_003.cpp", - "smoke/It_posix_pthread_004.cpp", - "smoke/It_posix_pthread_005.cpp", - "smoke/It_posix_pthread_006.cpp", - "smoke/It_posix_pthread_018.cpp", - "smoke/It_posix_pthread_019.cpp", - "smoke/It_posix_pthread_020.cpp", - "smoke/It_posix_pthread_021.cpp", - "smoke/It_posix_pthread_022.cpp", - "smoke/It_posix_pthread_203.cpp", ] - sources += sourcesllt + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/It_posix_pthread_003.cpp", + "smoke/It_posix_pthread_004.cpp", + "smoke/It_posix_pthread_005.cpp", + "smoke/It_posix_pthread_006.cpp", + "smoke/It_posix_pthread_018.cpp", + "smoke/It_posix_pthread_019.cpp", + "smoke/It_posix_pthread_020.cpp", + "smoke/It_posix_pthread_021.cpp", + "smoke/It_posix_pthread_022.cpp", + "smoke/It_posix_pthread_203.cpp", + ] + sources += sources_smoke + } + if (LOSCFG_USER_TEST_FULL == true) { + sources_full = [ + "full/It_posix_pthread_001.cpp", + "full/It_posix_pthread_002.cpp", + "full/It_posix_pthread_007.cpp", + "full/It_posix_pthread_010.cpp", + "full/It_posix_pthread_011.cpp", + "full/It_posix_pthread_013.cpp", + "full/It_posix_pthread_023.cpp", + "full/It_posix_pthread_025.cpp", + "full/It_posix_pthread_026.cpp", + "full/It_posix_pthread_027.cpp", + "full/It_posix_pthread_028.cpp", + "full/It_posix_pthread_029.cpp", + "full/It_posix_pthread_030.cpp", + "full/It_posix_pthread_031.cpp", + "full/It_posix_pthread_034.cpp", + "full/It_posix_pthread_035.cpp", + "full/It_posix_pthread_039.cpp", + "full/It_posix_pthread_040.cpp", + "full/It_posix_pthread_042.cpp", + "full/It_posix_pthread_044.cpp", + "full/It_posix_pthread_045.cpp", + "full/It_posix_pthread_046.cpp", + "full/It_posix_pthread_051.cpp", + "full/It_posix_pthread_052.cpp", + "full/It_posix_pthread_053.cpp", + "full/It_posix_pthread_054.cpp", + "full/It_posix_pthread_055.cpp", + "full/It_posix_pthread_057.cpp", + "full/It_posix_pthread_059.cpp", + "full/It_posix_pthread_060.cpp", + "full/It_posix_pthread_061.cpp", + "full/It_posix_pthread_062.cpp", + "full/It_posix_pthread_063.cpp", + "full/It_posix_pthread_064.cpp", + "full/It_posix_pthread_066.cpp", + "full/It_posix_pthread_069.cpp", + "full/It_posix_pthread_070.cpp", + "full/It_posix_pthread_071.cpp", + "full/It_posix_pthread_072.cpp", + "full/It_posix_pthread_073.cpp", + "full/It_posix_pthread_074.cpp", + "full/It_posix_pthread_078.cpp", + "full/It_posix_pthread_079.cpp", + "full/It_posix_pthread_080.cpp", + "full/It_posix_pthread_081.cpp", + "full/It_posix_pthread_082.cpp", + "full/It_posix_pthread_083.cpp", + "full/It_posix_pthread_084.cpp", + "full/It_posix_pthread_085.cpp", + "full/It_posix_pthread_087.cpp", + "full/It_posix_pthread_088.cpp", + "full/It_posix_pthread_089.cpp", + "full/It_posix_pthread_090.cpp", + "full/It_posix_pthread_091.cpp", + "full/It_posix_pthread_092.cpp", + "full/It_posix_pthread_094.cpp", + "full/It_posix_pthread_095.cpp", + "full/It_posix_pthread_106.cpp", + "full/It_posix_pthread_107.cpp", + "full/It_posix_pthread_116.cpp", + "full/It_posix_pthread_123.cpp", + "full/It_posix_pthread_124.cpp", + "full/It_posix_pthread_125.cpp", + "full/It_posix_pthread_127.cpp", + "full/It_posix_pthread_129.cpp", + "full/It_posix_pthread_132.cpp", + "full/It_posix_pthread_133.cpp", + "full/It_posix_pthread_134.cpp", + "full/It_posix_pthread_136.cpp", + "full/It_posix_pthread_138.cpp", + "full/It_posix_pthread_141.cpp", + "full/It_posix_pthread_142.cpp", + "full/It_posix_pthread_144.cpp", + "full/It_posix_pthread_152.cpp", + "full/It_posix_pthread_154.cpp", + "full/It_posix_pthread_166.cpp", + "full/It_posix_pthread_167.cpp", + "full/It_posix_pthread_173.cpp", + "full/It_posix_pthread_175.cpp", + "full/It_posix_pthread_176.cpp", + "full/It_posix_pthread_177.cpp", + "full/It_posix_pthread_182.cpp", + "full/It_posix_pthread_185.cpp", + "full/It_posix_pthread_186.cpp", + "full/It_posix_pthread_187.cpp", + "full/It_posix_pthread_188.cpp", + "full/It_posix_pthread_193.cpp", + "full/It_posix_pthread_194.cpp", + "full/It_posix_pthread_200.cpp", + "full/It_posix_pthread_204.cpp", + "full/It_posix_pthread_205.cpp", + "full/It_posix_pthread_206.cpp", + "full/It_posix_pthread_209.cpp", + "full/It_posix_pthread_213.cpp", + "full/It_posix_pthread_217.cpp", + "full/It_posix_pthread_218.cpp", + "full/It_posix_pthread_219.cpp", + "full/It_posix_pthread_221.cpp", + "full/It_posix_pthread_224.cpp", + "full/It_posix_pthread_226.cpp", + "full/It_posix_pthread_233.cpp", + "full/It_posix_pthread_238.cpp", + "full/It_posix_pthread_239.cpp", + "full/It_posix_pthread_240.cpp", + "full/It_posix_pthread_241.cpp", + ] + sources += sources_full + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "../..:public_config" ] configs += [ ":pthread_config" ] diff --git a/testsuites/unittest/process/mutex/BUILD.gn b/testsuites/unittest/process/mutex/BUILD.gn index c0dc1e0a..6039c7ee 100644 --- a/testsuites/unittest/process/mutex/BUILD.gn +++ b/testsuites/unittest/process/mutex/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../../config.gni") unittest("liteos_a_mutex_unittest") { output_extension = "bin" @@ -39,32 +40,37 @@ unittest("liteos_a_mutex_unittest") { sources = [ "../../common/osTest.cpp", "process_mutex_test.cpp", - "smoke/pthread_mutex_test_001.cpp", - "smoke/pthread_mutex_test_002.cpp", - "smoke/pthread_mutex_test_003.cpp", - "smoke/pthread_mutex_test_004.cpp", - "smoke/pthread_mutex_test_005.cpp", - "smoke/pthread_mutex_test_006.cpp", - "smoke/pthread_mutex_test_007.cpp", - "smoke/pthread_mutex_test_008.cpp", - "smoke/pthread_mutex_test_009.cpp", - "smoke/pthread_mutex_test_010.cpp", - "smoke/pthread_mutex_test_011.cpp", - "smoke/pthread_mutex_test_012.cpp", - "smoke/pthread_mutex_test_013.cpp", - "smoke/pthread_mutex_test_014.cpp", - "smoke/pthread_mutex_test_015.cpp", - "smoke/pthread_mutex_test_016.cpp", - "smoke/pthread_mutex_test_017.cpp", - "smoke/pthread_mutex_test_018.cpp", - "smoke/pthread_mutex_test_019.cpp", - "smoke/pthread_mutex_test_020.cpp", - "smoke/pthread_mutex_test_021.cpp", - "smoke/pthread_mutex_test_022.cpp", - "smoke/pthread_mutex_test_023.cpp", - "smoke/pthread_mutex_test_024.cpp", - "smoke/pthread_mutex_test_025.cpp", ] + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/pthread_mutex_test_001.cpp", + "smoke/pthread_mutex_test_002.cpp", + "smoke/pthread_mutex_test_003.cpp", + "smoke/pthread_mutex_test_004.cpp", + "smoke/pthread_mutex_test_005.cpp", + "smoke/pthread_mutex_test_006.cpp", + "smoke/pthread_mutex_test_007.cpp", + "smoke/pthread_mutex_test_008.cpp", + "smoke/pthread_mutex_test_009.cpp", + "smoke/pthread_mutex_test_010.cpp", + "smoke/pthread_mutex_test_011.cpp", + "smoke/pthread_mutex_test_012.cpp", + "smoke/pthread_mutex_test_013.cpp", + "smoke/pthread_mutex_test_014.cpp", + "smoke/pthread_mutex_test_015.cpp", + "smoke/pthread_mutex_test_016.cpp", + "smoke/pthread_mutex_test_017.cpp", + "smoke/pthread_mutex_test_018.cpp", + "smoke/pthread_mutex_test_019.cpp", + "smoke/pthread_mutex_test_020.cpp", + "smoke/pthread_mutex_test_021.cpp", + "smoke/pthread_mutex_test_022.cpp", + "smoke/pthread_mutex_test_023.cpp", + "smoke/pthread_mutex_test_024.cpp", + "smoke/pthread_mutex_test_025.cpp", + ] + sources += sources_smoke + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "../..:public_config" ] } diff --git a/testsuites/unittest/process/mutex/process_mutex_test.cpp b/testsuites/unittest/process/mutex/process_mutex_test.cpp index 1b938cff..91b588f9 100644 --- a/testsuites/unittest/process/mutex/process_mutex_test.cpp +++ b/testsuites/unittest/process/mutex/process_mutex_test.cpp @@ -49,6 +49,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_SMOKE) /* * * @tc.name: it_test_pthread_mutex_001 * @tc.desc: function for ProcessMutexTest @@ -292,5 +293,5 @@ HWTEST_F(ProcessMutexTest, ItTestPthreadMutex022, TestSize.Level0) { ItTestPthreadMutex022(); } - +#endif } // namespace OHOS diff --git a/testsuites/unittest/process/process/BUILD.gn b/testsuites/unittest/process/process/BUILD.gn index 99dcbd41..2c6fd7fc 100644 --- a/testsuites/unittest/process/process/BUILD.gn +++ b/testsuites/unittest/process/process/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../../config.gni") unittest("liteos_a_process_unittest") { output_extension = "bin" @@ -39,81 +40,86 @@ unittest("liteos_a_process_unittest") { sources = [ "../../common/osTest.cpp", "process_process_test.cpp", - "smoke/process_test_001.cpp", - "smoke/process_test_002.cpp", - "smoke/process_test_004.cpp", - "smoke/process_test_005.cpp", - "smoke/process_test_006.cpp", - "smoke/process_test_007.cpp", - "smoke/process_test_008.cpp", - "smoke/process_test_009.cpp", - "smoke/process_test_010.cpp", - "smoke/process_test_011.cpp", - "smoke/process_test_012.cpp", - "smoke/process_test_013.cpp", - "smoke/process_test_014.cpp", - "smoke/process_test_015.cpp", - "smoke/process_test_016.cpp", - "smoke/process_test_017.cpp", - "smoke/process_test_018.cpp", - "smoke/process_test_019.cpp", - "smoke/process_test_020.cpp", - "smoke/process_test_021.cpp", - "smoke/process_test_022.cpp", - "smoke/process_test_023.cpp", - "smoke/process_test_024.cpp", - "smoke/process_test_025.cpp", - "smoke/process_test_026.cpp", - "smoke/process_test_027.cpp", - "smoke/process_test_029.cpp", - "smoke/process_test_030.cpp", - "smoke/process_test_031.cpp", - "smoke/process_test_032.cpp", - "smoke/process_test_033.cpp", - "smoke/process_test_034.cpp", - "smoke/process_test_035.cpp", - "smoke/process_test_036.cpp", - "smoke/process_test_037.cpp", - "smoke/process_test_038.cpp", - "smoke/process_test_039.cpp", - "smoke/process_test_040.cpp", - "smoke/process_test_041.cpp", - "smoke/process_test_042.cpp", - "smoke/process_test_043.cpp", - "smoke/process_test_044.cpp", - "smoke/process_test_045.cpp", - "smoke/process_test_046.cpp", - "smoke/process_test_047.cpp", - "smoke/process_test_048.cpp", - "smoke/process_test_049.cpp", - "smoke/process_test_050.cpp", - "smoke/process_test_051.cpp", - "smoke/process_test_053.cpp", - "smoke/process_test_054.cpp", - "smoke/process_test_055.cpp", - "smoke/process_test_056.cpp", - "smoke/process_test_057.cpp", - "smoke/process_test_058.cpp", - "smoke/process_test_059.cpp", - "smoke/process_test_060.cpp", - "smoke/process_test_061.cpp", - "smoke/process_test_062.cpp", - "smoke/process_test_063.cpp", - "smoke/process_test_064.cpp", - "smoke/process_test_065.cpp", - "smoke/process_test_066.cpp", - "smoke/process_test_067.cpp", - "smoke/process_test_068.cpp", - "smoke/process_test_069.cpp", - "smp/process_test_smp_001.cpp", - "smp/process_test_smp_002.cpp", - "smp/process_test_smp_003.cpp", - "smp/process_test_smp_004.cpp", - "smp/process_test_smp_005.cpp", - "smp/process_test_smp_006.cpp", - "smp/process_test_smp_007.cpp", - "smp/process_test_smp_008.cpp", ] + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/process_test_001.cpp", + "smoke/process_test_002.cpp", + "smoke/process_test_004.cpp", + "smoke/process_test_005.cpp", + "smoke/process_test_006.cpp", + "smoke/process_test_007.cpp", + "smoke/process_test_008.cpp", + "smoke/process_test_009.cpp", + "smoke/process_test_010.cpp", + "smoke/process_test_011.cpp", + "smoke/process_test_012.cpp", + "smoke/process_test_013.cpp", + "smoke/process_test_014.cpp", + "smoke/process_test_015.cpp", + "smoke/process_test_016.cpp", + "smoke/process_test_017.cpp", + "smoke/process_test_018.cpp", + "smoke/process_test_019.cpp", + "smoke/process_test_020.cpp", + "smoke/process_test_021.cpp", + "smoke/process_test_022.cpp", + "smoke/process_test_023.cpp", + "smoke/process_test_024.cpp", + "smoke/process_test_025.cpp", + "smoke/process_test_026.cpp", + "smoke/process_test_027.cpp", + "smoke/process_test_029.cpp", + "smoke/process_test_030.cpp", + "smoke/process_test_031.cpp", + "smoke/process_test_032.cpp", + "smoke/process_test_033.cpp", + "smoke/process_test_034.cpp", + "smoke/process_test_035.cpp", + "smoke/process_test_036.cpp", + "smoke/process_test_037.cpp", + "smoke/process_test_038.cpp", + "smoke/process_test_039.cpp", + "smoke/process_test_040.cpp", + "smoke/process_test_041.cpp", + "smoke/process_test_042.cpp", + "smoke/process_test_043.cpp", + "smoke/process_test_044.cpp", + "smoke/process_test_045.cpp", + "smoke/process_test_046.cpp", + "smoke/process_test_047.cpp", + "smoke/process_test_048.cpp", + "smoke/process_test_049.cpp", + "smoke/process_test_050.cpp", + "smoke/process_test_051.cpp", + "smoke/process_test_053.cpp", + "smoke/process_test_054.cpp", + "smoke/process_test_055.cpp", + "smoke/process_test_056.cpp", + "smoke/process_test_057.cpp", + "smoke/process_test_058.cpp", + "smoke/process_test_059.cpp", + "smoke/process_test_060.cpp", + "smoke/process_test_061.cpp", + "smoke/process_test_062.cpp", + "smoke/process_test_063.cpp", + "smoke/process_test_064.cpp", + "smoke/process_test_065.cpp", + "smoke/process_test_066.cpp", + "smoke/process_test_067.cpp", + "smoke/process_test_068.cpp", + "smoke/process_test_069.cpp", + "smp/process_test_smp_001.cpp", + "smp/process_test_smp_002.cpp", + "smp/process_test_smp_003.cpp", + "smp/process_test_smp_004.cpp", + "smp/process_test_smp_005.cpp", + "smp/process_test_smp_006.cpp", + "smp/process_test_smp_007.cpp", + "smp/process_test_smp_008.cpp", + ] + sources += sources_smoke + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "../..:public_config" ] } diff --git a/testsuites/unittest/process/process/process_process_test.cpp b/testsuites/unittest/process/process/process_process_test.cpp index d07fed7b..c2f6da61 100644 --- a/testsuites/unittest/process/process/process_process_test.cpp +++ b/testsuites/unittest/process/process/process_process_test.cpp @@ -70,6 +70,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_SMOKE) /* * * @tc.name: it_test_process_001 * @tc.desc: function for ProcessProcessTest @@ -890,6 +891,6 @@ HWTEST_F(ProcessProcessTest, ItTestProcessSmp008, TestSize.Level0) { ItTestProcessSmp008(); } - +#endif #endif } // namespace OHOS diff --git a/testsuites/unittest/process/pthread/BUILD.gn b/testsuites/unittest/process/pthread/BUILD.gn index 0b2df0ee..70af1ebe 100644 --- a/testsuites/unittest/process/pthread/BUILD.gn +++ b/testsuites/unittest/process/pthread/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../../config.gni") unittest("liteos_a_pthread_unittest") { output_extension = "bin" @@ -39,31 +40,36 @@ unittest("liteos_a_pthread_unittest") { sources = [ "../../common/osTest.cpp", "process_pthread_test.cpp", - "smoke/pthread_atfork_test_001.cpp", - "smoke/pthread_atfork_test_002.cpp", - "smoke/pthread_cond_test_001.cpp", - "smoke/pthread_cond_test_002.cpp", - "smoke/pthread_once_test_001.cpp", - "smoke/pthread_test_001.cpp", - "smoke/pthread_test_002.cpp", - "smoke/pthread_test_003.cpp", - "smoke/pthread_test_004.cpp", - "smoke/pthread_test_005.cpp", - "smoke/pthread_test_006.cpp", - "smoke/pthread_test_007.cpp", - "smoke/pthread_test_008.cpp", - "smoke/pthread_test_009.cpp", - "smoke/pthread_test_010.cpp", - "smoke/pthread_test_011.cpp", - "smoke/pthread_test_012.cpp", - "smoke/pthread_test_013.cpp", - "smoke/pthread_test_014.cpp", - "smoke/pthread_test_015.cpp", - "smoke/pthread_test_016.cpp", - "smoke/pthread_test_017.cpp", - "smoke/pthread_test_018.cpp", - "smoke/pthread_test_019.cpp", ] + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/pthread_atfork_test_001.cpp", + "smoke/pthread_atfork_test_002.cpp", + "smoke/pthread_cond_test_001.cpp", + "smoke/pthread_cond_test_002.cpp", + "smoke/pthread_once_test_001.cpp", + "smoke/pthread_test_001.cpp", + "smoke/pthread_test_002.cpp", + "smoke/pthread_test_003.cpp", + "smoke/pthread_test_004.cpp", + "smoke/pthread_test_005.cpp", + "smoke/pthread_test_006.cpp", + "smoke/pthread_test_007.cpp", + "smoke/pthread_test_008.cpp", + "smoke/pthread_test_009.cpp", + "smoke/pthread_test_010.cpp", + "smoke/pthread_test_011.cpp", + "smoke/pthread_test_012.cpp", + "smoke/pthread_test_013.cpp", + "smoke/pthread_test_014.cpp", + "smoke/pthread_test_015.cpp", + "smoke/pthread_test_016.cpp", + "smoke/pthread_test_017.cpp", + "smoke/pthread_test_018.cpp", + "smoke/pthread_test_019.cpp", + ] + sources += sources_smoke + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "../..:public_config" ] } diff --git a/testsuites/unittest/process/pthread/process_pthread_test.cpp b/testsuites/unittest/process/pthread/process_pthread_test.cpp index 11a11735..ac6f1076 100644 --- a/testsuites/unittest/process/pthread/process_pthread_test.cpp +++ b/testsuites/unittest/process/pthread/process_pthread_test.cpp @@ -51,6 +51,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_SMOKE) /* * * @tc.name: it_test_pthread_001 * @tc.desc: function for ProcessPthreadTest @@ -165,8 +166,8 @@ HWTEST_F(ProcessPthreadTest, ItTestPthread010, TestSize.Level0) { ItTestPthread010(); } - #endif + /* * * @tc.name: it_test_pthread_011 * @tc.desc: function for ProcessPthreadTest @@ -211,8 +212,8 @@ HWTEST_F(ProcessPthreadTest, ItTestPthread014, TestSize.Level0) { ItTestPthread014(); } - #endif + /* * * @tc.name: it_test_pthread_015 * @tc.desc: function for ProcessPthreadTest @@ -322,4 +323,5 @@ HWTEST_F(ProcessPthreadTest, ItTestPthreadCond002, TestSize.Level0) { ItTestPthreadCond002(); } +#endif } // namespace OHOS diff --git a/testsuites/unittest/process/rwlock/BUILD.gn b/testsuites/unittest/process/rwlock/BUILD.gn index 97c4d912..31905e0e 100644 --- a/testsuites/unittest/process/rwlock/BUILD.gn +++ b/testsuites/unittest/process/rwlock/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../../config.gni") unittest("liteos_a_rwlock_unittest") { output_extension = "bin" @@ -39,9 +40,14 @@ unittest("liteos_a_rwlock_unittest") { sources = [ "../../common/osTest.cpp", "process_rwlock_test.cpp", - "smoke/pthread_rwlock_test_001.cpp", - "smoke/pthread_rwlock_test_002.cpp", ] + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/pthread_rwlock_test_001.cpp", + "smoke/pthread_rwlock_test_002.cpp", + ] + sources += sources_smoke + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "../..:public_config" ] } diff --git a/testsuites/unittest/process/rwlock/process_rwlock_test.cpp b/testsuites/unittest/process/rwlock/process_rwlock_test.cpp index b3bb2a91..b4a6753d 100644 --- a/testsuites/unittest/process/rwlock/process_rwlock_test.cpp +++ b/testsuites/unittest/process/rwlock/process_rwlock_test.cpp @@ -41,6 +41,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_SMOKE) /* * * @tc.name: it_test_pthread_rwlock_001 * @tc.desc: function for ProcessRwlockTest @@ -62,4 +63,5 @@ HWTEST_F(ProcessRwlockTest, ItTestPthreadRwlock002, TestSize.Level0) { ItTestPthreadRwlock002(); } +#endif } // namespace OHOS diff --git a/testsuites/unittest/process/spinlock/BUILD.gn b/testsuites/unittest/process/spinlock/BUILD.gn index 8991d288..b9e5d44e 100644 --- a/testsuites/unittest/process/spinlock/BUILD.gn +++ b/testsuites/unittest/process/spinlock/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../../config.gni") unittest("liteos_a_spinlock_unittest") { output_extension = "bin" @@ -39,8 +40,13 @@ unittest("liteos_a_spinlock_unittest") { sources = [ "../../common/osTest.cpp", "process_spinlock_test.cpp", - "smoke/pthread_spinlock_test_001.cpp", ] + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/pthread_spinlock_test_001.cpp", + ] + sources += sources_smoke + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "../..:public_config" ] } diff --git a/testsuites/unittest/process/spinlock/process_spinlock_test.cpp b/testsuites/unittest/process/spinlock/process_spinlock_test.cpp index 51512eb9..d9db0030 100644 --- a/testsuites/unittest/process/spinlock/process_spinlock_test.cpp +++ b/testsuites/unittest/process/spinlock/process_spinlock_test.cpp @@ -41,6 +41,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_SMOKE) /* * * @tc.name: it_test_pthread_spinlock_001 * @tc.desc: function for ProcessSpinlockTest @@ -51,4 +52,5 @@ HWTEST_F(ProcessSpinlockTest, ItTestPthreadSpinlock001, TestSize.Level0) { ItTestPthreadSpinlock001(); } +#endif } // namespace OHOS diff --git a/testsuites/unittest/security/capability/BUILD.gn b/testsuites/unittest/security/capability/BUILD.gn index 5acb2bf2..d8976d2b 100644 --- a/testsuites/unittest/security/capability/BUILD.gn +++ b/testsuites/unittest/security/capability/BUILD.gn @@ -1,5 +1,6 @@ # Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved. import("//build/lite/config/test.gni") +import("../../config.gni") unittest("liteos_a_security_capability_unittest") { output_extension = "bin" @@ -12,8 +13,13 @@ unittest("liteos_a_security_capability_unittest") { sources = [ "../../common/osTest.cpp", "security_capability_test.cpp", - "smoke/cap_test_001.cpp", ] + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/cap_test_001.cpp", + ] + sources += sources_smoke + } configs = [ "../..:public_config" ] deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/security/capability/security_capability_test.cpp b/testsuites/unittest/security/capability/security_capability_test.cpp index 82169fa5..c00995f2 100644 --- a/testsuites/unittest/security/capability/security_capability_test.cpp +++ b/testsuites/unittest/security/capability/security_capability_test.cpp @@ -42,6 +42,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_SMOKE) /** * @tc.name: It_Test_Cap_001 * @tc.desc: function for SecurityCapbilityTest @@ -52,4 +53,5 @@ HWTEST_F(SecurityCapabilityTest, ItTestCap001, TestSize.Level0) { ItTestCap001(); } +#endif } // namespace OHOS diff --git a/testsuites/unittest/security/reugid/BUILD.gn b/testsuites/unittest/security/reugid/BUILD.gn index 924dd5e1..a255a743 100644 --- a/testsuites/unittest/security/reugid/BUILD.gn +++ b/testsuites/unittest/security/reugid/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../../config.gni") unittest("liteos_a_security_reugid_unittest") { output_extension = "bin" @@ -39,8 +40,13 @@ unittest("liteos_a_security_reugid_unittest") { sources = [ "../../common/osTest.cpp", "security_reugid_test.cpp", - "smoke/reugid_test_001.cpp", ] + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/reugid_test_001.cpp", + ] + sources += sources_smoke + } configs = [ "../..:public_config" ] deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/security/reugid/security_reugid_test.cpp b/testsuites/unittest/security/reugid/security_reugid_test.cpp index 33377385..d58ab2b6 100644 --- a/testsuites/unittest/security/reugid/security_reugid_test.cpp +++ b/testsuites/unittest/security/reugid/security_reugid_test.cpp @@ -42,6 +42,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_SMOKE) /** * @tc.name: ItTestReugid001 * @tc.desc: function for SecurityReugidTest @@ -52,4 +53,5 @@ HWTEST_F(SecurityReugidTest, ItTestReugid001, TestSize.Level0) { ItTestReugid001(); } +#endif } // namespace OHOS diff --git a/testsuites/unittest/security/vid/BUILD.gn b/testsuites/unittest/security/vid/BUILD.gn index 2894eb84..916aa3eb 100644 --- a/testsuites/unittest/security/vid/BUILD.gn +++ b/testsuites/unittest/security/vid/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../../config.gni") unittest("liteos_a_security_vid_unittest") { output_extension = "bin" @@ -39,8 +40,13 @@ unittest("liteos_a_security_vid_unittest") { sources = [ "../../common/osTest.cpp", "security_vid_test.cpp", - "smoke/vid_test_001.cpp", ] + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/vid_test_001.cpp", + ] + sources += sources_smoke + } configs = [ "../..:public_config" ] deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/security/vid/security_vid_test.cpp b/testsuites/unittest/security/vid/security_vid_test.cpp index e0816f3c..2d66743f 100644 --- a/testsuites/unittest/security/vid/security_vid_test.cpp +++ b/testsuites/unittest/security/vid/security_vid_test.cpp @@ -42,6 +42,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_SMOKE) /** * @tc.name: It_Sec_Vid_001 * @tc.desc: function for SecurityVidTest @@ -52,4 +53,5 @@ HWTEST_F(SecurityVidTest, ItSecVid001, TestSize.Level0) { ItSecVid001(); } +#endif } // namespace OHOS diff --git a/testsuites/unittest/signal/BUILD.gn b/testsuites/unittest/signal/BUILD.gn index a0ab8851..27e0414b 100644 --- a/testsuites/unittest/signal/BUILD.gn +++ b/testsuites/unittest/signal/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../config.gni") unittest("liteos_a_signal_unittest") { output_extension = "bin" @@ -39,70 +40,75 @@ unittest("liteos_a_signal_unittest") { sources = [ "../common/osTest.cpp", "signal_test.cpp", - "smoke/It_ipc_fdclr_001.cpp", - "smoke/It_ipc_fdisset_001.cpp", - "smoke/It_ipc_fdset_001.cpp", - "smoke/It_ipc_fdzero_001.cpp", - "smoke/It_ipc_mkfifo_002.cpp", - "smoke/It_ipc_mkfifo_003.cpp", - "smoke/It_ipc_pipe_002.cpp", - "smoke/It_ipc_pipe_003.cpp", - "smoke/It_ipc_pipe_004.cpp", - "smoke/It_ipc_pipe_005.cpp", - "smoke/It_ipc_sigaction_001.cpp", - "smoke/It_ipc_sigpause_001.cpp", - "smoke/It_ipc_sigprocmask_001.cpp", - "smoke/mkfifo_test_001.cpp", - "smoke/mkfifo_test_002.cpp", - "smoke/pipe_test_001.cpp", - "smoke/pipe_test_002.cpp", - "smoke/pipe_test_003.cpp", - "smoke/pipe_test_004.cpp", - "smoke/pipe_test_005.cpp", - "smoke/pipe_test_006.cpp", - "smoke/signal_test_001.cpp", - "smoke/signal_test_002.cpp", - "smoke/signal_test_003.cpp", - "smoke/signal_test_004.cpp", - "smoke/signal_test_005.cpp", - "smoke/signal_test_006.cpp", - "smoke/signal_test_007.cpp", - "smoke/signal_test_008.cpp", - "smoke/signal_test_009.cpp", - "smoke/signal_test_010.cpp", - "smoke/signal_test_011.cpp", - "smoke/signal_test_012.cpp", - "smoke/signal_test_013.cpp", - "smoke/signal_test_014.cpp", - "smoke/signal_test_015.cpp", - "smoke/signal_test_016.cpp", - "smoke/signal_test_017.cpp", - "smoke/signal_test_018.cpp", - "smoke/signal_test_019.cpp", - "smoke/signal_test_020.cpp", - "smoke/signal_test_021.cpp", - "smoke/signal_test_022.cpp", - "smoke/signal_test_023.cpp", - "smoke/signal_test_024.cpp", - "smoke/signal_test_025.cpp", - "smoke/signal_test_026.cpp", - "smoke/signal_test_028.cpp", - "smoke/signal_test_029.cpp", - "smoke/signal_test_030.cpp", - "smoke/signal_test_031.cpp", - "smoke/signal_test_032.cpp", - "smoke/signal_test_033.cpp", - "smoke/signal_test_035.cpp", - "smoke/signal_test_036.cpp", - "smoke/signal_test_037.cpp", - "smoke/signal_test_038.cpp", - "smoke/signal_test_039.cpp", - "smoke/signal_test_040.cpp", - "smoke/signal_test_041.cpp", - "smoke/signal_test_042.cpp", - "smoke/sigset_test_001.cpp", - "smoke/sigset_test_002.cpp", ] + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/It_ipc_fdclr_001.cpp", + "smoke/It_ipc_fdisset_001.cpp", + "smoke/It_ipc_fdset_001.cpp", + "smoke/It_ipc_fdzero_001.cpp", + "smoke/It_ipc_mkfifo_002.cpp", + "smoke/It_ipc_mkfifo_003.cpp", + "smoke/It_ipc_pipe_002.cpp", + "smoke/It_ipc_pipe_003.cpp", + "smoke/It_ipc_pipe_004.cpp", + "smoke/It_ipc_pipe_005.cpp", + "smoke/It_ipc_sigaction_001.cpp", + "smoke/It_ipc_sigpause_001.cpp", + "smoke/It_ipc_sigprocmask_001.cpp", + "smoke/mkfifo_test_001.cpp", + "smoke/mkfifo_test_002.cpp", + "smoke/pipe_test_001.cpp", + "smoke/pipe_test_002.cpp", + "smoke/pipe_test_003.cpp", + "smoke/pipe_test_004.cpp", + "smoke/pipe_test_005.cpp", + "smoke/pipe_test_006.cpp", + "smoke/signal_test_001.cpp", + "smoke/signal_test_002.cpp", + "smoke/signal_test_003.cpp", + "smoke/signal_test_004.cpp", + "smoke/signal_test_005.cpp", + "smoke/signal_test_006.cpp", + "smoke/signal_test_007.cpp", + "smoke/signal_test_008.cpp", + "smoke/signal_test_009.cpp", + "smoke/signal_test_010.cpp", + "smoke/signal_test_011.cpp", + "smoke/signal_test_012.cpp", + "smoke/signal_test_013.cpp", + "smoke/signal_test_014.cpp", + "smoke/signal_test_015.cpp", + "smoke/signal_test_016.cpp", + "smoke/signal_test_017.cpp", + "smoke/signal_test_018.cpp", + "smoke/signal_test_019.cpp", + "smoke/signal_test_020.cpp", + "smoke/signal_test_021.cpp", + "smoke/signal_test_022.cpp", + "smoke/signal_test_023.cpp", + "smoke/signal_test_024.cpp", + "smoke/signal_test_025.cpp", + "smoke/signal_test_026.cpp", + "smoke/signal_test_028.cpp", + "smoke/signal_test_029.cpp", + "smoke/signal_test_030.cpp", + "smoke/signal_test_031.cpp", + "smoke/signal_test_032.cpp", + "smoke/signal_test_033.cpp", + "smoke/signal_test_035.cpp", + "smoke/signal_test_036.cpp", + "smoke/signal_test_037.cpp", + "smoke/signal_test_038.cpp", + "smoke/signal_test_039.cpp", + "smoke/signal_test_040.cpp", + "smoke/signal_test_041.cpp", + "smoke/signal_test_042.cpp", + "smoke/sigset_test_001.cpp", + "smoke/sigset_test_002.cpp", + ] + sources += sources_smoke + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "..:public_config" ] } diff --git a/testsuites/unittest/signal/signal_test.cpp b/testsuites/unittest/signal/signal_test.cpp index 9e9f1678..e60e4d32 100644 --- a/testsuites/unittest/signal/signal_test.cpp +++ b/testsuites/unittest/signal/signal_test.cpp @@ -40,6 +40,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_SMOKE) /* * * @tc.name: IT_POSIX_SIGNAL_001 * @tc.desc: function for SignalTest @@ -645,4 +646,5 @@ HWTEST_F(SignalTest, ItIpcSigpromask001, TestSize.Level0) { ItIpcSigpromask001(); } +#endif } // namespace OHOS diff --git a/testsuites/unittest/sys/BUILD.gn b/testsuites/unittest/sys/BUILD.gn index 747e5718..4dc074bd 100644 --- a/testsuites/unittest/sys/BUILD.gn +++ b/testsuites/unittest/sys/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../config.gni") unittest("liteos_a_sys_unittest") { output_extension = "bin" @@ -38,36 +39,43 @@ unittest("liteos_a_sys_unittest") { ] sources = [ "../common/osTest.cpp", - "smoke/sys_test_001.cpp", - "smoke/sys_test_004.cpp", - "smoke/sys_test_005.cpp", - "smoke/sys_test_006.cpp", - "smoke/sys_test_007.cpp", - "smoke/sys_test_008.cpp", - "smoke/sys_test_009.cpp", - "smoke/sys_test_010.cpp", - "smoke/sys_test_012.cpp", - "smoke/sys_test_013.cpp", - "smoke/sys_test_014.cpp", - "smoke/sys_test_015.cpp", - "smoke/sys_test_016.cpp", - "smoke/sys_test_017.cpp", - "smoke/sys_test_018.cpp", - "smoke/sys_test_019.cpp", - "smoke/sys_test_020.cpp", - "smoke/sys_test_021.cpp", - "smoke/sys_test_022.cpp", - "smoke/sys_test_023.cpp", - "smoke/sys_test_024.cpp", - "smoke/sys_test_025.cpp", - "smoke/sys_test_026.cpp", - "smoke/sys_test_027.cpp", - "smoke/sys_test_028.cpp", - "smoke/sys_test_029.cpp", - "smoke/sys_test_030.cpp", - "smoke/sys_test_031.cpp", "sys_unit_test.cpp", ] + + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/sys_test_001.cpp", + "smoke/sys_test_004.cpp", + "smoke/sys_test_005.cpp", + "smoke/sys_test_006.cpp", + "smoke/sys_test_007.cpp", + "smoke/sys_test_008.cpp", + "smoke/sys_test_009.cpp", + "smoke/sys_test_010.cpp", + "smoke/sys_test_012.cpp", + "smoke/sys_test_013.cpp", + "smoke/sys_test_014.cpp", + "smoke/sys_test_015.cpp", + "smoke/sys_test_016.cpp", + "smoke/sys_test_017.cpp", + "smoke/sys_test_018.cpp", + "smoke/sys_test_019.cpp", + "smoke/sys_test_020.cpp", + "smoke/sys_test_021.cpp", + "smoke/sys_test_022.cpp", + "smoke/sys_test_023.cpp", + "smoke/sys_test_024.cpp", + "smoke/sys_test_025.cpp", + "smoke/sys_test_026.cpp", + "smoke/sys_test_027.cpp", + "smoke/sys_test_028.cpp", + "smoke/sys_test_029.cpp", + "smoke/sys_test_030.cpp", + "smoke/sys_test_031.cpp", + ] + sources += sources_smoke + } + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "..:public_config" ] } diff --git a/testsuites/unittest/sys/sys_unit_test.cpp b/testsuites/unittest/sys/sys_unit_test.cpp index e8aa719b..ce866c0a 100644 --- a/testsuites/unittest/sys/sys_unit_test.cpp +++ b/testsuites/unittest/sys/sys_unit_test.cpp @@ -42,6 +42,7 @@ public: static void TearDownTestCase(void) {} }; +#if defined(LOSCFG_USER_TEST_SMOKE) /* * * @tc.name: IT_TEST_SYS_004 * @tc.desc: function for SysTest @@ -217,4 +218,5 @@ HWTEST_F(SysTest, IT_TEST_SYS_031, TestSize.Level0) { IT_TEST_SYS_031(); } +#endif } // namespace OHOS diff --git a/testsuites/unittest/time/clock/BUILD.gn b/testsuites/unittest/time/clock/BUILD.gn index fb832e16..83a1fae0 100644 --- a/testsuites/unittest/time/clock/BUILD.gn +++ b/testsuites/unittest/time/clock/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../../config.gni") unittest("liteos_a_time_clock_unittest") { output_extension = "bin" @@ -36,21 +37,34 @@ unittest("liteos_a_time_clock_unittest") { "../../common/include", "../../time/clock", ] + sources = [ "../../common/osTest.cpp", - "smoke/clock_test_001.cpp", - "smoke/clock_test_002.cpp", - "smoke/clock_test_003.cpp", - "smoke/clock_test_004.cpp", - "smoke/clock_test_006.cpp", - "smoke/clock_test_007.cpp", - "smoke/clock_test_008.cpp", - "smoke/clock_test_009.cpp", - "smoke/clock_test_010.cpp", - "smoke/clock_test_011.cpp", - "smoke/clock_test_012.cpp", "time_clock_test.cpp", ] + + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/clock_test_001.cpp", + "smoke/clock_test_002.cpp", + "smoke/clock_test_003.cpp", + "smoke/clock_test_004.cpp", + "smoke/clock_test_006.cpp", + "smoke/clock_test_007.cpp", + "smoke/clock_test_008.cpp", + "smoke/clock_test_009.cpp", + "smoke/clock_test_011.cpp", + "smoke/clock_test_012.cpp", + ] + sources += sources_smoke + } + + if (LOSCFG_USER_TEST_FULL == true) { + sources_full = [ + "full/clock_test_010.cpp", + ] + sources += sources_full + } deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "../../../unittest:public_config" ] } diff --git a/testsuites/unittest/time/clock/smoke/clock_test_010.cpp b/testsuites/unittest/time/clock/full/clock_test_010.cpp similarity index 98% rename from testsuites/unittest/time/clock/smoke/clock_test_010.cpp rename to testsuites/unittest/time/clock/full/clock_test_010.cpp index 8c3c80a8..197da67c 100644 --- a/testsuites/unittest/time/clock/smoke/clock_test_010.cpp +++ b/testsuites/unittest/time/clock/full/clock_test_010.cpp @@ -64,7 +64,7 @@ static int SleepTest(int64_t expectTime) LogPrintln("slept time (expected --> actual): %" PRId64 "ns --> %" PRId64 "ns, delta: %" PRId64 "ns\n", expectTime, escapeTime, escapeTime - expectTime); - g_failCnt += (escapeTime < expectTime || (escapeTime - expectTime) >= 90000000); // 20000000, 2 ticks. + g_failCnt += (escapeTime < expectTime || (escapeTime - expectTime) >= 20000000); // 20000000, 2 ticks. return 0; } diff --git a/testsuites/unittest/time/clock/time_clock_test.cpp b/testsuites/unittest/time/clock/time_clock_test.cpp index 0d73d34b..8b061b99 100644 --- a/testsuites/unittest/time/clock/time_clock_test.cpp +++ b/testsuites/unittest/time/clock/time_clock_test.cpp @@ -133,7 +133,9 @@ HWTEST_F(TimeClockTest, ClockTest009, TestSize.Level0) { ClockTest009(); } +#endif +#if defined(LOSCFG_USER_TEST_FULL) /* * * @tc.name: ClockTest010 * @tc.desc: function for TimeClockTest diff --git a/testsuites/unittest/time/timer/BUILD.gn b/testsuites/unittest/time/timer/BUILD.gn index 02596b9f..03e60a0d 100644 --- a/testsuites/unittest/time/timer/BUILD.gn +++ b/testsuites/unittest/time/timer/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../../config.gni") unittest("liteos_a_time_timer_unittest") { output_extension = "bin" @@ -36,16 +37,24 @@ unittest("liteos_a_time_timer_unittest") { "../../common/include", "../../time/timer", ] + sources = [ "../../common/osTest.cpp", - "smoke/timer_test_001.cpp", - "smoke/timer_test_002.cpp", - "smoke/timer_test_003.cpp", - "smoke/timer_test_004.cpp", - "smoke/timer_test_tzset_001.cpp", - "smoke/timer_test_tzset_002.cpp", "time_timer_test.cpp", ] + + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/timer_test_001.cpp", + "smoke/timer_test_002.cpp", + "smoke/timer_test_003.cpp", + "smoke/timer_test_004.cpp", + "smoke/timer_test_tzset_001.cpp", + "smoke/timer_test_tzset_002.cpp", + ] + sources += sources_smoke + } + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "../../../unittest:public_config" ] } diff --git a/testsuites/unittest/time/timer/time_timer_test.cpp b/testsuites/unittest/time/timer/time_timer_test.cpp index d25aaa3b..d57d908d 100644 --- a/testsuites/unittest/time/timer/time_timer_test.cpp +++ b/testsuites/unittest/time/timer/time_timer_test.cpp @@ -82,10 +82,10 @@ HWTEST_F(TimeTimerTest, TimerTest003, TestSize.Level0) * @tc.type: FUNC * @tc.require: AR000EEMQ9 */ -/* HWTEST_F(TimeTimerTest, TimerTest004, TestSize.Level0) +/*HWTEST_F(TimeTimerTest, TimerTest004, TestSize.Level0) { - TimerTest004(); -} */ + TimerTest004(); // bug: musl sigaction handler have only one param. +}*/ #endif } // namespace OHOS diff --git a/testsuites/unittest/util/BUILD.gn b/testsuites/unittest/util/BUILD.gn index 5b413271..244b5706 100644 --- a/testsuites/unittest/util/BUILD.gn +++ b/testsuites/unittest/util/BUILD.gn @@ -28,6 +28,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import("//build/lite/config/test.gni") +import("../config.gni") unittest("liteos_a_util_unittest") { output_extension = "bin" @@ -37,19 +38,27 @@ unittest("liteos_a_util_unittest") { "./", "../misc", ] + sources = [ "../common/osTest.cpp", - "full/it_test_util_100.cpp", - "full/it_test_util_101.cpp", - "full/util_test_001.cpp", - "full/util_test_002.cpp", - "full/util_test_003.cpp", - "full/util_test_004.cpp", - "full/util_test_005.cpp", - "full/util_test_006.cpp", - "full/util_test_007.cpp", "util_test.cpp", ] + + if (LOSCFG_USER_TEST_SMOKE == true) { + sources_smoke = [ + "smoke/it_test_util_100.cpp", + "smoke/it_test_util_101.cpp", + "smoke/util_test_001.cpp", + "smoke/util_test_002.cpp", + "smoke/util_test_003.cpp", + "smoke/util_test_004.cpp", + "smoke/util_test_005.cpp", + "smoke/util_test_006.cpp", + "smoke/util_test_007.cpp", + ] + sources += sources_smoke + } + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] configs = [ "../../unittest:public_config" ] } diff --git a/testsuites/unittest/util/full/it_test_util_100.cpp b/testsuites/unittest/util/smoke/it_test_util_100.cpp similarity index 100% rename from testsuites/unittest/util/full/it_test_util_100.cpp rename to testsuites/unittest/util/smoke/it_test_util_100.cpp diff --git a/testsuites/unittest/util/full/it_test_util_101.cpp b/testsuites/unittest/util/smoke/it_test_util_101.cpp similarity index 100% rename from testsuites/unittest/util/full/it_test_util_101.cpp rename to testsuites/unittest/util/smoke/it_test_util_101.cpp diff --git a/testsuites/unittest/util/full/util_test_001.cpp b/testsuites/unittest/util/smoke/util_test_001.cpp similarity index 100% rename from testsuites/unittest/util/full/util_test_001.cpp rename to testsuites/unittest/util/smoke/util_test_001.cpp diff --git a/testsuites/unittest/util/full/util_test_002.cpp b/testsuites/unittest/util/smoke/util_test_002.cpp similarity index 100% rename from testsuites/unittest/util/full/util_test_002.cpp rename to testsuites/unittest/util/smoke/util_test_002.cpp diff --git a/testsuites/unittest/util/full/util_test_003.cpp b/testsuites/unittest/util/smoke/util_test_003.cpp similarity index 100% rename from testsuites/unittest/util/full/util_test_003.cpp rename to testsuites/unittest/util/smoke/util_test_003.cpp diff --git a/testsuites/unittest/util/full/util_test_004.cpp b/testsuites/unittest/util/smoke/util_test_004.cpp similarity index 100% rename from testsuites/unittest/util/full/util_test_004.cpp rename to testsuites/unittest/util/smoke/util_test_004.cpp diff --git a/testsuites/unittest/util/full/util_test_005.cpp b/testsuites/unittest/util/smoke/util_test_005.cpp similarity index 100% rename from testsuites/unittest/util/full/util_test_005.cpp rename to testsuites/unittest/util/smoke/util_test_005.cpp diff --git a/testsuites/unittest/util/full/util_test_006.cpp b/testsuites/unittest/util/smoke/util_test_006.cpp similarity index 100% rename from testsuites/unittest/util/full/util_test_006.cpp rename to testsuites/unittest/util/smoke/util_test_006.cpp diff --git a/testsuites/unittest/util/full/util_test_007.cpp b/testsuites/unittest/util/smoke/util_test_007.cpp similarity index 100% rename from testsuites/unittest/util/full/util_test_007.cpp rename to testsuites/unittest/util/smoke/util_test_007.cpp diff --git a/testsuites/unittest/util/util_test.cpp b/testsuites/unittest/util/util_test.cpp index 5f87e7bf..3a21c281 100644 --- a/testsuites/unittest/util/util_test.cpp +++ b/testsuites/unittest/util/util_test.cpp @@ -41,7 +41,7 @@ public: static void TearDownTestCase(void) {} }; -#if defined(LOSCFG_USER_TEST_FULL) +#if defined(LOSCFG_USER_TEST_SMOKE) /* * * @tc.name: IT_TEST_UTIL_001 * @tc.desc: function for UtilTest From 04bcb11c3cebbac2080fe8cf2e6bfc8cd46e53ce Mon Sep 17 00:00:00 2001 From: mucor Date: Fri, 30 Apr 2021 15:11:51 +0800 Subject: [PATCH 11/36] fix:add vnode destory for unregister dev node Change-Id: I2205bbf42e7c2339f81443ace6924b12f4fa1c09 --- fs/include/fs/vnode.h | 1 + fs/vfs/vnode.c | 38 +++++++++++++++++++++++++++----------- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/fs/include/fs/vnode.h b/fs/include/fs/vnode.h index cc95765d..0312b5ea 100644 --- a/fs/include/fs/vnode.h +++ b/fs/include/fs/vnode.h @@ -121,5 +121,6 @@ void ChangeRoot(struct Vnode *newRoot); BOOL VnodeInUseIter(const struct Mount *mount); struct Vnode *VnodeGetRoot(void); void VnodeMemoryDump(void); +int VnodeDestory(struct Vnode *vnode); #endif /* !_VNODE_H_ */ diff --git a/fs/vfs/vnode.c b/fs/vfs/vnode.c index 8aafb1f5..fd72631f 100644 --- a/fs/vfs/vnode.c +++ b/fs/vfs/vnode.c @@ -168,29 +168,21 @@ int VnodeFree(struct Vnode *vnode) if (vnode == NULL) { return LOS_OK; } - struct PathCache *item = NULL; - struct PathCache *nextItem = NULL; VnodeHold(); if (vnode->useCount > 0) { VnodeDrop(); return -EBUSY; } - LOS_DL_LIST_FOR_EACH_ENTRY_SAFE(item, nextItem, &vnode->childPathCaches, struct PathCache, childEntry) { - PathCacheFree(item); - } - - LOS_DL_LIST_FOR_EACH_ENTRY_SAFE(item, nextItem, &vnode->parentPathCaches, struct PathCache, parentEntry) { - PathCacheFree(item); - } + VnodePathCacheFree(vnode); LOS_ListDelete(&(vnode->hashEntry)); + LOS_ListDelete(&vnode->actFreeEntry); if (vnode->vop->Reclaim) { vnode->vop->Reclaim(vnode); } - LOS_ListDelete(&vnode->actFreeEntry); memset_s(vnode, sizeof(struct Vnode), 0, sizeof(struct Vnode)); LOS_ListAdd(&g_vnodeFreeList, &vnode->actFreeEntry); @@ -629,4 +621,28 @@ void VnodeMemoryDump(void) PRINTK("Vnode number = %d\n", vnodeCount); PRINTK("Vnode memory size = %d(B)\n", vnodeCount * sizeof(struct Vnode)); -} \ No newline at end of file +} + +int VnodeDestory(struct Vnode *vnode) +{ + if (vnode == NULL || vnode->vop != &g_devfsOps) { + /* destory only support dev vnode */ + return -EINVAL; + } + + VnodeHold(); + if (vnode->useCount > 0) { + VnodeDrop(); + return -EBUSY; + } + + VnodePathCacheFree(vnode); + LOS_ListDelete(&(vnode->hashEntry)); + LOS_ListDelete(&vnode->actFreeEntry); + + free(vnode->data); + free(vnode); + VnodeDrop(); + + return LOS_OK; +} From 4e24b572897c33e1b2723122c0e13d3931096bae Mon Sep 17 00:00:00 2001 From: boxi Date: Fri, 30 Apr 2021 11:33:42 +0800 Subject: [PATCH 12/36] fix: Optimize /dev/quickstart permissions. Optimize /dev/quickstart permissions. Close #I3OYUQ Change-Id: Ie2847efeb5dddf2bbea0251cca39bb7cb973e3f6 --- .../quickstart/include/los_dev_quickstart.h | 7 ++- drivers/char/quickstart/src/quickstart.c | 47 ++++++++++++++----- 2 files changed, 40 insertions(+), 14 deletions(-) diff --git a/drivers/char/quickstart/include/los_dev_quickstart.h b/drivers/char/quickstart/include/los_dev_quickstart.h index 16b514dc..de393762 100644 --- a/drivers/char/quickstart/include/los_dev_quickstart.h +++ b/drivers/char/quickstart/include/los_dev_quickstart.h @@ -55,10 +55,15 @@ typedef enum { QS_CTL_LIMIT } QuickstartConctrl; +typedef struct { + unsigned int pid; + unsigned int events; +} QuickstartMask; + #define QUICKSTART_IOC_MAGIC 'T' #define QUICKSTART_UNREGISTER _IO(QUICKSTART_IOC_MAGIC, QS_UNREGISTER) #define QUICKSTART_NOTIFY _IO(QUICKSTART_IOC_MAGIC, QS_NOTIFY) -#define QUICKSTART_LISTEN _IO(QUICKSTART_IOC_MAGIC, QS_LISTEN) +#define QUICKSTART_LISTEN _IOR(QUICKSTART_IOC_MAGIC, QS_LISTEN, QuickstartMask) #define QUICKSTART_STAGE(x) _IO(QUICKSTART_IOC_MAGIC, (x)) #define QUICKSTART_NODE "/dev/quickstart" diff --git a/drivers/char/quickstart/src/quickstart.c b/drivers/char/quickstart/src/quickstart.c index 4e955842..2c023402 100644 --- a/drivers/char/quickstart/src/quickstart.c +++ b/drivers/char/quickstart/src/quickstart.c @@ -49,14 +49,34 @@ static int QuickstartClose(struct file *filep) return 0; } -static void QuickstartNotify(unsigned int events) +static int QuickstartNotify(unsigned int events) { - LOS_EventWrite((PEVENT_CB_S)&g_qsEvent, events); + unsigned int pid = LOS_GetCurrProcessID(); + /* 16:low 16 bits for eventMask, high 16 bits for pid */ + unsigned int notifyEvent = (pid << 16) | events; + int ret = LOS_EventWrite((PEVENT_CB_S)&g_qsEvent, notifyEvent); + if (ret != 0) { + PRINT_ERR("%s,%d:0x%x\n", __FUNCTION__, __LINE__, ret); + ret = -EINVAL; + } + return ret; } -static void QuickstartListen(unsigned int eventMask) +static int QuickstartListen(unsigned long arg) { - LOS_EventRead((PEVENT_CB_S)&g_qsEvent, eventMask, LOS_WAITMODE_AND | LOS_WAITMODE_CLR, LOS_WAIT_FOREVER); + QuickstartMask listenMask; + if (copy_from_user(&listenMask, (struct QuickstartMask __user *)arg, sizeof(QuickstartMask)) != LOS_OK) { + PRINT_ERR("%s,%d\n", __FUNCTION__, __LINE__); + return -EINVAL; + } + /* 16:low 16 bits for eventMask, high 16 bits for pid */ + unsigned int mask = (listenMask.pid << 16) | listenMask.events; + int ret = LOS_EventRead((PEVENT_CB_S)&g_qsEvent, mask, LOS_WAITMODE_AND | LOS_WAITMODE_CLR, LOS_WAIT_FOREVER); + if (ret != 0) { + PRINT_ERR("%s,%d:0x%x\n", __FUNCTION__, __LINE__, ret); + ret = -EINVAL; + } + return ret; } void QuickstartHookRegister(LosSysteminitHook hooks) @@ -66,7 +86,7 @@ void QuickstartHookRegister(LosSysteminitHook hooks) } } -static void QuickstartStageWorking(unsigned int level) +static int QuickstartStageWorking(unsigned int level) { if ((level < QS_STAGE_CNT) && (g_callOnce[level] == 0) && (g_systemInitFunc[level] != NULL)) { g_callOnce[level] = 1; /* 1: Already called */ @@ -74,6 +94,7 @@ static void QuickstartStageWorking(unsigned int level) } else { PRINT_WARN("Trigger quickstart,but doing nothing!!\n"); } + return 0; } static int QuickstartDevUnregister(void) @@ -83,27 +104,27 @@ static int QuickstartDevUnregister(void) static ssize_t QuickstartIoctl(struct file *filep, int cmd, unsigned long arg) { + ssize_t ret; if (cmd == QUICKSTART_NOTIFY) { - QuickstartNotify(arg); - return 0; + return QuickstartNotify(arg); } if (OsGetUserInitProcessID() != LOS_GetCurrProcessID()) { PRINT_ERR("Permission denios!\n"); - return -1; + return -EACCES; } switch (cmd) { case QUICKSTART_UNREGISTER: - QuickstartDevUnregister(); + ret = QuickstartDevUnregister(); break; case QUICKSTART_LISTEN: - QuickstartListen(arg); + ret = QuickstartListen(arg); break; default: - QuickstartStageWorking(cmd - QUICKSTART_STAGE(QS_STAGE1)); /* ioctl cmd converted to stage level */ + ret = QuickstartStageWorking(cmd - QUICKSTART_STAGE(QS_STAGE1)); /* ioctl cmd converted to stage level */ break; } - return 0; + return ret; } static const struct file_operations_vfs g_quickstartDevOps = { @@ -123,6 +144,6 @@ static const struct file_operations_vfs g_quickstartDevOps = { int QuickstartDevRegister(void) { LOS_EventInit(&g_qsEvent); - return register_driver(QUICKSTART_NODE, &g_quickstartDevOps, 0666, 0); /* 0666: file mode */ + return register_driver(QUICKSTART_NODE, &g_quickstartDevOps, 0644, 0); /* 0644: file mode */ } From 1323874389030c55fb053fead12ca1c6654d8851 Mon Sep 17 00:00:00 2001 From: zhushengle Date: Thu, 6 May 2021 11:00:44 +0800 Subject: [PATCH 13/36] fix: Sortlink, the response time to insert the node should be inserted into the back of the existing node. Close #I3PSJ8 Change-Id: Ib630ba4febbc21d4f25af0961f5c996eadf4e054 --- kernel/base/core/los_sortlink.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/base/core/los_sortlink.c b/kernel/base/core/los_sortlink.c index bca4e570..8a997e50 100644 --- a/kernel/base/core/los_sortlink.c +++ b/kernel/base/core/los_sortlink.c @@ -55,10 +55,14 @@ STATIC INLINE VOID OsAddNode2SortLink(SortLinkAttribute *sortLinkHeader, SortLin } SortLinkList *listSorted = LOS_DL_LIST_ENTRY(head->pstNext, SortLinkList, sortLinkNode); - if (listSorted->responseTime >= sortList->responseTime) { + if (listSorted->responseTime > sortList->responseTime) { LOS_ListAdd(head, &sortList->sortLinkNode); sortLinkHeader->nodeNum++; return; + } else if (listSorted->responseTime == sortList->responseTime) { + LOS_ListAdd(head->pstNext, &sortList->sortLinkNode); + sortLinkHeader->nodeNum++; + return; } LOS_DL_LIST *prevNode = head->pstPrev; From 0e0ab81ff9474cffd5e60a8ee741840eac5d737b Mon Sep 17 00:00:00 2001 From: boxi Date: Thu, 6 May 2021 11:09:04 +0800 Subject: [PATCH 14/36] fix: Correctly handle the return value of LOS_EventRead in QuickstartListen. Correctly handle the return value of LOS_EventRead in QuickstartListen. Close #I3PSLZ Change-Id: I7b9ab9aa0542b6072dcbe8fa78924125b95c6434 --- drivers/char/quickstart/src/quickstart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/quickstart/src/quickstart.c b/drivers/char/quickstart/src/quickstart.c index 2c023402..22451f87 100644 --- a/drivers/char/quickstart/src/quickstart.c +++ b/drivers/char/quickstart/src/quickstart.c @@ -72,7 +72,7 @@ static int QuickstartListen(unsigned long arg) /* 16:low 16 bits for eventMask, high 16 bits for pid */ unsigned int mask = (listenMask.pid << 16) | listenMask.events; int ret = LOS_EventRead((PEVENT_CB_S)&g_qsEvent, mask, LOS_WAITMODE_AND | LOS_WAITMODE_CLR, LOS_WAIT_FOREVER); - if (ret != 0) { + if (ret != mask) { PRINT_ERR("%s,%d:0x%x\n", __FUNCTION__, __LINE__, ret); ret = -EINVAL; } From d846035f3e7d2dae973d31e373bfb66b09782709 Mon Sep 17 00:00:00 2001 From: YOUR_NAME Date: Thu, 29 Apr 2021 16:04:33 +0800 Subject: [PATCH 15/36] feature:the feature of saving system exception information to the storage medium is separated from the shell module. Change-Id: Id56939001d70bb92d9cc02bd7c9f55ca8b61cf5b --- Kconfig | 7 ++++ arch/arm/arm/src/los_exc.c | 39 +++++++++++++----- kernel/base/misc/mempt_shellcmd.c | 12 +++--- kernel/base/misc/task_shellcmd.c | 2 +- kernel/common/los_config.h | 2 +- kernel/common/los_excinfo.c | 33 +++++++++++++++- kernel/common/los_excinfo_pri.h | 2 +- kernel/common/los_printf.c | 4 +- shell/Kconfig | 7 ---- shell/full/src/cmds/excinfo_shell.c | 61 ----------------------------- 10 files changed, 79 insertions(+), 90 deletions(-) delete mode 100644 shell/full/src/cmds/excinfo_shell.c diff --git a/Kconfig b/Kconfig index ccf86320..fbf80924 100644 --- a/Kconfig +++ b/Kconfig @@ -165,6 +165,7 @@ config THUMB default n help Answer Y to build thumb version. This will make LiteOS smaller. + config PLATFORM_DVFS bool "Enable Dvfs" default n @@ -173,6 +174,12 @@ config PLATFORM_DVFS Answer Y to enable LiteOS support dynamic voltage and frequency scaling feature for low power consumption. +config SAVE_EXCINFO + bool "Enable Saving Exception Information" + default n + help + Answer Y to enable LiteOS support saving exception information to storage medium. + config DEBUG_VERSION bool "Enable a Debug Version" default n diff --git a/arch/arm/arm/src/los_exc.c b/arch/arm/arm/src/los_exc.c index dd94396d..7b047fcd 100644 --- a/arch/arm/arm/src/los_exc.c +++ b/arch/arm/arm/src/los_exc.c @@ -34,7 +34,7 @@ #include "los_printf_pri.h" #include "los_task_pri.h" #include "los_hw_pri.h" -#ifdef LOSCFG_SHELL_EXCINFO +#ifdef LOSCFG_SAVE_EXCINFO #include "los_excinfo_pri.h" #endif #ifdef LOSCFG_EXC_INTERACTION @@ -576,7 +576,7 @@ STATIC VOID OsUserExcHandle(ExcContext *excBufAddr) #endif #endif -#ifdef LOSCFG_SHELL_EXCINFO +#ifdef LOSCFG_SAVE_EXCINFO OsProcessExitCodeCoreDumpSet(runProcess); #endif OsProcessExitCodeSignalSet(runProcess, SIGUSR2); @@ -1086,6 +1086,22 @@ LITE_OS_SEC_TEXT_INIT STATIC VOID OsPrintExcHead(UINT32 far) } } +#ifdef LOSCFG_SAVE_EXCINFO +STATIC VOID OsSysStateSave(UINT32 *intCount, UINT32 *lockCount) +{ + *intCount = g_intCount[ArchCurrCpuid()]; + *lockCount = OsPercpuGet()->taskLockCnt; + g_intCount[ArchCurrCpuid()] = 0; + OsPercpuGet()->taskLockCnt = 0; +} + +STATIC VOID OsSysStateRestore(UINT32 intCount, UINT32 lockCount) +{ + g_intCount[ArchCurrCpuid()] = intCount; + OsPercpuGet()->taskLockCnt = lockCount; +} +#endif + /* * Description : EXC handler entry * Input : excType --- exc type @@ -1093,6 +1109,11 @@ LITE_OS_SEC_TEXT_INIT STATIC VOID OsPrintExcHead(UINT32 far) */ LITE_OS_SEC_TEXT_INIT VOID OsExcHandleEntry(UINT32 excType, ExcContext *excBufAddr, UINT32 far, UINT32 fsr) { +#ifdef LOSCFG_SAVE_EXCINFO + UINT32 intCount; + UINT32 lockCount; +#endif + /* Task scheduling is not allowed during exception handling */ OsPercpuGet()->taskLockCnt++; @@ -1106,18 +1127,18 @@ LITE_OS_SEC_TEXT_INIT VOID OsExcHandleEntry(UINT32 excType, ExcContext *excBufAd OsAllCpuStatusOutput(); #endif -#ifdef LOSCFG_SHELL_EXCINFO +#ifdef LOSCFG_SAVE_EXCINFO log_read_write_fn func = GetExcInfoRW(); #endif if (g_excHook != NULL) { if (g_curNestCount[ArchCurrCpuid()] == 1) { -#ifdef LOSCFG_SHELL_EXCINFO +#ifdef LOSCFG_SAVE_EXCINFO if (func != NULL) { SetExcInfoIndex(0); - g_intCount[ArchCurrCpuid()] = 0; + OsSysStateSave(&intCount, &lockCount); OsRecordExcInfoTime(); - g_intCount[ArchCurrCpuid()] = 1; + OsSysStateRestore(intCount, lockCount); } #endif g_excHook(excType, excBufAddr, far, fsr); @@ -1125,12 +1146,12 @@ LITE_OS_SEC_TEXT_INIT VOID OsExcHandleEntry(UINT32 excType, ExcContext *excBufAd OsCallStackInfo(); } -#ifdef LOSCFG_SHELL_EXCINFO +#ifdef LOSCFG_SAVE_EXCINFO if (func != NULL) { PrintExcInfo("Be sure flash space bigger than GetExcInfoIndex():0x%x\n", GetExcInfoIndex()); - g_intCount[ArchCurrCpuid()] = 0; + OsSysStateSave(&intCount, &lockCount); func(GetRecordAddr(), GetRecordSpace(), 0, GetExcInfoBuf()); - g_intCount[ArchCurrCpuid()] = 1; + OsSysStateRestore(intCount, lockCount); } #endif } diff --git a/kernel/base/misc/mempt_shellcmd.c b/kernel/base/misc/mempt_shellcmd.c index 50322068..333d5b28 100644 --- a/kernel/base/misc/mempt_shellcmd.c +++ b/kernel/base/misc/mempt_shellcmd.c @@ -31,7 +31,7 @@ #include "stdlib.h" #include "los_memory_pri.h" -#ifdef LOSCFG_SHELL_EXCINFO +#ifdef LOSCFG_SAVE_EXCINFO #include "los_excinfo_pri.h" #endif #ifdef LOSCFG_SHELL @@ -64,7 +64,7 @@ VOID OsDumpMemByte(size_t length, UINTPTR addr) while (dataLen) { if (IS_ALIGNED(count, sizeof(CHAR *))) { PRINTK("\n 0x%lx :", alignAddr); -#ifdef LOSCFG_SHELL_EXCINFO +#ifdef LOSCFG_SAVE_EXCINFO WriteExcInfoToBuf("\n 0x%lx :", alignAddr); #endif } @@ -73,7 +73,7 @@ VOID OsDumpMemByte(size_t length, UINTPTR addr) #else PRINTK("%0+8lx ", *alignAddr); #endif -#ifdef LOSCFG_SHELL_EXCINFO +#ifdef LOSCFG_SAVE_EXCINFO #ifdef __LP64__ WriteExcInfoToBuf("0x%0+16x ", *alignAddr); #else @@ -85,7 +85,7 @@ VOID OsDumpMemByte(size_t length, UINTPTR addr) count++; } PRINTK("\n"); -#ifdef LOSCFG_SHELL_EXCINFO +#ifdef LOSCFG_SAVE_EXCINFO WriteExcInfoToBuf("\n"); #endif @@ -101,14 +101,14 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsShellCmdMemCheck(INT32 argc, const CHAR *argv[]) if (LOS_MemIntegrityCheck(m_aucSysMem1) == LOS_OK) { PRINTK("system memcheck over, all passed!\n"); -#ifdef LOSCFG_SHELL_EXCINFO +#ifdef LOSCFG_SAVE_EXCINFO WriteExcInfoToBuf("system memcheck over, all passed!\n"); #endif } #ifdef LOSCFG_EXC_INTERACTION if (LOS_MemIntegrityCheck(m_aucSysMem0) == LOS_OK) { PRINTK("exc interaction memcheck over, all passed!\n"); -#ifdef LOSCFG_SHELL_EXCINFO +#ifdef LOSCFG_SAVE_EXCINFO WriteExcInfoToBuf("exc interaction memcheck over, all passed!\n"); #endif } diff --git a/kernel/base/misc/task_shellcmd.c b/kernel/base/misc/task_shellcmd.c index 7c918e1c..49671f7d 100644 --- a/kernel/base/misc/task_shellcmd.c +++ b/kernel/base/misc/task_shellcmd.c @@ -43,7 +43,7 @@ #ifdef LOSCFG_KERNEL_CPUP #include "los_cpup_pri.h" #endif -#ifdef LOSCFG_SHELL_EXCINFO +#ifdef LOSCFG_SAVE_EXCINFO #include "los_excinfo_pri.h" #endif #include "los_process_pri.h" diff --git a/kernel/common/los_config.h b/kernel/common/los_config.h index a59581c1..7b9cb0ad 100644 --- a/kernel/common/los_config.h +++ b/kernel/common/los_config.h @@ -398,7 +398,7 @@ extern UINT32 __heap_end; #endif /****************************** exception information configuration ******************************/ -#ifdef LOSCFG_SHELL_EXCINFO +#ifdef LOSCFG_SAVE_EXCINFO /** * @ingroup los_config * the size of space for recording exception information diff --git a/kernel/common/los_excinfo.c b/kernel/common/los_excinfo.c index 422600a2..92ec6404 100644 --- a/kernel/common/los_excinfo.c +++ b/kernel/common/los_excinfo.c @@ -34,9 +34,11 @@ #ifdef LOSCFG_FS_VFS #include "fs/fs.h" #endif +#ifdef LOSCFG_SHELL +#include "shcmd.h" +#endif - -#ifdef LOSCFG_SHELL_EXCINFO +#ifdef LOSCFG_SAVE_EXCINFO STATIC log_read_write_fn g_excInfoRW = NULL; /* the hook of read-writing exception information */ STATIC CHAR *g_excInfoBuf = NULL; /* pointer to the buffer for storing the exception information */ STATIC UINT32 g_excInfoIndex = 0xFFFFFFFF; /* the index of the buffer for storing the exception information */ @@ -164,5 +166,32 @@ VOID OsRecordExcInfoTime(VOID) #endif } +#ifdef LOSCFG_SHELL +INT32 OsShellCmdReadExcInfo(INT32 argc, CHAR **argv) +{ + UINT32 recordSpace = GetRecordSpace(); + + (VOID)argc; + (VOID)argv; + + CHAR *buf = (CHAR*)LOS_MemAlloc((void *)OS_SYS_MEM_ADDR, recordSpace + 1); + if (buf == NULL) { + return LOS_NOK; + } + (void)memset_s(buf, recordSpace + 1, 0, recordSpace + 1); + + log_read_write_fn hook = GetExcInfoRW(); + if (hook != NULL) { + hook(GetRecordAddr(), recordSpace, 1, buf); + } + PRINTK("%s\n", buf); + (VOID)LOS_MemFree((void *)OS_SYS_MEM_ADDR, buf); + buf = NULL; + return LOS_OK; +} + +SHELLCMD_ENTRY(readExcInfo_shellcmd, CMD_TYPE_EX, "excInfo", 0, (CmdCallBackFunc)OsShellCmdReadExcInfo); +#endif + #endif diff --git a/kernel/common/los_excinfo_pri.h b/kernel/common/los_excinfo_pri.h index 24f0d043..ba68d5f4 100644 --- a/kernel/common/los_excinfo_pri.h +++ b/kernel/common/los_excinfo_pri.h @@ -40,7 +40,7 @@ extern "C" { #endif /* __cplusplus */ #endif /* __cplusplus */ -#ifdef LOSCFG_SHELL_EXCINFO +#ifdef LOSCFG_SAVE_EXCINFO extern VOID SetExcInfoRW(log_read_write_fn func); extern log_read_write_fn GetExcInfoRW(VOID); extern VOID SetExcInfoBuf(CHAR *buf); diff --git a/kernel/common/los_printf.c b/kernel/common/los_printf.c index 567348ff..b5d2a002 100644 --- a/kernel/common/los_printf.c +++ b/kernel/common/los_printf.c @@ -42,7 +42,7 @@ #ifdef LOSCFG_SHELL_DMESG #include "dmesg_pri.h" #endif -#ifdef LOSCFG_SHELL_EXCINFO +#ifdef LOSCFG_SAVE_EXCINFO #include "los_excinfo_pri.h" #endif #include "los_exc_pri.h" @@ -250,7 +250,7 @@ VOID PrintExcInfo(const CHAR *fmt, ...) va_start(ap, fmt); /* uart output without print-spinlock */ OsVprintf(fmt, ap, EXC_OUTPUT); -#ifdef LOSCFG_SHELL_EXCINFO +#ifdef LOSCFG_SAVE_EXCINFO WriteExcBufVa(fmt, ap); #endif va_end(ap); diff --git a/shell/Kconfig b/shell/Kconfig index b37c5918..641c740a 100644 --- a/shell/Kconfig +++ b/shell/Kconfig @@ -22,11 +22,4 @@ config SHELL_DMESG help Answer Y to enable LiteOS support shell dmesg. -config SHELL_EXCINFO - bool "Enable Shell excInfo" - default n - depends on DEBUG_VERSION && SHELL - help - Answer Y to enable LiteOS support shell excInfo. - endmenu diff --git a/shell/full/src/cmds/excinfo_shell.c b/shell/full/src/cmds/excinfo_shell.c deleted file mode 100644 index 85f3959c..00000000 --- a/shell/full/src/cmds/excinfo_shell.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. - * Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * 3. Neither the name of the copyright holder nor the names of its contributors may be used - * to endorse or promote products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "shcmd.h" -#include "los_memory.h" -#ifdef LOSCFG_SHELL_EXCINFO -#include "los_excinfo_pri.h" - - -INT32 osShellCmdReadExcInfo(INT32 argc, CHAR **argv) -{ - UINT32 recordSpace = GetRecordSpace(); - - (VOID)argc; - (VOID)argv; - - CHAR *buf = (CHAR*)LOS_MemAlloc((void *)OS_SYS_MEM_ADDR, recordSpace + 1); - if (buf == NULL) { - return LOS_NOK; - } - (void)memset_s(buf, recordSpace + 1, 0, recordSpace + 1); - - log_read_write_fn hook = GetExcInfoRW(); - if (hook != NULL) { - hook(GetRecordAddr(), recordSpace, 1, buf); - } - PRINTK("%s\n", buf); - (VOID)LOS_MemFree((void *)OS_SYS_MEM_ADDR, buf); - buf = NULL; - return LOS_OK; -} -SHELLCMD_ENTRY(readExcInfo_shellcmd, CMD_TYPE_EX, "excInfo", 0, (CmdCallBackFunc)osShellCmdReadExcInfo); -#endif From 41c7689dfa49c52fb15705ce15ef22a278fbf2ef Mon Sep 17 00:00:00 2001 From: Guangyao Ma Date: Fri, 9 Apr 2021 16:53:10 +0800 Subject: [PATCH 16/36] feat: introduce mksh toybox to rootfs Change-Id: I0a6e6f2962ca6904c858898eb93a5b2f93e85b69 --- apps/Makefile | 5 +- apps/config.mk | 6 +- apps/init/src/init.c | 7 +- apps/mksh/Makefile | 67 +++++++++ apps/module.mk | 8 +- apps/shell/src/shmsg.c | 5 + apps/toybox/Makefile | 59 ++++++++ kernel/common/console.c | 141 ++++++++++++++---- kernel/common/console.h | 4 +- kernel/common/los_magickey.c | 14 +- .../config/qemu_arm_virt_debug_shell.config | 2 +- tools/build/mk/los_config.mk | 2 + 12 files changed, 283 insertions(+), 37 deletions(-) create mode 100755 apps/mksh/Makefile create mode 100644 apps/toybox/Makefile diff --git a/apps/Makefile b/apps/Makefile index 631b955c..e2254341 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -27,7 +27,10 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -include ../.config +LITEOSTOPDIR = $(shell pwd)/../ + +include $(LITEOSTOPDIR)/.config +include ./config.mk include ./module.mk HIDE := @ diff --git a/apps/config.mk b/apps/config.mk index 5f6efe06..6f08d019 100644 --- a/apps/config.mk +++ b/apps/config.mk @@ -55,6 +55,6 @@ COMMON_INCLUDE := -I $(LITEOSTHIRDPARTY)/bounds_checking_function/include # alias variable config HIDE := @ MAKE := make -RM := -rm -rf -CP := -cp -rf -MV := -mv +RM := rm -rf +CP := cp -rf +MV := mv -f diff --git a/apps/init/src/init.c b/apps/init/src/init.c index 7cab38a8..c13f24a2 100644 --- a/apps/init/src/init.c +++ b/apps/init/src/init.c @@ -49,7 +49,7 @@ int main(int argc, char * const *argv) { int ret; - const char *shellPath = "/bin/shell"; + const char *shellPath = "/bin/mksh"; #ifdef LOSCFG_QUICK_START const char *samplePath = "/dev/shm/sample_quickstart"; @@ -74,6 +74,11 @@ int main(int argc, char * const *argv) if (ret < 0) { printf("Failed to fork for shell\n"); } else if (ret == 0) { + ret = tcsetpgrp(STDIN_FILENO, getpgrp()); + if (ret != 0) { + printf("tcsetpgrp failed, pgrpid %d, errno %d\n", getpgrp(), errno); + exit(0); + } (void)execve(shellPath, NULL, NULL); exit(0); } diff --git a/apps/mksh/Makefile b/apps/mksh/Makefile new file mode 100755 index 00000000..a468a046 --- /dev/null +++ b/apps/mksh/Makefile @@ -0,0 +1,67 @@ +# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. +# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, +# are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this list of +# conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, this list +# of conditions and the following disclaimer in the documentation and/or other materials +# provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its contributors may be used +# to endorse or promote products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +MKSH := mksh + +MKSH_DIR := $(shell pwd)/ +LITEOSTOPDIR = $(MKSH_DIR)/../../ +include $(MKSH_DIR)/../config.mk + +APPS_OUT := $(OUT)/bin +BUILD_DIR := $(MKSH_DIR)/build +BUILD_LOG := $(MKSH_DIR)/build.log +TARGET_OS := OpenHarmony + +LOCAL_CFLAGS := -flto -fdata-sections -ffunction-sections -Oz -fstack-protector-strong -D_FORTIFY_SOURCE=2 -mcpu=cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 +LOCAL_CFLAGS += --target=arm-liteos --sysroot=$(LITEOSTOPDIR)/../../prebuilts/lite/sysroot/ +LOCAL_CFLAGS += -DMKSH_DISABLE_TTY_WARNING -DMKSH_SMALL=1 -DMKSH_ASSUME_UTF8=1 -DMKSH_SMALL_BUT_FAST=0 -DMKSH_S_NOVI=1 -DHAVE_CAN_FSTACKPROTECTORSTRONG=1 +LOCAL_CFLAGS += -DMKSH_LESS_CMDLINE_EDITING -DMKSH_LESS_BUILDINS -DMKSH_NO_INITCOMS -DADAPT_FOR_LITEOS_A + +all:$(MKSH) + +$(MKSH): +ifneq ($(wildcard $(BUILD_DIR)),) + $(HIDE)echo "not clean, rebuilding now" + $(HIDE)chmod +x $(BUILD_DIR)/Rebuild.sh + $(HIDE)cd $(BUILD_DIR) && ./Rebuild.sh > $(BUILD_LOG) 2>&1 +else + $(HIDE)mkdir $(BUILD_DIR) + $(HIDE)$(CP) $(LITEOSTHIRDPARTY)/$(MKSH)/. $(BUILD_DIR) + $(HIDE)chmod +x $(BUILD_DIR)/Build.sh + $(HIDE)cd $(BUILD_DIR) && CC=$(CC) TARGET_OS=$(TARGET_OS) CFLAGS="$(LOCAL_CFLAGS)" LDFLAGS="$(LDFLAGS)" ./Build.sh -r > $(BUILD_LOG) 2>&1 +endif + $(HIDE)$(CP) -rf $(BUILD_DIR)/$(MKSH) . + $(HIDE)$(STRIP) $(MKSH) + $(HIDE)mkdir -p $(APPS_OUT) + $(HIDE)$(CP) $(MKSH) $(APPS_OUT) + +clean: + $(HIDE)$(RM) $(MKSH) $(BUILD_DIR) $(BUILD_LOG) + +.PHONY: all $(MKSH) clean diff --git a/apps/module.mk b/apps/module.mk index 520f3393..e2d014d6 100644 --- a/apps/module.mk +++ b/apps/module.mk @@ -29,7 +29,7 @@ APP_SUBDIRS := -##compile modules config## +##build modules config## ifeq ($(LOSCFG_SHELL), y) APP_SUBDIRS += shell @@ -42,3 +42,9 @@ endif ifeq ($(LOSCFG_NET_LWIP_SACK_TFTP), y) APP_SUBDIRS += tftp endif + +#only enable for qemu now +ifeq ($(LOSCFG_PLATFORM_QEMU_ARM_VIRT_CA7), y) +APP_SUBDIRS += mksh +APP_SUBDIRS += toybox +endif diff --git a/apps/shell/src/shmsg.c b/apps/shell/src/shmsg.c index a7276526..1640810d 100644 --- a/apps/shell/src/shmsg.c +++ b/apps/shell/src/shmsg.c @@ -345,6 +345,11 @@ static void DoCmdExec(const char *cmdName, const char *cmdline, unsigned int len exit(1); } + ret = tcsetpgrp(STDIN_FILENO, getpgrp()); + if (ret != 0) { + printf("tcsetpgrp failed, pgrpid %d, errno %d\n", getpgrp(), errno); + } + ret = execve((const char *)cmdParsed->paramArray[0], (char * const *)cmdParsed->paramArray, NULL); if (ret == -1) { perror("execve"); diff --git a/apps/toybox/Makefile b/apps/toybox/Makefile new file mode 100644 index 00000000..501bdeab --- /dev/null +++ b/apps/toybox/Makefile @@ -0,0 +1,59 @@ +# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. +# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, +# are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this list of +# conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, this list +# of conditions and the following disclaimer in the documentation and/or other materials +# provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its contributors may be used +# to endorse or promote products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +TOYBOX:= toybox + +TOYBOX_DIR := $(shell pwd) +LITEOSTOPDIR = $(TOYBOX_DIR)/../../ +include $(TOYBOX_DIR)/../config.mk + +APPS_OUT := $(OUT)/bin +BUILD_DIR := $(TOYBOX_DIR)/build +BUILD_LOG := $(TOYBOX_DIR)/build.log +OUTNAME := $(TOYBOX) + +$(TOYBOX): +ifneq ($(wildcard $(BUILD_DIR)),) + $(HIDE)echo "not clean, rebuilding now"; +else + $(HIDE)mkdir $(BUILD_DIR) + $(HIDE)$(CP) $(LITEOSTHIRDPARTY)/$(TOYBOX)/. $(BUILD_DIR) +endif + $(HIDE)CFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-strong --target=arm-liteos \ + --sysroot=$(LITEOSTOPDIR)/../../prebuilts/lite/sysroot/" CC="$(CC)" OUTNAME=$(OUTNAME) \ + make -C $(BUILD_DIR) toybox -j> $(BUILD_LOG) 2>&1 + $(HIDE)$(CP) $(BUILD_DIR)/$(TOYBOX) . + $(HIDE)$(STRIP) $(TOYBOX) + $(HIDE)mkdir -p $(APPS_OUT) + $(HIDE)$(CP) $(TOYBOX) $(APPS_OUT) + +clean: + $(HIDE)$(RM) $(TOYBOX) $(BUILD_DIR) $(BUILD_LOG) + +.PHONY: all $(TOYBOX) clean diff --git a/kernel/common/console.c b/kernel/common/console.c index 3c929b57..9583fbc5 100644 --- a/kernel/common/console.c +++ b/kernel/common/console.c @@ -111,14 +111,7 @@ INT32 ConsoleTcGetAttr(INT32 fd, struct termios *termios) struct file *filep = NULL; CONSOLE_CB *consoleCB = NULL; - if ((fd >= STDIN_FILENO) && (fd <= STDERR_FILENO)) { - fd = ConsoleUpdateFd(); - if (fd < STDIN_FILENO) { - return -EBADF; - } - } - - int ret = fs_getfilep(fd, &filep); + INT32 ret = fs_getfilep(fd, &filep); if (ret < 0) { return -EPERM; } @@ -128,7 +121,7 @@ INT32 ConsoleTcGetAttr(INT32 fd, struct termios *termios) return -EFAULT; } - termios->c_lflag = consoleCB->consoleTermios.c_lflag; + (VOID)memcpy_s(termios, sizeof(struct termios), &consoleCB->consoleTermios, sizeof(struct termios)); return LOS_OK; } @@ -138,14 +131,8 @@ INT32 ConsoleTcSetAttr(INT32 fd, INT32 actions, const struct termios *termios) CONSOLE_CB *consoleCB = NULL; (VOID)actions; - if ((fd >= STDIN_FILENO) && (fd <= STDERR_FILENO)) { - fd = ConsoleUpdateFd(); - if (fd < STDIN_FILENO) { - return -EBADF; - } - } - int ret = fs_getfilep(fd, &filep); + INT32 ret = fs_getfilep(fd, &filep); if (ret < 0) { return -EPERM; } @@ -154,7 +141,8 @@ INT32 ConsoleTcSetAttr(INT32 fd, INT32 actions, const struct termios *termios) if (consoleCB == NULL) { return -EFAULT; } - consoleCB->consoleTermios.c_lflag = termios->c_lflag; + + (VOID)memcpy_s(&consoleCB->consoleTermios, sizeof(struct termios), termios, sizeof(struct termios)); return LOS_OK; } @@ -183,14 +171,13 @@ BOOL IsConsoleOccupied(const CONSOLE_CB *consoleCB) STATIC INT32 ConsoleCtrlCaptureLine(CONSOLE_CB *consoleCB) { - struct termios *consoleTermios = NULL; + struct termios consoleTermios; UINT32 intSave; LOS_SpinLockSave(&g_consoleSpin, &intSave); - consoleTermios = &consoleCB->consoleTermios; - (VOID)ConsoleTcGetAttr(consoleCB->fd, consoleTermios); - consoleTermios->c_lflag |= ICANON | ECHO; - (VOID)ConsoleTcSetAttr(consoleCB->fd, 0, consoleTermios); + (VOID)ConsoleTcGetAttr(consoleCB->fd, &consoleTermios); + consoleTermios.c_lflag |= ICANON | ECHO; + (VOID)ConsoleTcSetAttr(consoleCB->fd, 0, &consoleTermios); LOS_SpinUnlockRestore(&g_consoleSpin, intSave); return LOS_OK; @@ -198,14 +185,13 @@ STATIC INT32 ConsoleCtrlCaptureLine(CONSOLE_CB *consoleCB) STATIC INT32 ConsoleCtrlCaptureChar(CONSOLE_CB *consoleCB) { - struct termios *consoleTermios = NULL; + struct termios consoleTermios; UINT32 intSave; LOS_SpinLockSave(&g_consoleSpin, &intSave); - consoleTermios = &consoleCB->consoleTermios; - (VOID)ConsoleTcGetAttr(consoleCB->fd, consoleTermios); - consoleTermios->c_lflag &= ~(ICANON | ECHO); - (VOID)ConsoleTcSetAttr(consoleCB->fd, 0, consoleTermios); + (VOID)ConsoleTcGetAttr(consoleCB->fd, &consoleTermios); + consoleTermios.c_lflag &= ~(ICANON | ECHO); + (VOID)ConsoleTcSetAttr(consoleCB->fd, 0, &consoleTermios); LOS_SpinUnlockRestore(&g_consoleSpin, intSave); return LOS_OK; @@ -451,6 +437,20 @@ STATIC VOID StoreReadChar(CONSOLE_CB *consoleCB, char ch, INT32 readcount) } } +VOID KillPgrp() +{ + INT32 consoleId = -1; + LosProcessCB *process = OsCurrProcessGet(); + + if ((process->consoleID > CONSOLE_NUM -1 ) || (process->consoleID < 0)) { + return; + } + + consoleId = process->consoleID; + CONSOLE_CB *consoleCB = g_console[consoleId]; + (VOID)OsKillLock(consoleCB->pgrpId, SIGINT); +} + STATIC INT32 UserFilepRead(CONSOLE_CB *consoleCB, struct file *filep, const struct file_operations_vfs *fops, CHAR *buffer, size_t bufLen) { @@ -829,6 +829,75 @@ ERROUT: return VFS_ERROR; } +STATIC INT32 ConsoleSetSW(CONSOLE_CB *consoleCB, unsigned long arg) +{ + struct termios kerTermios; + UINT32 intSave; + + if (LOS_ArchCopyFromUser(&kerTermios, (struct termios *)arg, sizeof(struct termios)) != 0) { + return -EFAULT; + } + + LOS_SpinLockSave(&g_consoleSpin, &intSave); + (VOID)ConsoleTcSetAttr(consoleCB->fd, 0, &kerTermios); + LOS_SpinUnlockRestore(&g_consoleSpin, intSave); + return LOS_OK; +} + +#define DEFAULT_WINDOW_SIZE_COL 80 +#define DEFAULT_WINDOW_SIZE_ROW 24 +STATIC INT32 ConsoleGetWinSize(unsigned long arg) +{ + struct winsize kws = { + .ws_col = DEFAULT_WINDOW_SIZE_COL, + .ws_row = DEFAULT_WINDOW_SIZE_ROW + }; + + if(LOS_ArchCopyToUser((VOID *)arg, &kws, sizeof(struct winsize)) != 0) { + return -EFAULT; + } else { + return LOS_OK; + } +} + +STATIC INT32 ConsoleGetTermios(unsigned long arg) +{ + struct file *filep = NULL; + CONSOLE_CB *consoleCB = NULL; + + INT32 ret = fs_getfilep(0, &filep); + if (ret < 0) { + return -EPERM; + } + + consoleCB = (CONSOLE_CB *)filep->f_priv; + if (consoleCB == NULL) { + return -EFAULT; + } + + if(LOS_ArchCopyToUser((VOID *)arg, &consoleCB->consoleTermios, sizeof(struct termios)) != 0) { + return -EFAULT; + } else { + return LOS_OK; + } +} + +INT32 ConsoleSetPgrp(CONSOLE_CB *consoleCB, unsigned long arg) +{ + if (LOS_ArchCopyFromUser(&consoleCB->pgrpId, (INT32 *)(UINTPTR)arg, sizeof(INT32)) != 0) { + return -EFAULT; + } + return LOS_OK; +} + +INT32 ConsoleGetPgrp(CONSOLE_CB *consoleCB, unsigned long arg) +{ + if (LOS_ArchCopyToUser((VOID *)arg, &consoleCB->pgrpId, sizeof(INT32)) != 0) { + return -EFAULT; + } + return LOS_OK; +} + STATIC INT32 ConsoleIoctl(struct file *filep, INT32 cmd, unsigned long arg) { INT32 ret; @@ -869,6 +938,21 @@ STATIC INT32 ConsoleIoctl(struct file *filep, INT32 cmd, unsigned long arg) case CONSOLE_CONTROL_REG_USERTASK: ret = ConsoleTaskReg(consoleCB->consoleID, arg); break; + case TIOCGWINSZ: + ret = ConsoleGetWinSize(arg); + break; + case TCSETSW: + ret = ConsoleSetSW(consoleCB, arg); + break; + case TCGETS: + ret = ConsoleGetTermios(arg); + break; + case TIOCGPGRP: + ret = ConsoleGetPgrp(consoleCB, arg); + break; + case TIOCSPGRP: + ret = ConsoleSetPgrp(consoleCB, arg); + break; default: if ((cmd == UART_CFG_ATTR || cmd == UART_CFG_PRIVATE) && !LOS_IsUserAddress(arg)) { @@ -940,6 +1024,7 @@ STATIC VOID OsConsoleTermiosInit(CONSOLE_CB *consoleCB, const CHAR *deviceName) /* set console to have a buffer for user */ (VOID)ConsoleTcGetAttr(consoleCB->fd, &consoleTermios); consoleTermios.c_lflag |= ICANON | ECHO; + consoleTermios.c_cc[VINTR] = 3; /* /003 for ^C */ (VOID)ConsoleTcSetAttr(consoleCB->fd, 0, &consoleTermios); } #ifdef LOSCFG_NET_TELNET @@ -950,6 +1035,7 @@ STATIC VOID OsConsoleTermiosInit(CONSOLE_CB *consoleCB, const CHAR *deviceName) /* set console to have a buffer for user */ (VOID)ConsoleTcGetAttr(consoleCB->fd, &consoleTermios); consoleTermios.c_lflag |= ICANON | ECHO; + consoleTermios.c_cc[VINTR] = 3; /* /003 for ^C */ (VOID)ConsoleTcSetAttr(consoleCB->fd, 0, &consoleTermios); } #endif @@ -1157,6 +1243,7 @@ STATIC CONSOLE_CB *OsConsoleCBInit(UINT32 consoleID) (VOID)memset_s(consoleCB, sizeof(CONSOLE_CB), 0, sizeof(CONSOLE_CB)); consoleCB->consoleID = consoleID; + consoleCB->pgrpId = -1; consoleCB->shellEntryId = SHELL_ENTRYID_INVALID; /* initialize shellEntryId to an invalid value */ consoleCB->name = LOS_MemAlloc((VOID *)m_aucSysMem0, CONSOLE_NAMELEN); if (consoleCB->name == NULL) { diff --git a/kernel/common/console.h b/kernel/common/console.h index 20a0c2d3..0bae46eb 100644 --- a/kernel/common/console.h +++ b/kernel/common/console.h @@ -80,7 +80,6 @@ typedef struct { UINT32 consoleID; UINT32 consoleType; UINT32 consoleSem; - UINT32 shellEntryId; UINT32 consoleMask; struct Vnode *devVnode; CHAR *name; @@ -88,7 +87,9 @@ typedef struct { UINT32 refCount; BOOL isNonBlock; #ifdef LOSCFG_SHELL + UINT32 shellEntryId; VOID *shellHandle; + INT32 pgrpId; #endif UINT32 sendTaskID; CirBufSendCB *cirBufSendCB; @@ -123,6 +124,7 @@ extern INT32 GetFilepOps(const struct file *filep, struct file **privFilep, cons extern VOID OsWaitConsoleSendTaskPend(UINT32 taskID); extern VOID OsWakeConsoleSendTask(VOID); #endif +extern VOID KillPgrp(VOID); /* console ioctl */ #define CONSOLE_IOC_MAGIC 'c' diff --git a/kernel/common/los_magickey.c b/kernel/common/los_magickey.c index adae57e8..f0361149 100644 --- a/kernel/common/los_magickey.c +++ b/kernel/common/los_magickey.c @@ -30,13 +30,13 @@ */ #include "los_magickey.h" +#include "console.h" #include "los_task_pri.h" #ifdef LOSCFG_ENABLE_MAGICKEY #define MAGIC_KEY_NUM 5 - STATIC VOID OsMagicHelp(VOID); STATIC VOID OsMagicTaskShow(VOID); STATIC VOID OsMagicPanic(VOID); @@ -66,6 +66,12 @@ STATIC MagicKeyOp g_magicHelpOp = { .magicKey = 0x1a /* ctrl + z */ }; +STATIC MagicKeyOp g_magicKillPgrp = { + .opHandler = KillPgrp, + .helpMsg = "Show all magic op key(ctrl+c) ", + .magicKey = 0x03 /* ctrl + c */ +}; + /* * NOTICE:Suggest don't use * ctrl+h/backspace=0x8, @@ -81,7 +87,7 @@ STATIC MagicKeyOp *g_magicOpTable[MAGIC_KEY_NUM] = { &g_magicPanicOp, /* ctrl + p */ &g_magicTaskShowOp, /* ctrl + t */ &g_magicHelpOp, /* ctrl + z */ - NULL /* rserved */ + &g_magicKillPgrp /* ctrl + c */ }; STATIC VOID OsMagicHelp(VOID) @@ -131,7 +137,11 @@ INT32 CheckMagicKey(CHAR key) PRINTK("Magic key off\n"); } return 1; + } else if (key == 0x03){ /* ctrl + c */ + KillPgrp(); + return 0; } + if (magicKeySwitch != 0) { for (i = 0; g_magicOpTable[i] != NULL; ++i) { if (key == g_magicOpTable[i]->magicKey) { diff --git a/tools/build/config/qemu_arm_virt_debug_shell.config b/tools/build/config/qemu_arm_virt_debug_shell.config index 88da9ef9..d22f8fd8 100644 --- a/tools/build/config/qemu_arm_virt_debug_shell.config +++ b/tools/build/config/qemu_arm_virt_debug_shell.config @@ -3,7 +3,7 @@ LOSCFG_BOARD_CONFIG_PATH="device/qemu/arm_virt/liteos_a/config/board" # LOSCFG_HRTIMER_ENABLE is not set # LOSCFG_KERNEL_CPPSUPPORT is not set # LOSCFG_FS_FAT is not set -# LOSCFG_ENABLE_MAGICKEY is not set +LOSCFG_ENABLE_MAGICKEY=y LOSCFG_DEBUG_VERSION=y # LOSCFG_SHELL_LK is not set LOSCFG_USER_INIT_DEBUG=y diff --git a/tools/build/mk/los_config.mk b/tools/build/mk/los_config.mk index cf1526c3..da8203a7 100644 --- a/tools/build/mk/los_config.mk +++ b/tools/build/mk/los_config.mk @@ -109,9 +109,11 @@ endif ifeq ($(OUTDIR),) OUT = $(LITEOSTOPDIR)/out/$(LITEOS_PLATFORM) LITEOS_TARGET_DIR = $(OUT) +KERNEL_COMPILE_ONLY = y else OUT = $(OUTDIR) LITEOS_TARGET_DIR = $(OUT)/../../../ +KERNEL_COMPILE_ONLY = n endif BUILD = $(OUT)/obj MK_PATH = $(LITEOSTOPDIR)/tools/build/mk From e03370f6ef4c13286c0c5aaead710cf195cd2cd7 Mon Sep 17 00:00:00 2001 From: mucor Date: Thu, 6 May 2021 19:41:57 +0800 Subject: [PATCH 17/36] fix:telnet not work add open in console dev init process Change-Id: Ibf9801462d6de231001f094d4e75f01cad50da1f --- kernel/common/console.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/kernel/common/console.c b/kernel/common/console.c index 3c929b57..8459d9cc 100644 --- a/kernel/common/console.c +++ b/kernel/common/console.c @@ -1005,6 +1005,7 @@ STATIC INT32 OsConsoleDevInit(CONSOLE_CB *consoleCB, const CHAR *deviceName) INT32 ret; struct file *filep = NULL; struct Vnode *vnode = NULL; + struct file_operations_vfs *devOps = NULL; /* allocate memory for filep,in order to unchange the value of filep */ filep = (struct file *)LOS_MemAlloc(m_aucSysMem0, sizeof(struct file)); @@ -1040,6 +1041,13 @@ STATIC INT32 OsConsoleDevInit(CONSOLE_CB *consoleCB, const CHAR *deviceName) * Use filep to connect console and uart, we can find uart driver function throught filep. * now we can operate /dev/console to operate /dev/ttyS0 through filep. */ + devOps = (struct file_operations_vfs *)((struct drv_data*)vnode->data)->ops; + if (devOps != NULL && devOps->open != NULL) { + (VOID)devOps->open(filep); + } else { + ret = ENOSYS; + goto ERROUT; + } ret = register_driver(consoleCB->name, &g_consoleDevOps, DEFFILEMODE, filep); if (ret != LOS_OK) { @@ -1204,7 +1212,7 @@ STATIC CONSOLE_CB *OsConsoleCreate(UINT32 consoleID, const CHAR *deviceName) ret = OsConsoleDevInit(consoleCB, deviceName); if (ret != LOS_OK) { - PRINT_ERR("console OsConsoleDevInitlloc error. %d\n", ret); + PRINT_ERR("console OsConsoleDevInit error. %d\n", ret); goto ERR_WITH_SEM; } From f8441a0cdea301449416b0c0477dc48a05b6ab4e Mon Sep 17 00:00:00 2001 From: Guangyao Ma Date: Fri, 7 May 2021 11:38:07 +0800 Subject: [PATCH 18/36] fix: console compile bug fix Change-Id: I4c895bf7278b50d7ddf65e9556d77221b0c7ca32 --- kernel/common/console.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/common/console.h b/kernel/common/console.h index 0bae46eb..ff50d3c8 100644 --- a/kernel/common/console.h +++ b/kernel/common/console.h @@ -85,11 +85,11 @@ typedef struct { CHAR *name; INT32 fd; UINT32 refCount; + UINT32 shellEntryId; + INT32 pgrpId; BOOL isNonBlock; #ifdef LOSCFG_SHELL - UINT32 shellEntryId; VOID *shellHandle; - INT32 pgrpId; #endif UINT32 sendTaskID; CirBufSendCB *cirBufSendCB; From 9503c4a9fc30aaa8ea2031d4fb794436f3c98055 Mon Sep 17 00:00:00 2001 From: Far Date: Fri, 7 May 2021 15:07:50 +0800 Subject: [PATCH 19/36] fix: statfs can't get f_bfree and f_bavail of a FAT12/FAT16 partition FAT12/FAT16 partition has no FSINFO sector storing the free cluster number, so scanning the FAT is necessary to get the free clusters nums. Close #I3Q0VS --- fs/fat/os_adapt/fatfs.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/fs/fat/os_adapt/fatfs.c b/fs/fat/os_adapt/fatfs.c index ee39d653..abb31580 100644 --- a/fs/fat/os_adapt/fatfs.c +++ b/fs/fat/os_adapt/fatfs.c @@ -1141,6 +1141,9 @@ int fatfs_umount(struct Mount *mnt, struct Vnode **blkdriver) int fatfs_statfs(struct Mount *mnt, struct statfs *info) { FATFS *fs = (FATFS *)mnt->data; + DWORD nclst = 0; + FRESULT result = FR_OK; + int ret; info->f_type = MSDOS_SUPER_MAGIC; #if FF_MAX_SS != FF_MIN_SS @@ -1149,8 +1152,17 @@ int fatfs_statfs(struct Mount *mnt, struct statfs *info) info->f_bsize = FF_MIN_SS * fs->csize; #endif info->f_blocks = fs->n_fatent; + ret = lock_fs(fs); + if (ret == FALSE) { + return -EBUSY; + } + /* free cluster is unavailable, update it */ + if (fs->free_clst == DISK_ERROR) { + result = fat_count_free_entries(&nclst, fs); + } info->f_bfree = fs->free_clst; info->f_bavail = fs->free_clst; + unlock_fs(fs, result); #if FF_USE_LFN /* Maximum length of filenames */ @@ -1166,7 +1178,7 @@ int fatfs_statfs(struct Mount *mnt, struct statfs *info) info->f_ffree = 0; info->f_flags = mnt->mountFlags; - return 0; + return -fatfs_2_vfs(result); } static inline int GET_SECONDS(WORD ftime) From f99e7b3388a3fea14f12fe9bd4a7033f2fc93f0b Mon Sep 17 00:00:00 2001 From: lnlan Date: Sat, 8 May 2021 17:37:00 +0800 Subject: [PATCH 20/36] test image change name, add _door Change-Id: I5fd518e2e84df1d524d9405b665306cce485eb63 --- testsuites/unittest/BUILD.gn | 62 +++++++++---------- testsuites/unittest/IO/BUILD.gn | 2 +- testsuites/unittest/IPC/BUILD.gn | 2 +- testsuites/unittest/drivers/hid/BUILD.gn | 2 +- testsuites/unittest/drivers/storage/BUILD.gn | 2 +- testsuites/unittest/dynload/BUILD.gn | 2 +- testsuites/unittest/exc/BUILD.gn | 2 +- testsuites/unittest/fs/BUILD.gn | 2 +- testsuites/unittest/fs/proc/BUILD.gn | 2 +- testsuites/unittest/fs/vfat2/BUILD.gn | 2 +- testsuites/unittest/liteipc/BUILD.gn | 2 +- testsuites/unittest/mem/shm/BUILD.gn | 2 +- testsuites/unittest/mem/vm/BUILD.gn | 2 +- testsuites/unittest/misc/BUILD.gn | 2 +- testsuites/unittest/net/netdb/BUILD.gn | 2 +- testsuites/unittest/net/resolv/BUILD.gn | 2 +- testsuites/unittest/net/socket/BUILD.gn | 2 +- testsuites/unittest/posix/mem/BUILD.gn | 2 +- testsuites/unittest/posix/mqueue/BUILD.gn | 2 +- testsuites/unittest/posix/pthread/BUILD.gn | 2 +- testsuites/unittest/process/mutex/BUILD.gn | 2 +- testsuites/unittest/process/process/BUILD.gn | 2 +- testsuites/unittest/process/pthread/BUILD.gn | 2 +- testsuites/unittest/process/rwlock/BUILD.gn | 2 +- testsuites/unittest/process/spinlock/BUILD.gn | 2 +- .../unittest/security/capability/BUILD.gn | 2 +- testsuites/unittest/security/reugid/BUILD.gn | 2 +- testsuites/unittest/security/vid/BUILD.gn | 2 +- testsuites/unittest/signal/BUILD.gn | 2 +- testsuites/unittest/sys/BUILD.gn | 2 +- testsuites/unittest/time/clock/BUILD.gn | 2 +- testsuites/unittest/time/timer/BUILD.gn | 2 +- testsuites/unittest/util/BUILD.gn | 2 +- 33 files changed, 63 insertions(+), 63 deletions(-) diff --git a/testsuites/unittest/BUILD.gn b/testsuites/unittest/BUILD.gn index 1a2b7efd..1a1d23ea 100644 --- a/testsuites/unittest/BUILD.gn +++ b/testsuites/unittest/BUILD.gn @@ -60,102 +60,102 @@ config("public_config") { group("unittest") { deps = [] if (LOSCFG_USER_TEST_UTIL == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "util:liteos_a_util_unittest" ] + deps += [ "util:liteos_a_util_unittest_door" ] } if (LOSCFG_USER_TEST_TIME_TIMER == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "time/timer:liteos_a_time_timer_unittest" ] + deps += [ "time/timer:liteos_a_time_timer_unittest_door" ] } if (LOSCFG_USER_TEST_TIME_CLOCK == true && (LOSCFG_USER_TEST_SMOKE == true || LOSCFG_USER_TEST_FULL == true)) { - deps += [ "time/clock:liteos_a_time_clock_unittest" ] + deps += [ "time/clock:liteos_a_time_clock_unittest_door" ] } if (LOSCFG_USER_TEST_SYS == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "sys:liteos_a_sys_unittest" ] + deps += [ "sys:liteos_a_sys_unittest_door" ] } if (LOSCFG_USER_TEST_SIGNAL == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "signal:liteos_a_signal_unittest" ] + deps += [ "signal:liteos_a_signal_unittest_door" ] } if (LOSCFG_USER_TEST_SECURITY_REUGID == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "security/reugid:liteos_a_security_reugid_unittest" ] + deps += [ "security/reugid:liteos_a_security_reugid_unittest_door" ] } if (LOSCFG_USER_TEST_SECURITY_CAPABILITY == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "security/capability:liteos_a_security_capability_unittest" ] + deps += [ "security/capability:liteos_a_security_capability_unittest_door" ] } if (LOSCFG_USER_TEST_SECURITY_VID == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "security/vid:liteos_a_security_vid_unittest" ] + deps += [ "security/vid:liteos_a_security_vid_unittest_door" ] } if (LOSCFG_USER_TEST_MUTEX == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "process/mutex:liteos_a_mutex_unittest" ] + deps += [ "process/mutex:liteos_a_mutex_unittest_door" ] } if (LOSCFG_USER_TEST_PROCESS == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "process/process:liteos_a_process_unittest" ] + deps += [ "process/process:liteos_a_process_unittest_door" ] } if (LOSCFG_USER_TEST_PTHREAD == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "process/pthread:liteos_a_pthread_unittest" ] + deps += [ "process/pthread:liteos_a_pthread_unittest_door" ] } if (LOSCFG_USER_TEST_RWLOCK == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "process/rwlock:liteos_a_rwlock_unittest" ] + deps += [ "process/rwlock:liteos_a_rwlock_unittest_door" ] } if (LOSCFG_USER_TEST_SPINLOCK == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "process/spinlock:liteos_a_spinlock_unittest" ] + deps += [ "process/spinlock:liteos_a_spinlock_unittest_door" ] } if (LOSCFG_USER_TEST_POSIX_MEM == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "posix/mem:liteos_a_posix_mem_unittest" ] + deps += [ "posix/mem:liteos_a_posix_mem_unittest_door" ] } if (LOSCFG_USER_TEST_POSIX_MQUEUE == true && (LOSCFG_USER_TEST_SMOKE == true || LOSCFG_USER_TEST_FULL == true)) { - deps += [ "posix/mqueue:liteos_a_posix_mqueue_unittest" ] + deps += [ "posix/mqueue:liteos_a_posix_mqueue_unittest_door" ] } if (LOSCFG_USER_TEST_POSIX_PTHREAD == true && (LOSCFG_USER_TEST_SMOKE == true || LOSCFG_USER_TEST_FULL == true)) { - deps += [ "posix/pthread:liteos_a_posix_pthread_unittest" ] + deps += [ "posix/pthread:liteos_a_posix_pthread_unittest_door" ] } if (LOSCFG_USER_TEST_MISC == true && (LOSCFG_USER_TEST_SMOKE == true || LOSCFG_USER_TEST_FULL == true)) { - deps += [ "misc:liteos_a_misc_unittest" ] + deps += [ "misc:liteos_a_misc_unittest_door" ] } if (LOSCFG_USER_TEST_MEM_SHM == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "mem/shm:liteos_a_mem_shm_unittest" ] + deps += [ "mem/shm:liteos_a_mem_shm_unittest_door" ] } if (LOSCFG_USER_TEST_MEM_VM == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "mem/vm:liteos_a_mem_vm_unittest" ] + deps += [ "mem/vm:liteos_a_mem_vm_unittest_door" ] } if (LOSCFG_USER_TEST_IO == true && LOSCFG_USER_TEST_FULL == true) { - deps += [ "IO:liteos_a_io_unittest" ] + deps += [ "IO:liteos_a_io_unittest_door" ] } if (LOSCFG_USER_TEST_EXC == true && LOSCFG_USER_TEST_FULL == true) { - deps += [ "exc:liteos_a_exc_unittest" ] + deps += [ "exc:liteos_a_exc_unittest_door" ] } if (LOSCFG_USER_TEST_DYNLOAD == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "dynload:liteos_a_dynload_unittest" ] + deps += [ "dynload:liteos_a_dynload_unittest_door" ] } if (LOSCFG_USER_TEST_DRIVERS_HID == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "drivers/hid:liteos_a_drivers_hid_unittest" ] + deps += [ "drivers/hid:liteos_a_drivers_hid_unittest_door" ] } if (LOSCFG_USER_TEST_DRIVERS_STORAGE == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "drivers/storage:liteos_a_drivers_storage_unittest" ] + deps += [ "drivers/storage:liteos_a_drivers_storage_unittest_door" ] } if (LOSCFG_USER_TEST_NET_NETDB == true && LOSCFG_USER_TEST_FULL == true) { - deps += [ "net/netdb:liteos_a_net_netdb_unittest" ] + deps += [ "net/netdb:liteos_a_net_netdb_unittest_door" ] } if (LOSCFG_USER_TEST_NET_RESOLV == true && LOSCFG_USER_TEST_FULL == true) { - deps += [ "net/resolv:liteos_a_net_resolv_unittest" ] + deps += [ "net/resolv:liteos_a_net_resolv_unittest_door" ] } if (LOSCFG_USER_TEST_NET_SOCKET == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "net/socket:liteos_a_net_socket_unittest" ] + deps += [ "net/socket:liteos_a_net_socket_unittest_door" ] } if (LOSCFG_USER_TEST_IPC == true && LOSCFG_USER_TEST_FULL == true) { - deps += [ "IPC:liteos_a_ipc_unittest" ] + deps += [ "IPC:liteos_a_ipc_unittest_door" ] } if (LOSCFG_USER_TEST_LITEIPC == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "liteipc:liteos_a_liteipc_unittest" ] + deps += [ "liteipc:liteos_a_liteipc_unittest_door" ] } if (LOSCFG_USER_TEST_FS_JFFS == true && (LOSCFG_USER_TEST_SMOKE == true || LOSCFG_USER_TEST_FULL == true || LOSCFG_USER_TEST_PRESSURE == true)) { - deps += [ "fs:liteos_a_fs_unittest" ] + deps += [ "fs:liteos_a_fs_unittest_door" ] } if (LOSCFG_USER_TEST_FS_VFAT == true && (LOSCFG_USER_TEST_SMOKE == true || LOSCFG_USER_TEST_FULL == true || LOSCFG_USER_TEST_PRESSURE == true)) { - deps += [ "fs/vfat2:liteos_a_fs_vfat_unittest" ] + deps += [ "fs/vfat2:liteos_a_fs_vfat_unittest_door" ] } } diff --git a/testsuites/unittest/IO/BUILD.gn b/testsuites/unittest/IO/BUILD.gn index 1eae54fe..9d827cd0 100644 --- a/testsuites/unittest/IO/BUILD.gn +++ b/testsuites/unittest/IO/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_io_unittest") { +unittest("liteos_a_io_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/IPC/BUILD.gn b/testsuites/unittest/IPC/BUILD.gn index db9a18e5..3c933487 100644 --- a/testsuites/unittest/IPC/BUILD.gn +++ b/testsuites/unittest/IPC/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_ipc_unittest") { +unittest("liteos_a_ipc_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/drivers/hid/BUILD.gn b/testsuites/unittest/drivers/hid/BUILD.gn index 7e6afb1b..2bc440d1 100644 --- a/testsuites/unittest/drivers/hid/BUILD.gn +++ b/testsuites/unittest/drivers/hid/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_drivers_hid_unittest") { +unittest("liteos_a_drivers_hid_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/drivers/storage/BUILD.gn b/testsuites/unittest/drivers/storage/BUILD.gn index 43324c52..e429004e 100644 --- a/testsuites/unittest/drivers/storage/BUILD.gn +++ b/testsuites/unittest/drivers/storage/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_drivers_storage_unittest") { +unittest("liteos_a_drivers_storage_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/dynload/BUILD.gn b/testsuites/unittest/dynload/BUILD.gn index 8ac18fd1..4954891d 100644 --- a/testsuites/unittest/dynload/BUILD.gn +++ b/testsuites/unittest/dynload/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_dynload_unittest") { +unittest("liteos_a_dynload_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/exc/BUILD.gn b/testsuites/unittest/exc/BUILD.gn index 292980f7..6e31959e 100644 --- a/testsuites/unittest/exc/BUILD.gn +++ b/testsuites/unittest/exc/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_exc_unittest") { +unittest("liteos_a_exc_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/fs/BUILD.gn b/testsuites/unittest/fs/BUILD.gn index 1e9d0e96..84ce458f 100644 --- a/testsuites/unittest/fs/BUILD.gn +++ b/testsuites/unittest/fs/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_fs_unittest") { +unittest("liteos_a_fs_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/fs/proc/BUILD.gn b/testsuites/unittest/fs/proc/BUILD.gn index af413536..7f50856d 100644 --- a/testsuites/unittest/fs/proc/BUILD.gn +++ b/testsuites/unittest/fs/proc/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_fs_procfs_unittest") { +unittest("liteos_a_fs_procfs_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/fs/vfat2/BUILD.gn b/testsuites/unittest/fs/vfat2/BUILD.gn index 88d9be21..47a1a786 100644 --- a/testsuites/unittest/fs/vfat2/BUILD.gn +++ b/testsuites/unittest/fs/vfat2/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_fs_vfat_unittest") { +unittest("liteos_a_fs_vfat_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/liteipc/BUILD.gn b/testsuites/unittest/liteipc/BUILD.gn index 84c5b39b..5dd6bd3c 100644 --- a/testsuites/unittest/liteipc/BUILD.gn +++ b/testsuites/unittest/liteipc/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_liteipc_unittest") { +unittest("liteos_a_liteipc_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/mem/shm/BUILD.gn b/testsuites/unittest/mem/shm/BUILD.gn index d5534ee3..0406cc11 100644 --- a/testsuites/unittest/mem/shm/BUILD.gn +++ b/testsuites/unittest/mem/shm/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_mem_shm_unittest") { +unittest("liteos_a_mem_shm_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/mem/vm/BUILD.gn b/testsuites/unittest/mem/vm/BUILD.gn index 8957523d..257c2368 100644 --- a/testsuites/unittest/mem/vm/BUILD.gn +++ b/testsuites/unittest/mem/vm/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_mem_vm_unittest") { +unittest("liteos_a_mem_vm_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/misc/BUILD.gn b/testsuites/unittest/misc/BUILD.gn index 63781029..8b50157c 100644 --- a/testsuites/unittest/misc/BUILD.gn +++ b/testsuites/unittest/misc/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_misc_unittest") { +unittest("liteos_a_misc_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/net/netdb/BUILD.gn b/testsuites/unittest/net/netdb/BUILD.gn index 7f34d79b..68a51b55 100644 --- a/testsuites/unittest/net/netdb/BUILD.gn +++ b/testsuites/unittest/net/netdb/BUILD.gn @@ -37,7 +37,7 @@ config("net_local_config") { } } -unittest("liteos_a_net_netdb_unittest") { +unittest("liteos_a_net_netdb_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/net/resolv/BUILD.gn b/testsuites/unittest/net/resolv/BUILD.gn index c621e0b9..cca16a69 100644 --- a/testsuites/unittest/net/resolv/BUILD.gn +++ b/testsuites/unittest/net/resolv/BUILD.gn @@ -37,7 +37,7 @@ config("net_local_config") { } } -unittest("liteos_a_net_resolv_unittest") { +unittest("liteos_a_net_resolv_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/net/socket/BUILD.gn b/testsuites/unittest/net/socket/BUILD.gn index 37e18c9b..716eddbe 100644 --- a/testsuites/unittest/net/socket/BUILD.gn +++ b/testsuites/unittest/net/socket/BUILD.gn @@ -37,7 +37,7 @@ config("net_local_config") { } } -unittest("liteos_a_net_socket_unittest") { +unittest("liteos_a_net_socket_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/posix/mem/BUILD.gn b/testsuites/unittest/posix/mem/BUILD.gn index ed4be413..6fc5205b 100644 --- a/testsuites/unittest/posix/mem/BUILD.gn +++ b/testsuites/unittest/posix/mem/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_posix_mem_unittest") { +unittest("liteos_a_posix_mem_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/posix/mqueue/BUILD.gn b/testsuites/unittest/posix/mqueue/BUILD.gn index d840f775..a5dc7957 100644 --- a/testsuites/unittest/posix/mqueue/BUILD.gn +++ b/testsuites/unittest/posix/mqueue/BUILD.gn @@ -35,7 +35,7 @@ config("mqueue_config") { cflags_cc = cflags } -unittest("liteos_a_posix_mqueue_unittest") { +unittest("liteos_a_posix_mqueue_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/posix/pthread/BUILD.gn b/testsuites/unittest/posix/pthread/BUILD.gn index 5e5ed5cc..a3a3f07a 100644 --- a/testsuites/unittest/posix/pthread/BUILD.gn +++ b/testsuites/unittest/posix/pthread/BUILD.gn @@ -35,7 +35,7 @@ config("pthread_config") { cflags_cc = cflags } -unittest("liteos_a_posix_pthread_unittest") { +unittest("liteos_a_posix_pthread_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/process/mutex/BUILD.gn b/testsuites/unittest/process/mutex/BUILD.gn index 6039c7ee..0b1dfa29 100644 --- a/testsuites/unittest/process/mutex/BUILD.gn +++ b/testsuites/unittest/process/mutex/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_mutex_unittest") { +unittest("liteos_a_mutex_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/process/process/BUILD.gn b/testsuites/unittest/process/process/BUILD.gn index 2c6fd7fc..4acab1dc 100644 --- a/testsuites/unittest/process/process/BUILD.gn +++ b/testsuites/unittest/process/process/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_process_unittest") { +unittest("liteos_a_process_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/process/pthread/BUILD.gn b/testsuites/unittest/process/pthread/BUILD.gn index 70af1ebe..a396b1a9 100644 --- a/testsuites/unittest/process/pthread/BUILD.gn +++ b/testsuites/unittest/process/pthread/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_pthread_unittest") { +unittest("liteos_a_pthread_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/process/rwlock/BUILD.gn b/testsuites/unittest/process/rwlock/BUILD.gn index 31905e0e..2df813f2 100644 --- a/testsuites/unittest/process/rwlock/BUILD.gn +++ b/testsuites/unittest/process/rwlock/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_rwlock_unittest") { +unittest("liteos_a_rwlock_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/process/spinlock/BUILD.gn b/testsuites/unittest/process/spinlock/BUILD.gn index b9e5d44e..78dd962b 100644 --- a/testsuites/unittest/process/spinlock/BUILD.gn +++ b/testsuites/unittest/process/spinlock/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_spinlock_unittest") { +unittest("liteos_a_spinlock_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/security/capability/BUILD.gn b/testsuites/unittest/security/capability/BUILD.gn index d8976d2b..fa9bea0e 100644 --- a/testsuites/unittest/security/capability/BUILD.gn +++ b/testsuites/unittest/security/capability/BUILD.gn @@ -2,7 +2,7 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_security_capability_unittest") { +unittest("liteos_a_security_capability_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/security/reugid/BUILD.gn b/testsuites/unittest/security/reugid/BUILD.gn index a255a743..7e9ce59a 100644 --- a/testsuites/unittest/security/reugid/BUILD.gn +++ b/testsuites/unittest/security/reugid/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_security_reugid_unittest") { +unittest("liteos_a_security_reugid_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/security/vid/BUILD.gn b/testsuites/unittest/security/vid/BUILD.gn index 916aa3eb..07e824a7 100644 --- a/testsuites/unittest/security/vid/BUILD.gn +++ b/testsuites/unittest/security/vid/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_security_vid_unittest") { +unittest("liteos_a_security_vid_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/signal/BUILD.gn b/testsuites/unittest/signal/BUILD.gn index 27e0414b..81a4e901 100644 --- a/testsuites/unittest/signal/BUILD.gn +++ b/testsuites/unittest/signal/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_signal_unittest") { +unittest("liteos_a_signal_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/sys/BUILD.gn b/testsuites/unittest/sys/BUILD.gn index 4dc074bd..d6f5d738 100644 --- a/testsuites/unittest/sys/BUILD.gn +++ b/testsuites/unittest/sys/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_sys_unittest") { +unittest("liteos_a_sys_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/time/clock/BUILD.gn b/testsuites/unittest/time/clock/BUILD.gn index 83a1fae0..475aa4f2 100644 --- a/testsuites/unittest/time/clock/BUILD.gn +++ b/testsuites/unittest/time/clock/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_time_clock_unittest") { +unittest("liteos_a_time_clock_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/time/timer/BUILD.gn b/testsuites/unittest/time/timer/BUILD.gn index 03e60a0d..fcce247d 100644 --- a/testsuites/unittest/time/timer/BUILD.gn +++ b/testsuites/unittest/time/timer/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_time_timer_unittest") { +unittest("liteos_a_time_timer_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ diff --git a/testsuites/unittest/util/BUILD.gn b/testsuites/unittest/util/BUILD.gn index 244b5706..c5e03406 100644 --- a/testsuites/unittest/util/BUILD.gn +++ b/testsuites/unittest/util/BUILD.gn @@ -30,7 +30,7 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_util_unittest") { +unittest("liteos_a_util_unittest_door") { output_extension = "bin" output_dir = "$root_out_dir/test/unittest/kernel" include_dirs = [ From 1e308db64ebc56bf5cf30e8528b363b76e2e388c Mon Sep 17 00:00:00 2001 From: zhushengle Date: Fri, 7 May 2021 19:09:10 +0800 Subject: [PATCH 21/36] fix:Fixed exception not saving stack pointer of SVC mode and abnormal signal processing issues Close #I3OAFR Change-Id: I25b14572809b6fabb9e9d17de89a99047c02a59b --- arch/arm/arm/src/include/los_hw_pri.h | 23 ++++---- arch/arm/arm/src/los_dispatch.S | 23 ++++---- arch/arm/arm/src/los_exc.c | 12 ++--- arch/arm/arm/src/los_hw.c | 20 +++---- arch/arm/arm/src/los_hw_exc.S | 75 +++++++++++++-------------- arch/arm/include/los_exc.h | 7 +-- kernel/base/core/los_process.c | 4 +- kernel/base/include/los_vm_fault.h | 6 +-- kernel/base/ipc/los_signal.c | 9 ++-- kernel/base/vm/los_vm_fault.c | 6 +-- syscall/los_syscall.c | 5 +- 11 files changed, 92 insertions(+), 98 deletions(-) diff --git a/arch/arm/arm/src/include/los_hw_pri.h b/arch/arm/arm/src/include/los_hw_pri.h index 23533daa..d4f5a880 100644 --- a/arch/arm/arm/src/include/los_hw_pri.h +++ b/arch/arm/arm/src/include/los_hw_pri.h @@ -64,10 +64,11 @@ typedef struct { UINT32 R10; UINT32 R11; - UINT32 resved2; - UINT32 resved1; - UINT32 USP; - UINT32 ULR; + /* It has the same structure as IrqContext */ + UINT32 reserved2; /**< Multiplexing registers, used in interrupts and system calls but with different meanings */ + UINT32 reserved1; /**< Multiplexing registers, used in interrupts and system calls but with different meanings */ + UINT32 USP; /**< User mode sp register */ + UINT32 ULR; /**< User mode lr register */ UINT32 R0; UINT32 R1; UINT32 R2; @@ -75,14 +76,14 @@ typedef struct { UINT32 R12; UINT32 LR; UINT32 PC; - UINT32 CPSR; + UINT32 regCPSR; } TaskContext; typedef struct { - UINT32 resved2; - UINT32 resved1; - UINT32 USP; - UINT32 ULR; + UINT32 reserved2; /**< Multiplexing registers, used in interrupts and system calls but with different meanings */ + UINT32 reserved1; /**< Multiplexing registers, used in interrupts and system calls but with different meanings */ + UINT32 USP; /**< User mode sp register */ + UINT32 ULR; /**< User mode lr register */ UINT32 R0; UINT32 R1; UINT32 R2; @@ -90,7 +91,7 @@ typedef struct { UINT32 R12; UINT32 LR; UINT32 PC; - UINT32 CPSR; + UINT32 regCPSR; } IrqContext; /* @@ -103,7 +104,7 @@ typedef struct { extern VOID *OsTaskStackInit(UINT32 taskID, UINT32 stackSize, VOID *topStack, BOOL initFlag); extern VOID OsUserCloneParentStack(VOID *childStack, UINTPTR parentTopOfStask, UINT32 parentStackSize); extern VOID OsUserTaskStackInit(TaskContext *context, UINTPTR taskEntry, UINTPTR stack); -extern VOID *OsInitSignalContext(VOID *sp, UINTPTR sigHandler, UINT32 signo, UINT32 param); +extern VOID OsInitSignalContext(VOID *sp, VOID *signalContext, UINTPTR sigHandler, UINT32 signo, UINT32 param); extern void arm_clean_cache_range(UINTPTR start, UINTPTR end); extern void arm_inv_cache_range(UINTPTR start, UINTPTR end); diff --git a/arch/arm/arm/src/los_dispatch.S b/arch/arm/arm/src/los_dispatch.S index ac314224..66a719e1 100644 --- a/arch/arm/arm/src/los_dispatch.S +++ b/arch/arm/arm/src/los_dispatch.S @@ -91,7 +91,7 @@ OsTaskSchedule: STMFD SP!, {LR} STMFD SP!, {R12} - /* jump R0 - R3 USP, ULR resved */ + /* jump R0 - R3 USP, ULR reserved */ SUB SP, SP, #(8 * 4) /* push R4 - R11*/ @@ -127,7 +127,7 @@ OsTaskContextLoad: BL OsSchedToUserReleaseLock #endif - /* jump sp, resved */ + /* jump sp, reserved */ ADD SP, SP, #(2 * 4) LDMFD SP, {R13, R14}^ ADD SP, SP, #(2 * 4) @@ -142,14 +142,15 @@ OsKernelTaskLoad: OsIrqHandler: SUB LR, LR, #4 - SRSFD #0x13! @ save spsr and pc to the svc stack - - CPSID i, #0x13 @ disable irq, switch to svc mode + /* Save pc and cpsr to svc sp, ARMv6 and above support */ + SRSFD #0x13! + /* disable irq, switch to svc mode */ + CPSID i, #0x13 STMFD SP!, {R0-R3, R12, LR} STMFD SP, {R13, R14}^ SUB SP, SP, #(4 * 4) - STMIA SP, {R4} + STR R4, [SP, #0] /* * save fpu regs in case in case those been @@ -169,16 +170,20 @@ OsIrqHandler: BLX OsSchedIrqEndCheckNeedSched /* restore fpu regs */ - POP_FPU_REGS R0 - LDMFD SP, {R4} + POP_FPU_REGS R0 + LDR R4, [SP, #0] + /* Obtain the CPSR to determine the mode the system is in when the interrupt is triggered */ LDR R3, [SP, #(11 * 4)] AND R1, R3, #CPSR_MASK_MODE CMP R1, #CPSR_USER_MODE BNE 1f MOV R0, SP - STMIA SP, {R7} + STR R7, [SP, #0] + /* sp - sizeof(IrqContext) */ + SUB SP, SP, #(12 * 4) + MOV R1, SP BLX OsSaveSignalContext MOV SP, R0 1: diff --git a/arch/arm/arm/src/los_exc.c b/arch/arm/arm/src/los_exc.c index 42573a49..106348fc 100644 --- a/arch/arm/arm/src/los_exc.c +++ b/arch/arm/arm/src/los_exc.c @@ -179,7 +179,7 @@ STATIC INT32 OsDecodeDataFSR(UINT32 regDFSR) } #ifdef LOSCFG_KERNEL_VM -UINT32 OsArmSharedPageFault(UINT32 excType, PageFaultContext *frame, UINT32 far, UINT32 fsr) +UINT32 OsArmSharedPageFault(UINT32 excType, ExcContext *frame, UINT32 far, UINT32 fsr) { BOOL instructionFault = FALSE; UINT32 pfFlags = 0; @@ -218,7 +218,7 @@ UINT32 OsArmSharedPageFault(UINT32 excType, PageFaultContext *frame, UINT32 far, /* permission fault */ case 0b01111: { /* permission fault */ - BOOL user = (frame->CPSR & CPSR_MODE_MASK) == CPSR_MODE_USR; + BOOL user = (frame->regCPSR & CPSR_MODE_MASK) == CPSR_MODE_USR; pfFlags |= write ? VM_MAP_PF_FLAG_WRITE : 0; pfFlags |= user ? VM_MAP_PF_FLAG_USER : 0; pfFlags |= instructionFault ? VM_MAP_PF_FLAG_INSTRUCTION : 0; @@ -245,9 +245,9 @@ STATIC VOID OsExcType(UINT32 excType, ExcContext *excBufAddr, UINT32 far, UINT32 { /* undefinited exception handling or software interrupt */ if ((excType == OS_EXCEPT_UNDEF_INSTR) || (excType == OS_EXCEPT_SWI)) { - if ((excBufAddr->CPSR & INSTR_SET_MASK) == 0) { /* work status: ARM */ + if ((excBufAddr->regCPSR & INSTR_SET_MASK) == 0) { /* work status: ARM */ excBufAddr->PC = excBufAddr->PC - ARM_INSTR_LEN; - } else if ((excBufAddr->CPSR & INSTR_SET_MASK) == 0x20) { /* work status: Thumb */ + } else if ((excBufAddr->regCPSR & INSTR_SET_MASK) == 0x20) { /* work status: Thumb */ excBufAddr->PC = excBufAddr->PC - THUMB_INSTR_LEN; } } @@ -397,7 +397,7 @@ STATIC VOID OsExcRegsInfo(const ExcContext *excBufAddr) "R12 = 0x%x\n" "CPSR = 0x%x\n", excBufAddr->R7, excBufAddr->R8, excBufAddr->R9, excBufAddr->R10, - excBufAddr->R11, excBufAddr->R12, excBufAddr->CPSR); + excBufAddr->R11, excBufAddr->R12, excBufAddr->regCPSR); } LITE_OS_SEC_TEXT_INIT UINT32 LOS_ExcRegHook(EXC_PROC_FUNC excHook) @@ -1026,7 +1026,7 @@ LITE_OS_SEC_TEXT VOID STATIC OsExcPriorDisposal(ExcContext *excBufAddr) UINT16 runCount; #endif - if ((excBufAddr->CPSR & CPSR_MASK_MODE) == CPSR_USER_MODE) { + if ((excBufAddr->regCPSR & CPSR_MASK_MODE) == CPSR_USER_MODE) { g_minAddr = USER_ASPACE_BASE; g_maxAddr = USER_ASPACE_BASE + USER_ASPACE_SIZE; g_excFromUserMode[ArchCurrCpuid()] = TRUE; diff --git a/arch/arm/arm/src/los_hw.c b/arch/arm/arm/src/los_hw.c index 25ec5821..5af4068c 100644 --- a/arch/arm/arm/src/los_hw.c +++ b/arch/arm/arm/src/los_hw.c @@ -83,12 +83,12 @@ LITE_OS_SEC_TEXT_INIT VOID *OsTaskStackInit(UINT32 taskID, UINT32 stackSize, VOI taskContext->PC = (UINTPTR)OsTaskEntry; #endif taskContext->LR = (UINTPTR)OsTaskExit; /* LR should be kept, to distinguish it's THUMB or ARM instruction */ - taskContext->R0 = taskID; /* R0 */ + taskContext->R0 = taskID; /* R0 */ #ifdef LOSCFG_INTERWORK_THUMB - taskContext->CPSR = PSR_MODE_SVC_THUMB; /* CPSR (Enable IRQ and FIQ interrupts, THUMNB-mode) */ + taskContext->regCPSR = PSR_MODE_SVC_THUMB; /* CPSR (Enable IRQ and FIQ interrupts, THUMNB-mode) */ #else - taskContext->CPSR = PSR_MODE_SVC_ARM; /* CPSR (Enable IRQ and FIQ interrupts, ARM-mode) */ + taskContext->regCPSR = PSR_MODE_SVC_ARM; /* CPSR (Enable IRQ and FIQ interrupts, ARM-mode) */ #endif #if !defined(LOSCFG_ARCH_FPU_DISABLE) @@ -116,9 +116,9 @@ LITE_OS_SEC_TEXT_INIT VOID OsUserTaskStackInit(TaskContext *context, UINTPTR tas LOS_ASSERT(context != NULL); #ifdef LOSCFG_INTERWORK_THUMB - context->CPSR = PSR_MODE_USR_THUMB; + context->regCPSR = PSR_MODE_USR_THUMB; #else - context->CPSR = PSR_MODE_USR_ARM; + context->regCPSR = PSR_MODE_USR_ARM; #endif context->R0 = stack; context->USP = TRUNCATE(stack, LOSCFG_STACK_POINT_ALIGN_SIZE); @@ -126,17 +126,13 @@ LITE_OS_SEC_TEXT_INIT VOID OsUserTaskStackInit(TaskContext *context, UINTPTR tas context->PC = (UINTPTR)taskEntry; } -VOID *OsInitSignalContext(VOID *sp, UINTPTR sigHandler, UINT32 signo, UINT32 param) +VOID OsInitSignalContext(VOID *sp, VOID *signalContext, UINTPTR sigHandler, UINT32 signo, UINT32 param) { - IrqContext *oldSp = (IrqContext *)sp; - IrqContext *newSp = (IrqContext *)((UINTPTR)sp - sizeof(IrqContext)); + IrqContext *newSp = (IrqContext *)signalContext; + (VOID)memcpy_s(signalContext, sizeof(IrqContext), sp, sizeof(IrqContext)); newSp->PC = sigHandler; newSp->R0 = signo; newSp->R1 = param; - newSp->USP = oldSp->USP; - newSp->CPSR = oldSp->CPSR; - - return (VOID *)newSp; } DEPRECATED VOID Dmb(VOID) diff --git a/arch/arm/arm/src/los_hw_exc.S b/arch/arm/arm/src/los_hw_exc.S index afd98b5a..82dad4f8 100644 --- a/arch/arm/arm/src/los_hw_exc.S +++ b/arch/arm/arm/src/los_hw_exc.S @@ -173,34 +173,34 @@ _osExceptUndefInstrHdl: #ifdef LOSCFG_GDB GDB_HANDLE OsUndefIncExcHandleEntry #else - SRSFD #0x13! - CPSID i, #0x13 + SRSFD #CPSR_SVC_MODE! @ Save pc and cpsr to svc sp, ARMv6 and above support + MSR CPSR_c, #(CPSR_INT_DISABLE | CPSR_SVC_MODE) @ Switch to svc mode, and disable all interrupt STMFD SP!, {R0-R3, R12, LR} - SUB SP, SP, #(4 * 2) + STMFD SP, {R13, R14}^ @ push user sp and lr + SUB SP, SP, #(2 * 4) MOV R2, #0 MOV R3, #0 - STMFD SP!, {R2-R3} + STMFD SP!, {R2-R3} @ far and fsr fields, are 0 under this anomaly MOV R0, #OS_EXCEPT_UNDEF_INSTR @ Set exception ID to OS_EXCEPT_UNDEF_INSTR. B _osExceptDispatch @ Branch to global exception handler. - #endif @ Description: Software interrupt exception handler _osExceptSwiHdl: - SRSFD #0x13! + SRSFD #CPSR_SVC_MODE! @ Save pc and cpsr to svc sp, ARMv6 and above support STMFD SP!, {R0-R3, R12, LR} STMFD SP, {R13, R14}^ - SUB SP, SP, #(4 * 4) - STMIA SP, {R7} + SUB SP, SP, #(4 * 4) @ push user sp and lr and jump reserved field + STR R7, [SP, #0] @ Save system call number to reserved2 filed #ifdef LOSCFG_KERNEL_SYSCALL LDR R3, [SP, #(11 * 4)] - AND R1, R3, #CPSR_MASK_MODE @ Interrupted mode - CMP R1, #CPSR_USER_MODE @ User mode + AND R1, R3, #CPSR_MASK_MODE @ Interrupted mode + CMP R1, #CPSR_USER_MODE @ User mode BNE _osKernelSVCHandler @ Branch if not user mode - CMP R7, #119 @ __NR_sigreturn + CMP R7, #119 @ __NR_sigreturn BNE _osIsSyscall MOV R0, SP BLX OsRestorSignalContext @@ -213,7 +213,7 @@ _osIsSyscall: PUSH_FPU_REGS R1 MOV R0, SP - MOV FP, #0 @ Init frame pointer + MOV FP, #0 @ Init frame pointer CPSIE I BLX OsArmA32SyscallHandle CPSID I @@ -221,18 +221,15 @@ _osIsSyscall: POP_FPU_REGS R1 LDMFD SP!, {R4-R11} - LDR R3, [SP, #(11 * 4)] - AND R1, R3, #CPSR_MASK_MODE - CMP R1, #CPSR_USER_MODE - BNE _osSyscallReturn - MOV R0, SP + SUB SP, SP, #(12 * 4) @ sp - sizeof(IrqContext), reserved for signal + MOV R1, SP BLX OsSaveSignalContext MOV SP, R0 _osSyscallReturn: - LDMFD SP, {R7} - ADD SP, SP, #(2 * 4) + LDR R7, [SP, #0] + ADD SP, SP, #(2 * 4) @ jump reserved filed LDMFD SP, {R13, R14}^ @ Restore user mode R13/R14 ADD SP, SP, #(2 * 4) LDMFD SP!, {R0-R3, R12, LR} @@ -255,15 +252,15 @@ _osExceptPrefetchAbortHdl: #else SUB LR, LR, #4 @ LR offset to return from this exception: -4. - SRSFD #0x13! - CPSID i, #0x13 + SRSFD #CPSR_SVC_MODE! @ Save pc and cpsr to svc sp, ARMv6 and above support + MSR CPSR_c, #(CPSR_INT_DISABLE | CPSR_SVC_MODE) @ Switch to svc mode, and disable all interrupt STMFD SP!, {R0-R3, R12, LR} STMFD SP, {R13, R14}^ SUB SP, SP, #(2 * 4) MRC P15, 0, R2, C6, C0, 2 MRC P15, 0, R3, C5, C0, 1 - STMFD SP!, {R2-R3} + STMFD SP!, {R2-R3} @ Save far and fsr #ifdef LOSCFG_KERNEL_VM LDR R0, [SP, #(11 * 4)] @@ -275,9 +272,7 @@ _osExceptPrefetchAbortHdl: PUSH_FPU_REGS R0 MOV R0, #OS_EXCEPT_PREFETCH_ABORT - CPSIE I BLX OsArmSharedPageFault - CPSID I CMP R0, #0 POP_FPU_REGS R0 @@ -298,24 +293,22 @@ _osExceptDataAbortHdl: #else SUB LR, LR, #8 @ LR offset to return from this exception: -8. - SRSFD #0x13! - CPSID i, #0x13 + SRSFD #CPSR_SVC_MODE! @ Save pc and cpsr to svc sp, ARMv6 and above support + MSR CPSR_c, #(CPSR_INT_DISABLE | CPSR_SVC_MODE) @ Switch to svc mode, and disable all interrupt STMFD SP!, {R0-R3, R12, LR} STMFD SP, {R13, R14}^ SUB SP, SP, #(2 * 4) MRC P15, 0, R2, C6, C0, 0 MRC P15, 0, R3, C5, C0, 0 - STMFD SP!, {R2-R3} + STMFD SP!, {R2-R3} @ Save far and fsr #ifdef LOSCFG_KERNEL_VM MOV R1, SP PUSH_FPU_REGS R0 - MOV R0, #OS_EXCEPT_DATA_ABORT @ Set exception ID to OS_EXCEPT_DATA_ABORT. - CPSIE I + MOV R0, #OS_EXCEPT_DATA_ABORT @ Set exception ID to OS_EXCEPT_DATA_ABORT. BLX OsArmSharedPageFault - CPSID I CMP R0, #0 POP_FPU_REGS R0 BEQ _osExcPageFaultReturn @@ -329,7 +322,7 @@ _osExceptDataAbortHdl: _osExcPageFaultReturn: ADD SP, SP, #(2 * 4) LDMFD SP, {R13, R14}^ - ADD SP, SP, #(2 * 4) + ADD SP, SP, #(2 * 4) @ Jump reserved fileds LDMFD SP!, {R0-R3, R12, LR} RFEIA SP! #endif @@ -338,15 +331,15 @@ _osExcPageFaultReturn: _osExceptAddrAbortHdl: SUB LR, LR, #8 @ LR offset to return from this exception: -8. - SRSFD #0x13! - CPSID i, #0x13 + SRSFD #CPSR_SVC_MODE! @ Save pc and cpsr to svc sp, ARMv6 and above support + MSR CPSR_c, #(CPSR_INT_DISABLE | CPSR_SVC_MODE) @ Switch to svc mode, and disable all interrupt STMFD SP!, {R0-R3, R12, LR} STMFD SP, {R13, R14}^ SUB SP, SP, #(2 * 4) MOV R2, #0 MOV R3, #0 - STMFD SP!, {R2-R3} + STMFD SP!, {R2-R3} @ far and fsr fields, are 0 under this anomaly MOV R0, #OS_EXCEPT_ADDR_ABORT @ Set exception ID to OS_EXCEPT_ADDR_ABORT. B _osExceptDispatch @ Branch to global exception handler. @@ -355,23 +348,27 @@ _osExceptAddrAbortHdl: _osExceptFiqHdl: SUB LR, LR, #4 @ LR offset to return from this exception: -4. - SRSFD #0x13! - CPSID i, #0x13 + SRSFD #CPSR_SVC_MODE! @ Save pc and cpsr to svc sp, ARMv6 and above support + MSR CPSR_c, #(CPSR_INT_DISABLE | CPSR_SVC_MODE) @ Switch to svc mode, and disable all interrupt STMFD SP!, {R0-R3, R12, LR} STMFD SP, {R13, R14}^ SUB SP, SP, #(2 * 4) MOV R2, #0 MOV R3, #0 - STMFD SP!, {R2-R3} + STMFD SP!, {R2-R3} @ far and fsr fields, are 0 under this anomaly @ Description: Exception handler @ Parameter : R0 Exception Type @ Regs Hold : R3 Exception`s CPSR _osExceptDispatch: STMFD SP!, {R4-R11} - LDR R8, [SP, #(4 * 8)] - LDR R9, [SP, #(4 * 9)] + LDR R8, [SP, #(8 * 4)] @ Get far + LDR R9, [SP, #(9 * 4)] @ Get fsr + + ADD R2, SP, #(20 * 4) @ sp + sizeof(ExcContext), position of SVC stack before exception + STR R2, [SP, #(8 * 4)] @ Save svc sp + MOV R1, SP EXC_SP_SET __exc_stack_top, OS_EXC_STACK_SIZE, R6, R7 diff --git a/arch/arm/include/los_exc.h b/arch/arm/include/los_exc.h index aab026ec..893f06e0 100644 --- a/arch/arm/include/los_exc.h +++ b/arch/arm/include/los_exc.h @@ -63,6 +63,7 @@ typedef struct { UINT64 SPSR; } ExcContext; #else +/* It has the same structure as TaskContext */ typedef struct { UINT32 R4; UINT32 R5; @@ -73,8 +74,8 @@ typedef struct { UINT32 R10; UINT32 R11; - UINT32 SP; - UINT32 resved; + UINT32 SP; /**< svc sp */ + UINT32 reserved; /**< Reserved, multiplexing register */ UINT32 USP; UINT32 ULR; UINT32 R0; /**< Register R0 */ @@ -84,7 +85,7 @@ typedef struct { UINT32 R12; /**< Register R12 */ UINT32 LR; /**< Program returning address. */ UINT32 PC; /**< PC pointer of the exceptional function */ - UINT32 CPSR; + UINT32 regCPSR; } ExcContext; #endif diff --git a/kernel/base/core/los_process.c b/kernel/base/core/los_process.c index 34ff61f2..7ea277e8 100644 --- a/kernel/base/core/los_process.c +++ b/kernel/base/core/los_process.c @@ -1363,9 +1363,9 @@ LITE_OS_SEC_TEXT UINT32 OsExecStart(const TSK_ENTRY_FUNC entry, UINTPTR sp, UINT return LOS_NOK; } - SCHEDULER_LOCK(intSave); LosTaskCB *taskCB = OsCurrTaskGet(); + SCHEDULER_LOCK(intSave); taskCB->userMapBase = mapBase; taskCB->userMapSize = mapSize; taskCB->taskEntry = (TSK_ENTRY_FUNC)entry; @@ -1373,8 +1373,6 @@ LITE_OS_SEC_TEXT UINT32 OsExecStart(const TSK_ENTRY_FUNC entry, UINTPTR sp, UINT TaskContext *taskContext = (TaskContext *)OsTaskStackInit(taskCB->taskID, taskCB->stackSize, (VOID *)taskCB->topOfStack, FALSE); OsUserTaskStackInit(taskContext, (UINTPTR)taskCB->taskEntry, sp); - taskCB->stackPointer = (VOID *)taskContext; - OsTaskContextLoad(taskCB); SCHEDULER_UNLOCK(intSave); return LOS_OK; } diff --git a/kernel/base/include/los_vm_fault.h b/kernel/base/include/los_vm_fault.h index 6bc0c2f9..d3c650a2 100644 --- a/kernel/base/include/los_vm_fault.h +++ b/kernel/base/include/los_vm_fault.h @@ -38,7 +38,7 @@ #define __LOS_VM_FAULT_H__ #include "los_typedef.h" -#include "los_hw_pri.h" +#include "los_exc.h" #ifdef __cplusplus #if __cplusplus @@ -46,8 +46,6 @@ extern "C" { #endif /* __cplusplus */ #endif /* __cplusplus */ -typedef IrqContext PageFaultContext; - typedef struct { VADDR_T excAddr; VADDR_T fixAddr; @@ -58,7 +56,7 @@ typedef struct { #define VM_MAP_PF_FLAG_INSTRUCTION (1U << 2) #define VM_MAP_PF_FLAG_NOT_PRESENT (1U << 3) -STATUS_T OsVmPageFaultHandler(VADDR_T vaddr, UINT32 flags, PageFaultContext *frame); +STATUS_T OsVmPageFaultHandler(VADDR_T vaddr, UINT32 flags, ExcContext *frame); #ifdef __cplusplus #if __cplusplus } diff --git a/kernel/base/ipc/los_signal.c b/kernel/base/ipc/los_signal.c index c2b45f9c..566b8a6b 100644 --- a/kernel/base/ipc/los_signal.c +++ b/kernel/base/ipc/los_signal.c @@ -556,15 +556,16 @@ int OsSigAction(int sig, const sigaction_t *act, sigaction_t *oact) return LOS_OK; } -VOID *OsSaveSignalContext(VOID *sp) +VOID *OsSaveSignalContext(VOID *sp, VOID *newSp) { UINTPTR sigHandler; UINT32 intSave; - SCHEDULER_LOCK(intSave); LosTaskCB *task = OsCurrTaskGet(); LosProcessCB *process = OsCurrProcessGet(); sig_cb *sigcb = &task->sig; + + SCHEDULER_LOCK(intSave); if ((sigcb->count == 0) && ((sigcb->sigFlag != 0) || (process->sigShare != 0))) { sigHandler = OsGetSigHandler(); if (sigHandler == 0) { @@ -581,7 +582,7 @@ VOID *OsSaveSignalContext(VOID *sp) OsProcessExitCodeSignalSet(process, signo); sigcb->sigContext = sp; - VOID *newSp = OsInitSignalContext(sp, sigHandler, signo, sigVal); + OsInitSignalContext(sp, newSp, sigHandler, signo, sigVal); /* sig No bits 00000100 present sig No 3, but 1<< 3 = 00001000, so signo needs minus 1 */ sigcb->sigFlag ^= 1ULL << (signo - 1); @@ -598,10 +599,10 @@ VOID *OsRestorSignalContext(VOID *sp) { UINT32 intSave; - SCHEDULER_LOCK(intSave); LosTaskCB *task = OsCurrTaskGet(); sig_cb *sigcb = &task->sig; + SCHEDULER_LOCK(intSave); if (sigcb->count != 1) { SCHEDULER_UNLOCK(intSave); PRINT_ERR("sig error count : %d\n", sigcb->count); diff --git a/kernel/base/vm/los_vm_fault.c b/kernel/base/vm/los_vm_fault.c index b805d253..d8f61b27 100644 --- a/kernel/base/vm/los_vm_fault.c +++ b/kernel/base/vm/los_vm_fault.c @@ -75,12 +75,12 @@ STATIC STATUS_T OsVmRegionRightCheck(LosVmMapRegion *region, UINT32 flags) return LOS_OK; } -STATIC VOID OsFaultTryFixup(PageFaultContext *frame, VADDR_T excVaddr, STATUS_T *status) +STATIC VOID OsFaultTryFixup(ExcContext *frame, VADDR_T excVaddr, STATUS_T *status) { INT32 tableNum = (__exc_table_end - __exc_table_start) / sizeof(LosExcTable); LosExcTable *excTable = (LosExcTable *)__exc_table_start; - if ((frame->CPSR & CPSR_MODE_MASK) != CPSR_MODE_USR) { + if ((frame->regCPSR & CPSR_MODE_MASK) != CPSR_MODE_USR) { for (int i = 0; i < tableNum; ++i, ++excTable) { if (frame->PC == (UINTPTR)excTable->excAddr) { frame->PC = (UINTPTR)excTable->fixAddr; @@ -332,7 +332,7 @@ STATIC STATUS_T OsDoFileFault(LosVmMapRegion *region, LosVmPgFault *vmPgFault, U return ret; } -STATUS_T OsVmPageFaultHandler(VADDR_T vaddr, UINT32 flags, PageFaultContext *frame) +STATUS_T OsVmPageFaultHandler(VADDR_T vaddr, UINT32 flags, ExcContext *frame) { LosVmSpace *space = LOS_SpaceGet(vaddr); LosVmMapRegion *region = NULL; diff --git a/syscall/los_syscall.c b/syscall/los_syscall.c index c2d6e3eb..3b6e5098 100644 --- a/syscall/los_syscall.c +++ b/syscall/los_syscall.c @@ -99,7 +99,7 @@ VOID OsArmA32SyscallHandle(TaskContext *regs) UINT32 ret; UINT8 nArgs; UINTPTR handle; - UINT32 cmd = regs->resved2; + UINT32 cmd = regs->reserved2; if (cmd >= SYS_CALL_NUM) { PRINT_ERR("Syscall ID: error %d !!!\n", cmd); @@ -134,8 +134,5 @@ VOID OsArmA32SyscallHandle(TaskContext *regs) regs->R0 = ret; - /* Return the last value of curent_regs. This supports context switches on return from the exception. - * That capability is only used with theSYS_context_switch system call. - */ return; } From 3aa14c9ae7020ef1117ce18919221167470bde72 Mon Sep 17 00:00:00 2001 From: lnlan Date: Tue, 11 May 2021 11:06:14 +0800 Subject: [PATCH 22/36] full & smoke separate Change-Id: I885610a62b980bd3720b337aced886450338bdcf --- testsuites/unittest/BUILD.gn | 384 +++-- testsuites/unittest/IO/BUILD.gn | 136 +- testsuites/unittest/IO/io_test.cpp | 4 +- .../IO/{full => smoke}/IO_test_005.cpp | 0 .../IO/{full => smoke}/IO_test_008.cpp | 0 .../IO/{full => smoke}/IO_test_010.cpp | 0 .../IO/{full => smoke}/IO_test_013.cpp | 0 testsuites/unittest/IPC/BUILD.gn | 64 +- testsuites/unittest/config.gni | 25 +- testsuites/unittest/drivers/hid/BUILD.gn | 62 +- testsuites/unittest/drivers/storage/BUILD.gn | 62 +- testsuites/unittest/dynload/BUILD.gn | 64 +- testsuites/unittest/exc/BUILD.gn | 72 +- testsuites/unittest/exc/exc_test.cpp | 2 +- .../exc/{full => smoke}/it_test_exc_001.cpp | 0 .../exc/{full => smoke}/it_test_exc_002.cpp | 0 .../exc/{full => smoke}/it_test_exc_003.cpp | 0 .../exc/{full => smoke}/it_test_exc_004.cpp | 0 .../exc/{full => smoke}/it_test_exc_005.cpp | 0 testsuites/unittest/fs/BUILD.gn | 1256 +++++++++-------- testsuites/unittest/fs/proc/BUILD.gn | 73 +- testsuites/unittest/fs/vfat2/BUILD.gn | 216 +-- testsuites/unittest/liteipc/BUILD.gn | 66 +- testsuites/unittest/mem/shm/BUILD.gn | 62 +- testsuites/unittest/mem/vm/BUILD.gn | 90 +- testsuites/unittest/misc/BUILD.gn | 94 +- testsuites/unittest/net/netdb/BUILD.gn | 106 +- .../unittest/net/netdb/net_netdb_test.cpp | 2 +- .../{full => smoke}/net_netdb_test_001.cpp | 0 .../{full => smoke}/net_netdb_test_013.cpp | 0 testsuites/unittest/net/resolv/BUILD.gn | 82 +- .../unittest/net/resolv/net_resolv_test.cpp | 2 +- .../{full => smoke}/net_resolv_test_001.cpp | 0 .../{full => smoke}/net_resolv_test_002.cpp | 0 .../{full => smoke}/net_resolv_test_003.cpp | 0 .../{full => smoke}/net_resolv_test_006.cpp | 0 .../{full => smoke}/net_resolv_test_007.cpp | 0 testsuites/unittest/net/socket/BUILD.gn | 91 +- testsuites/unittest/posix/mem/BUILD.gn | 66 +- testsuites/unittest/posix/mqueue/BUILD.gn | 370 ++--- testsuites/unittest/posix/pthread/BUILD.gn | 298 ++-- testsuites/unittest/process/mutex/BUILD.gn | 110 +- testsuites/unittest/process/process/BUILD.gn | 208 +-- testsuites/unittest/process/pthread/BUILD.gn | 108 +- testsuites/unittest/process/rwlock/BUILD.gn | 64 +- testsuites/unittest/process/spinlock/BUILD.gn | 62 +- .../unittest/security/capability/BUILD.gn | 63 +- .../capability/smoke/cap_test_001.cpp | 7 +- testsuites/unittest/security/reugid/BUILD.gn | 62 +- testsuites/unittest/security/vid/BUILD.gn | 62 +- testsuites/unittest/signal/BUILD.gn | 186 ++- testsuites/unittest/sys/BUILD.gn | 118 +- testsuites/unittest/time/clock/BUILD.gn | 88 +- testsuites/unittest/time/timer/BUILD.gn | 73 +- testsuites/unittest/util/BUILD.gn | 66 +- 55 files changed, 3054 insertions(+), 1972 deletions(-) rename testsuites/unittest/IO/{full => smoke}/IO_test_005.cpp (100%) rename testsuites/unittest/IO/{full => smoke}/IO_test_008.cpp (100%) rename testsuites/unittest/IO/{full => smoke}/IO_test_010.cpp (100%) rename testsuites/unittest/IO/{full => smoke}/IO_test_013.cpp (100%) rename testsuites/unittest/exc/{full => smoke}/it_test_exc_001.cpp (100%) rename testsuites/unittest/exc/{full => smoke}/it_test_exc_002.cpp (100%) rename testsuites/unittest/exc/{full => smoke}/it_test_exc_003.cpp (100%) rename testsuites/unittest/exc/{full => smoke}/it_test_exc_004.cpp (100%) rename testsuites/unittest/exc/{full => smoke}/it_test_exc_005.cpp (100%) rename testsuites/unittest/net/netdb/{full => smoke}/net_netdb_test_001.cpp (100%) rename testsuites/unittest/net/netdb/{full => smoke}/net_netdb_test_013.cpp (100%) rename testsuites/unittest/net/resolv/{full => smoke}/net_resolv_test_001.cpp (100%) rename testsuites/unittest/net/resolv/{full => smoke}/net_resolv_test_002.cpp (100%) rename testsuites/unittest/net/resolv/{full => smoke}/net_resolv_test_003.cpp (100%) rename testsuites/unittest/net/resolv/{full => smoke}/net_resolv_test_006.cpp (100%) rename testsuites/unittest/net/resolv/{full => smoke}/net_resolv_test_007.cpp (100%) diff --git a/testsuites/unittest/BUILD.gn b/testsuites/unittest/BUILD.gn index 1a1d23ea..3768b79b 100644 --- a/testsuites/unittest/BUILD.gn +++ b/testsuites/unittest/BUILD.gn @@ -29,133 +29,289 @@ import("config.gni") -local_flags = [] +local_flags_smoke = [] +local_flags_full = [] if (board_name == "hispark_taurus") { - local_flags += [ "-DLOSCFG_USER_TEST_SMP" ] -} -if (LOSCFG_USER_TEST_SMOKE == true) { - local_flags += [ "-DLOSCFG_USER_TEST_SMOKE" ] -} -if (LOSCFG_USER_TEST_FULL == true) { - local_flags += [ "-DLOSCFG_USER_TEST_FULL" ] -} -if (LOSCFG_USER_TEST_PRESSURE == true) { - local_flags += [ "-DLOSCFG_USER_TEST_PRESSURE" ] -} -if (LOSCFG_USER_TEST_LLT == true) { - local_flags += [ "-DLOSCFG_USER_TEST_LLT" ] + local_flags_smoke += [ "-DLOSCFG_USER_TEST_SMP" ] + local_flags_full += [ "-DLOSCFG_USER_TEST_SMP" ] } +local_flags_smoke += [ "-DLOSCFG_USER_TEST_SMOKE" ] +local_flags_full += [ "-DLOSCFG_USER_TEST_SMOKE" ] +local_flags_full += [ "-DLOSCFG_USER_TEST_FULL" ] +#local_flags_full += [ "-DLOSCFG_USER_TEST_PRESSURE" ] -config("public_config") { +config("public_config_smk") { cflags = [ "-fpermissive" ] cflags += [ "-O2", "-fbuiltin", "-Wno-narrowing", ] - cflags += local_flags + cflags += local_flags_smoke + cflags_cc = cflags +} + +config("public_config_full") { + cflags = [ "-fpermissive" ] + cflags += [ + "-O2", + "-fbuiltin", + "-Wno-narrowing", + ] + cflags += local_flags_full cflags_cc = cflags } group("unittest") { deps = [] - if (LOSCFG_USER_TEST_UTIL == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "util:liteos_a_util_unittest_door" ] - } - if (LOSCFG_USER_TEST_TIME_TIMER == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "time/timer:liteos_a_time_timer_unittest_door" ] - } - if (LOSCFG_USER_TEST_TIME_CLOCK == true && - (LOSCFG_USER_TEST_SMOKE == true || LOSCFG_USER_TEST_FULL == true)) { - deps += [ "time/clock:liteos_a_time_clock_unittest_door" ] - } - if (LOSCFG_USER_TEST_SYS == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "sys:liteos_a_sys_unittest_door" ] - } - if (LOSCFG_USER_TEST_SIGNAL == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "signal:liteos_a_signal_unittest_door" ] - } - if (LOSCFG_USER_TEST_SECURITY_REUGID == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "security/reugid:liteos_a_security_reugid_unittest_door" ] - } - if (LOSCFG_USER_TEST_SECURITY_CAPABILITY == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "security/capability:liteos_a_security_capability_unittest_door" ] - } - if (LOSCFG_USER_TEST_SECURITY_VID == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "security/vid:liteos_a_security_vid_unittest_door" ] - } - if (LOSCFG_USER_TEST_MUTEX == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "process/mutex:liteos_a_mutex_unittest_door" ] - } - if (LOSCFG_USER_TEST_PROCESS == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "process/process:liteos_a_process_unittest_door" ] - } - if (LOSCFG_USER_TEST_PTHREAD == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "process/pthread:liteos_a_pthread_unittest_door" ] - } - if (LOSCFG_USER_TEST_RWLOCK == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "process/rwlock:liteos_a_rwlock_unittest_door" ] - } - if (LOSCFG_USER_TEST_SPINLOCK == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "process/spinlock:liteos_a_spinlock_unittest_door" ] - } - if (LOSCFG_USER_TEST_POSIX_MEM == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "posix/mem:liteos_a_posix_mem_unittest_door" ] - } - if (LOSCFG_USER_TEST_POSIX_MQUEUE == true && - (LOSCFG_USER_TEST_SMOKE == true || LOSCFG_USER_TEST_FULL == true)) { - deps += [ "posix/mqueue:liteos_a_posix_mqueue_unittest_door" ] - } - if (LOSCFG_USER_TEST_POSIX_PTHREAD == true && - (LOSCFG_USER_TEST_SMOKE == true || LOSCFG_USER_TEST_FULL == true)) { - deps += [ "posix/pthread:liteos_a_posix_pthread_unittest_door" ] - } - if (LOSCFG_USER_TEST_MISC == true && - (LOSCFG_USER_TEST_SMOKE == true || LOSCFG_USER_TEST_FULL == true)) { - deps += [ "misc:liteos_a_misc_unittest_door" ] - } - if (LOSCFG_USER_TEST_MEM_SHM == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "mem/shm:liteos_a_mem_shm_unittest_door" ] - } - if (LOSCFG_USER_TEST_MEM_VM == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "mem/vm:liteos_a_mem_vm_unittest_door" ] - } - if (LOSCFG_USER_TEST_IO == true && LOSCFG_USER_TEST_FULL == true) { - deps += [ "IO:liteos_a_io_unittest_door" ] - } - if (LOSCFG_USER_TEST_EXC == true && LOSCFG_USER_TEST_FULL == true) { - deps += [ "exc:liteos_a_exc_unittest_door" ] - } - if (LOSCFG_USER_TEST_DYNLOAD == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "dynload:liteos_a_dynload_unittest_door" ] - } - if (LOSCFG_USER_TEST_DRIVERS_HID == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "drivers/hid:liteos_a_drivers_hid_unittest_door" ] - } - if (LOSCFG_USER_TEST_DRIVERS_STORAGE == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "drivers/storage:liteos_a_drivers_storage_unittest_door" ] - } - if (LOSCFG_USER_TEST_NET_NETDB == true && LOSCFG_USER_TEST_FULL == true) { - deps += [ "net/netdb:liteos_a_net_netdb_unittest_door" ] - } - if (LOSCFG_USER_TEST_NET_RESOLV == true && LOSCFG_USER_TEST_FULL == true) { - deps += [ "net/resolv:liteos_a_net_resolv_unittest_door" ] - } - if (LOSCFG_USER_TEST_NET_SOCKET == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "net/socket:liteos_a_net_socket_unittest_door" ] - } - if (LOSCFG_USER_TEST_IPC == true && LOSCFG_USER_TEST_FULL == true) { - deps += [ "IPC:liteos_a_ipc_unittest_door" ] - } - if (LOSCFG_USER_TEST_LITEIPC == true && LOSCFG_USER_TEST_SMOKE == true) { - deps += [ "liteipc:liteos_a_liteipc_unittest_door" ] - } - if (LOSCFG_USER_TEST_FS_JFFS == true && - (LOSCFG_USER_TEST_SMOKE == true || LOSCFG_USER_TEST_FULL == true || LOSCFG_USER_TEST_PRESSURE == true)) { - deps += [ "fs:liteos_a_fs_unittest_door" ] - } - if (LOSCFG_USER_TEST_FS_VFAT == true && - (LOSCFG_USER_TEST_SMOKE == true || LOSCFG_USER_TEST_FULL == true || LOSCFG_USER_TEST_PRESSURE == true)) { - deps += [ "fs/vfat2:liteos_a_fs_vfat_unittest_door" ] + if (ohos_build_type == "debug") { + if (LOSCFG_USER_TEST_MISC == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "misc:liteos_a_misc_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "misc:liteos_a_misc_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_DRIVERS_HID == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "drivers/hid:liteos_a_drivers_hid_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "drivers/hid:liteos_a_drivers_hid_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_DRIVERS_STORAGE == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "drivers/storage:liteos_a_drivers_storage_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "drivers/storage:liteos_a_drivers_storage_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_DYNLOAD == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "dynload:liteos_a_dynload_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "dynload:liteos_a_dynload_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_EXC == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "exc:liteos_a_exc_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "exc:liteos_a_exc_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_FS_JFFS == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "fs:liteos_a_fs_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "fs:liteos_a_fs_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_FS_VFAT == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "fs/vfat2:liteos_a_fs_vfat_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "fs/vfat2:liteos_a_fs_vfat_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_IO == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "IO:liteos_a_io_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "IO:liteos_a_io_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_IPC == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "IPC:liteos_a_ipc_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "IPC:liteos_a_ipc_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_LITEIPC == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "liteipc:liteos_a_liteipc_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "liteipc:liteos_a_liteipc_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_MEM_SHM == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "mem/shm:liteos_a_mem_shm_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "mem/shm:liteos_a_mem_shm_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_MEM_VM == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "mem/vm:liteos_a_mem_vm_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "mem/vm:liteos_a_mem_vm_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_NET_NETDB == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "net/netdb:liteos_a_net_netdb_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "net/netdb:liteos_a_net_netdb_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_NET_RESOLV == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "net/resolv:liteos_a_net_resolv_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "net/resolv:liteos_a_net_resolv_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_NET_SOCKET == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "net/socket:liteos_a_net_socket_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "net/socket:liteos_a_net_socket_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_POSIX_MEM == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "posix/mem:liteos_a_posix_mem_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "posix/mem:liteos_a_posix_mem_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_POSIX_MQUEUE == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "posix/mqueue:liteos_a_posix_mqueue_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "posix/mqueue:liteos_a_posix_mqueue_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_POSIX_PTHREAD == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "posix/pthread:liteos_a_posix_pthread_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "posix/pthread:liteos_a_posix_pthread_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_MUTEX == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "process/mutex:liteos_a_mutex_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "process/mutex:liteos_a_mutex_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_PROCESS == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "process/process:liteos_a_process_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "process/process:liteos_a_process_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_PTHREAD == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "process/pthread:liteos_a_pthread_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "process/pthread:liteos_a_pthread_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_RWLOCK == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "process/rwlock:liteos_a_rwlock_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "process/rwlock:liteos_a_rwlock_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_SPINLOCK == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "process/spinlock:liteos_a_spinlock_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "process/spinlock:liteos_a_spinlock_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_SECURITY_REUGID == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "security/reugid:liteos_a_security_reugid_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "security/reugid:liteos_a_security_reugid_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_SECURITY_CAPABILITY == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "security/capability:liteos_a_security_capability_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "security/capability:liteos_a_security_capability_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_SECURITY_VID == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "security/vid:liteos_a_security_vid_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "security/vid:liteos_a_security_vid_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_UTIL == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "util:liteos_a_util_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "util:liteos_a_util_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_TIME_TIMER == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "time/timer:liteos_a_time_timer_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "time/timer:liteos_a_time_timer_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_TIME_CLOCK == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "time/clock:liteos_a_time_clock_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "time/clock:liteos_a_time_clock_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_SYS == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "sys:liteos_a_sys_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "sys:liteos_a_sys_unittest_door" ] + } + } + if (LOSCFG_USER_TEST_SIGNAL == true) { + if (LOSCFG_USER_TEST_FOR_ALL == true) { + deps += [ "signal:liteos_a_signal_unittest" ] + } + if (LOSCFG_USER_TEST_FOR_DOOR == true) { + deps += [ "signal:liteos_a_signal_unittest_door" ] + } + } } } diff --git a/testsuites/unittest/IO/BUILD.gn b/testsuites/unittest/IO/BUILD.gn index 9d827cd0..daf0b997 100644 --- a/testsuites/unittest/IO/BUILD.gn +++ b/testsuites/unittest/IO/BUILD.gn @@ -30,60 +30,90 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_io_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../common/include", - "../IO", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../common/include", + "../IO", +] + +sources_entry = [ + "../common/osTest.cpp", + "io_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../common/osTest.cpp", - "io_test.cpp", + "smoke/IO_test_005.cpp", + "smoke/IO_test_008.cpp", + "smoke/IO_test_010.cpp", + "smoke/IO_test_013.cpp", ] - if (LOSCFG_USER_TEST_FULL == true) { - sources_full = [ - "full/IO_test_005.cpp", - "full/IO_test_008.cpp", - "full/IO_test_010.cpp", - "full/IO_test_013.cpp", - "full/IO_test_confstr_001.cpp", - "full/IO_test_dcgettext_001.cpp", - "full/IO_test_dcgettext_002.cpp", - "full/IO_test_dcngettext_001.cpp", - "full/IO_test_dcngettext_002.cpp", - "full/IO_test_dngettext_001.cpp", - "full/IO_test_dngettext_002.cpp", - "full/IO_test_duplocale_001.cpp", - "full/IO_test_locale_001.cpp", - "full/IO_test_locale_002.cpp", - "full/IO_test_ngettext_001.cpp", - "full/IO_test_nl_langinfo_001.cpp", - "full/IO_test_nl_langinfo_l_001.cpp", - "full/IO_test_strcasecmp_l_001.cpp", - "full/IO_test_strcasecmp_l_002.cpp", - "full/IO_test_strfmon_l_001.cpp", - "full/IO_test_strfmon_l_002.cpp", - "full/It_locale_localeconv_001.cpp", - "full/It_stdio_fputws_001.cpp", - "full/It_stdio_fwprintf_001.cpp", - "full/It_stdio_getc_unlocked_001.cpp", - "full/It_stdio_hasmntopt_001.cpp", - "full/It_stdio_mblen_001.cpp", - "full/It_stdio_mbrlen_001.cpp", - "full/It_stdio_putwc_001.cpp", - "full/It_stdio_readv_001.cpp", - "full/It_stdio_rindex_001.cpp", - "full/It_stdio_setlogmask_001.cpp", - "full/It_stdlib_gcvt_001.cpp", - "full/It_stdlib_poll_002.cpp", - "full/It_stdlib_poll_003.cpp", - "full/IO_test_gettext_001.cpp", - "full/IO_test_strncasecmp_l_001.cpp", - "full/IO_test_strncasecmp_l_002.cpp", - ] - sources += sources_full - } + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "..:public_config" ] } + +source_set("sources_other") { + sources = [ + "full/IO_test_confstr_001.cpp", + "full/IO_test_dcgettext_001.cpp", + "full/IO_test_dcgettext_002.cpp", + "full/IO_test_dcngettext_001.cpp", + "full/IO_test_dcngettext_002.cpp", + "full/IO_test_dngettext_001.cpp", + "full/IO_test_dngettext_002.cpp", + "full/IO_test_duplocale_001.cpp", + "full/IO_test_locale_001.cpp", + "full/IO_test_locale_002.cpp", + "full/IO_test_ngettext_001.cpp", + "full/IO_test_nl_langinfo_001.cpp", + "full/IO_test_nl_langinfo_l_001.cpp", + "full/IO_test_strcasecmp_l_001.cpp", + "full/IO_test_strcasecmp_l_002.cpp", + "full/IO_test_strfmon_l_001.cpp", + "full/IO_test_strfmon_l_002.cpp", + "full/It_locale_localeconv_001.cpp", + "full/It_stdio_fputws_001.cpp", + "full/It_stdio_fwprintf_001.cpp", + "full/It_stdio_getc_unlocked_001.cpp", + "full/It_stdio_hasmntopt_001.cpp", + "full/It_stdio_mblen_001.cpp", + "full/It_stdio_mbrlen_001.cpp", + "full/It_stdio_putwc_001.cpp", + "full/It_stdio_readv_001.cpp", + "full/It_stdio_rindex_001.cpp", + "full/It_stdio_setlogmask_001.cpp", + "full/It_stdlib_gcvt_001.cpp", + "full/It_stdlib_poll_002.cpp", + "full/It_stdlib_poll_003.cpp", + "full/IO_test_gettext_001.cpp", + "full/IO_test_strncasecmp_l_001.cpp", + "full/IO_test_strncasecmp_l_002.cpp", + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_io_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_io_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/IO/io_test.cpp b/testsuites/unittest/IO/io_test.cpp index 020be401..83bbf60d 100644 --- a/testsuites/unittest/IO/io_test.cpp +++ b/testsuites/unittest/IO/io_test.cpp @@ -43,7 +43,7 @@ public: static void TearDownTestCase(void) {} }; -#if defined(LOSCFG_USER_TEST_FULL) +#if defined(LOSCFG_USER_TEST_SMOKE) /* * * @tc.name: IT_TEST_IO_005 * @tc.desc: function for IoTest @@ -90,7 +90,9 @@ HWTEST_F(IoTest, ItTestIo013, TestSize.Level0) { ItTestIo013(); } +#endif +#if defined(LOSCFG_USER_TEST_FULL) /* * * @tc.name: IT_STDLIB_POLL_002 * @tc.desc: function for IoTest diff --git a/testsuites/unittest/IO/full/IO_test_005.cpp b/testsuites/unittest/IO/smoke/IO_test_005.cpp similarity index 100% rename from testsuites/unittest/IO/full/IO_test_005.cpp rename to testsuites/unittest/IO/smoke/IO_test_005.cpp diff --git a/testsuites/unittest/IO/full/IO_test_008.cpp b/testsuites/unittest/IO/smoke/IO_test_008.cpp similarity index 100% rename from testsuites/unittest/IO/full/IO_test_008.cpp rename to testsuites/unittest/IO/smoke/IO_test_008.cpp diff --git a/testsuites/unittest/IO/full/IO_test_010.cpp b/testsuites/unittest/IO/smoke/IO_test_010.cpp similarity index 100% rename from testsuites/unittest/IO/full/IO_test_010.cpp rename to testsuites/unittest/IO/smoke/IO_test_010.cpp diff --git a/testsuites/unittest/IO/full/IO_test_013.cpp b/testsuites/unittest/IO/smoke/IO_test_013.cpp similarity index 100% rename from testsuites/unittest/IO/full/IO_test_013.cpp rename to testsuites/unittest/IO/smoke/IO_test_013.cpp diff --git a/testsuites/unittest/IPC/BUILD.gn b/testsuites/unittest/IPC/BUILD.gn index 3c933487..9152c359 100644 --- a/testsuites/unittest/IPC/BUILD.gn +++ b/testsuites/unittest/IPC/BUILD.gn @@ -30,24 +30,54 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_ipc_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../common/include", - "../IPC", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../common/include", + "../IPC", +] + +sources_entry = [ + "../common/osTest.cpp", + "ipc_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../common/osTest.cpp", - "ipc_test.cpp", ] - if (LOSCFG_USER_TEST_FULL == true) { - sources_full = [ - "full/IPC_test_mkfifoat_001.cpp", - "full/IPC_test_mkfifoat_002.cpp", - ] - sources += sources_full - } + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "..:public_config" ] +} + +source_set("sources_other") { + sources = [ + "full/IPC_test_mkfifoat_001.cpp", + "full/IPC_test_mkfifoat_002.cpp", + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_ipc_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_ipc_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } } diff --git a/testsuites/unittest/config.gni b/testsuites/unittest/config.gni index 62136719..866bc5ba 100644 --- a/testsuites/unittest/config.gni +++ b/testsuites/unittest/config.gni @@ -27,19 +27,25 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -LOSCFG_USER_TEST_LLT = false -LOSCFG_USER_TEST_SMOKE = true +LOSCFG_USER_TEST_FOR_DOOR = true +LOSCFG_USER_TEST_FOR_ALL = true LOSCFG_USER_TEST_PRESSURE = false -LOSCFG_USER_TEST_FULL = false -LOSCFG_USER_TEST_DRIVERS_STORAGE = true +LOSCFG_USER_TEST_MISC = true LOSCFG_USER_TEST_DRIVERS_HID = true +LOSCFG_USER_TEST_DRIVERS_STORAGE = true LOSCFG_USER_TEST_DYNLOAD = true LOSCFG_USER_TEST_EXC = true +LOSCFG_USER_TEST_FS_JFFS = false +LOSCFG_USER_TEST_FS_VFAT = false LOSCFG_USER_TEST_IO = true +LOSCFG_USER_TEST_IPC = false +LOSCFG_USER_TEST_LITEIPC = false LOSCFG_USER_TEST_MEM_VM = true LOSCFG_USER_TEST_MEM_SHM = true -LOSCFG_USER_TEST_MISC = true +LOSCFG_USER_TEST_NET_NETDB = true +LOSCFG_USER_TEST_NET_RESOLV = true +LOSCFG_USER_TEST_NET_SOCKET = true LOSCFG_USER_TEST_POSIX_PTHREAD = false LOSCFG_USER_TEST_POSIX_MQUEUE = true LOSCFG_USER_TEST_POSIX_MEM = true @@ -55,11 +61,4 @@ LOSCFG_USER_TEST_SIGNAL = true LOSCFG_USER_TEST_SYS = true LOSCFG_USER_TEST_TIME_CLOCK = true LOSCFG_USER_TEST_TIME_TIMER = true -LOSCFG_USER_TEST_UTIL = true -LOSCFG_USER_TEST_NET_NETDB = true -LOSCFG_USER_TEST_NET_RESOLV = true -LOSCFG_USER_TEST_NET_SOCKET = true -LOSCFG_USER_TEST_IPC = false -LOSCFG_USER_TEST_LITEIPC = false -LOSCFG_USER_TEST_FS_JFFS = false -LOSCFG_USER_TEST_FS_VFAT = false +LOSCFG_USER_TEST_UTIL = true \ No newline at end of file diff --git a/testsuites/unittest/drivers/hid/BUILD.gn b/testsuites/unittest/drivers/hid/BUILD.gn index 2bc440d1..72704e5f 100644 --- a/testsuites/unittest/drivers/hid/BUILD.gn +++ b/testsuites/unittest/drivers/hid/BUILD.gn @@ -30,23 +30,53 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_drivers_hid_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "../../drivers/hid", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "../../drivers/hid", +] + +sources_entry = [ + "../../common/osTest.cpp", + "drivers_hid_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "drivers_hid_test.cpp", + "smoke/hid_test_001.cpp", ] - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/hid_test_001.cpp", - ] - sources += sources_smoke - } + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "../..:public_config" ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_drivers_hid_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_drivers_hid_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/drivers/storage/BUILD.gn b/testsuites/unittest/drivers/storage/BUILD.gn index e429004e..c17f4608 100644 --- a/testsuites/unittest/drivers/storage/BUILD.gn +++ b/testsuites/unittest/drivers/storage/BUILD.gn @@ -30,23 +30,53 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_drivers_storage_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "../../drivers/storage", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "../../drivers/storage", +] + +sources_entry = [ + "../../common/osTest.cpp", + "drivers_storage_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "drivers_storage_test.cpp", + "smoke/storage_test_001.cpp", ] - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/storage_test_001.cpp", - ] - sources += sources_smoke - } + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "../..:public_config" ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_drivers_storage_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_drivers_storage_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/dynload/BUILD.gn b/testsuites/unittest/dynload/BUILD.gn index 4954891d..6cedc00a 100644 --- a/testsuites/unittest/dynload/BUILD.gn +++ b/testsuites/unittest/dynload/BUILD.gn @@ -30,24 +30,54 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_dynload_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../common/include", - "../dynload", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../common/include", + "../dynload", +] + +sources_entry = [ + "../common/osTest.cpp", + "dynload_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../common/osTest.cpp", - "dynload_test.cpp", + "smoke/dynload_test_002.cpp", + "smoke/dynload_test_004.cpp", ] - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/dynload_test_002.cpp", - "smoke/dynload_test_004.cpp", - ] - sources += sources_smoke - } + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "..:public_config" ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_dynload_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_dynload_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/exc/BUILD.gn b/testsuites/unittest/exc/BUILD.gn index 6e31959e..7a24227f 100644 --- a/testsuites/unittest/exc/BUILD.gn +++ b/testsuites/unittest/exc/BUILD.gn @@ -30,28 +30,58 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_exc_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../common/include", - "../exc", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../common/include", + "../exc", +] + +sources_entry = [ + "../common/osTest.cpp", + "exc_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../common/osTest.cpp", - "exc_test.cpp", + "smoke/it_test_exc_001.cpp", + "smoke/it_test_exc_002.cpp", + "smoke/it_test_exc_003.cpp", + "smoke/it_test_exc_004.cpp", + "smoke/it_test_exc_005.cpp", ] - if (LOSCFG_USER_TEST_FULL == true) { - sources_full = [ - "full/it_test_exc_001.cpp", - "full/it_test_exc_002.cpp", - "full/it_test_exc_003.cpp", - "full/it_test_exc_004.cpp", - "full/it_test_exc_005.cpp", - "full/it_test_fexecve_001.cpp", - ] - sources += sources_full - } + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "..:public_config" ] } + +source_set("sources_other") { + sources = [ + "full/it_test_fexecve_001.cpp", + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_exc_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_exc_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/exc/exc_test.cpp b/testsuites/unittest/exc/exc_test.cpp index 655d88dd..9e88916f 100644 --- a/testsuites/unittest/exc/exc_test.cpp +++ b/testsuites/unittest/exc/exc_test.cpp @@ -41,7 +41,7 @@ public: static void TearDownTestCase(void) {} }; -#if defined(LOSCFG_USER_TEST_FULL) +#if defined(LOSCFG_USER_TEST_SMOKE) /* * * @tc.name: ItTestExc005 * @tc.desc: function for ExcTest diff --git a/testsuites/unittest/exc/full/it_test_exc_001.cpp b/testsuites/unittest/exc/smoke/it_test_exc_001.cpp similarity index 100% rename from testsuites/unittest/exc/full/it_test_exc_001.cpp rename to testsuites/unittest/exc/smoke/it_test_exc_001.cpp diff --git a/testsuites/unittest/exc/full/it_test_exc_002.cpp b/testsuites/unittest/exc/smoke/it_test_exc_002.cpp similarity index 100% rename from testsuites/unittest/exc/full/it_test_exc_002.cpp rename to testsuites/unittest/exc/smoke/it_test_exc_002.cpp diff --git a/testsuites/unittest/exc/full/it_test_exc_003.cpp b/testsuites/unittest/exc/smoke/it_test_exc_003.cpp similarity index 100% rename from testsuites/unittest/exc/full/it_test_exc_003.cpp rename to testsuites/unittest/exc/smoke/it_test_exc_003.cpp diff --git a/testsuites/unittest/exc/full/it_test_exc_004.cpp b/testsuites/unittest/exc/smoke/it_test_exc_004.cpp similarity index 100% rename from testsuites/unittest/exc/full/it_test_exc_004.cpp rename to testsuites/unittest/exc/smoke/it_test_exc_004.cpp diff --git a/testsuites/unittest/exc/full/it_test_exc_005.cpp b/testsuites/unittest/exc/smoke/it_test_exc_005.cpp similarity index 100% rename from testsuites/unittest/exc/full/it_test_exc_005.cpp rename to testsuites/unittest/exc/smoke/it_test_exc_005.cpp diff --git a/testsuites/unittest/fs/BUILD.gn b/testsuites/unittest/fs/BUILD.gn index 84ce458f..77dd1492 100644 --- a/testsuites/unittest/fs/BUILD.gn +++ b/testsuites/unittest/fs/BUILD.gn @@ -30,40 +30,43 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_fs_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "//kernel/liteos_a/testsuites/unittest/common/include", - "//kernel/liteos_a/testsuites/unittest/fs/vfs", - "//kernel/liteos_a/testsuites/unittest/fs/jffs", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "//kernel/liteos_a/testsuites/unittest/fs/vfs", + "//kernel/liteos_a/testsuites/unittest/fs/jffs", + "../common/include", +] + +sources_entry = [ + "../common/osTest.cpp", + "jffs/vfs_jffs_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "//kernel/liteos_a/testsuites/unittest/common/osTest.cpp", - "jffs/vfs_jffs_test.cpp", + "jffs/smoke/It_vfs_jffs_001.cpp", + "jffs/smoke/It_vfs_jffs_002.cpp", + "jffs/smoke/It_vfs_jffs_003.cpp", + "jffs/smoke/It_vfs_jffs_005.cpp", + "jffs/smoke/It_vfs_jffs_021.cpp", + "jffs/smoke/It_vfs_jffs_022.cpp", + "jffs/smoke/It_vfs_jffs_026.cpp", + "jffs/smoke/It_vfs_jffs_027.cpp", + "jffs/smoke/It_vfs_jffs_034.cpp", + "jffs/smoke/It_vfs_jffs_035.cpp", + "jffs/smoke/It_vfs_jffs_094.cpp", + "jffs/smoke/It_vfs_jffs_095.cpp", + #"jffs/smoke/It_vfs_jffs_103.cpp", + "jffs/smoke/It_vfs_jffs_535.cpp", + "jffs/smoke/It_vfs_jffs_Dac_001.cpp", ] - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "jffs/smoke/It_vfs_jffs_001.cpp", - "jffs/smoke/It_vfs_jffs_002.cpp", - "jffs/smoke/It_vfs_jffs_003.cpp", - "jffs/smoke/It_vfs_jffs_005.cpp", - "jffs/smoke/It_vfs_jffs_021.cpp", - "jffs/smoke/It_vfs_jffs_022.cpp", - "jffs/smoke/It_vfs_jffs_026.cpp", - "jffs/smoke/It_vfs_jffs_027.cpp", - "jffs/smoke/It_vfs_jffs_034.cpp", - "jffs/smoke/It_vfs_jffs_035.cpp", - "jffs/smoke/It_vfs_jffs_094.cpp", - "jffs/smoke/It_vfs_jffs_095.cpp", - #"jffs/smoke/It_vfs_jffs_103.cpp", - "jffs/smoke/It_vfs_jffs_535.cpp", - "jffs/smoke/It_vfs_jffs_Dac_001.cpp", - ] - sources += sources_smoke - } - if (LOSCFG_USER_TEST_PRESSURE == true) { - sources_pressure = [ + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_PRESSURE == true) { + source_set("sources_pressure") { + sources = [ "jffs/pressure/It_fs_jffs_performance_001.cpp", "jffs/pressure/It_fs_jffs_performance_002.cpp", "jffs/pressure/It_fs_jffs_performance_003.cpp", @@ -208,585 +211,614 @@ unittest("liteos_a_fs_unittest_door") { "jffs/pressure/It_vfs_jffs_multipthread_062.cpp", "jffs/pressure/It_vfs_jffs_multipthread_063.cpp", ] - sources += sources_pressure + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } - if (LOSCFG_USER_TEST_FULL == true) { - sources_full = [ - "jffs/full/It_jffs_001.cpp", - "jffs/full/It_jffs_002.cpp", - "jffs/full/It_jffs_003.cpp", - "jffs/full/It_jffs_004.cpp", - "jffs/full/It_jffs_005.cpp", - "jffs/full/It_jffs_006.cpp", - "jffs/full/It_jffs_007.cpp", - "jffs/full/It_jffs_008.cpp", - "jffs/full/It_jffs_009.cpp", - "jffs/full/It_jffs_010.cpp", - "jffs/full/It_jffs_011.cpp", - "jffs/full/It_jffs_012.cpp", - "jffs/full/It_jffs_013.cpp", - "jffs/full/It_jffs_014.cpp", - "jffs/full/It_jffs_015.cpp", - "jffs/full/It_jffs_016.cpp", - "jffs/full/It_jffs_017.cpp", - "jffs/full/It_jffs_018.cpp", - "jffs/full/It_jffs_019.cpp", - "jffs/full/It_jffs_020.cpp", - "jffs/full/It_jffs_021.cpp", - "jffs/full/It_jffs_022.cpp", - "jffs/full/It_jffs_023.cpp", - "jffs/full/It_jffs_024.cpp", - "jffs/full/It_jffs_025.cpp", - "jffs/full/It_jffs_026.cpp", - "jffs/full/It_jffs_027.cpp", - "jffs/full/It_jffs_028.cpp", - "jffs/full/It_jffs_029.cpp", - "jffs/full/It_jffs_030.cpp", - "jffs/full/It_jffs_031.cpp", - "jffs/full/It_jffs_032.cpp", - "jffs/full/It_jffs_033.cpp", - "jffs/full/It_jffs_034.cpp", - "jffs/full/It_jffs_035.cpp", - "jffs/full/It_jffs_036.cpp", - "jffs/full/It_jffs_037.cpp", - "jffs/full/It_jffs_038.cpp", - "jffs/full/It_jffs_039.cpp", - "jffs/full/It_jffs_040.cpp", - "jffs/full/It_jffs_041.cpp", - "jffs/full/It_jffs_042.cpp", - "jffs/full/It_jffs_043.cpp", - "jffs/full/It_jffs_044.cpp", - "jffs/full/It_vfs_jffs_004.cpp", - "jffs/full/It_vfs_jffs_006.cpp", - "jffs/full/It_vfs_jffs_007.cpp", - "jffs/full/It_vfs_jffs_008.cpp", - "jffs/full/It_vfs_jffs_009.cpp", - "jffs/full/It_vfs_jffs_010.cpp", - "jffs/full/It_vfs_jffs_011.cpp", - "jffs/full/It_vfs_jffs_012.cpp", - "jffs/full/It_vfs_jffs_013.cpp", - "jffs/full/It_vfs_jffs_014.cpp", - "jffs/full/It_vfs_jffs_015.cpp", - "jffs/full/It_vfs_jffs_016.cpp", - "jffs/full/It_vfs_jffs_017.cpp", - "jffs/full/It_vfs_jffs_018.cpp", - "jffs/full/It_vfs_jffs_019.cpp", - "jffs/full/It_vfs_jffs_020.cpp", - "jffs/full/It_vfs_jffs_023.cpp", - "jffs/full/It_vfs_jffs_024.cpp", - "jffs/full/It_vfs_jffs_025.cpp", - "jffs/full/It_vfs_jffs_028.cpp", - "jffs/full/It_vfs_jffs_029.cpp", - "jffs/full/It_vfs_jffs_030.cpp", - "jffs/full/It_vfs_jffs_031.cpp", - "jffs/full/It_vfs_jffs_032.cpp", - "jffs/full/It_vfs_jffs_033.cpp", - "jffs/full/It_vfs_jffs_037.cpp", - "jffs/full/It_vfs_jffs_038.cpp", - "jffs/full/It_vfs_jffs_039.cpp", - "jffs/full/It_vfs_jffs_040.cpp", - "jffs/full/It_vfs_jffs_041.cpp", - "jffs/full/It_vfs_jffs_042.cpp", - "jffs/full/It_vfs_jffs_043.cpp", - "jffs/full/It_vfs_jffs_044.cpp", - "jffs/full/It_vfs_jffs_045.cpp", - "jffs/full/It_vfs_jffs_046.cpp", - "jffs/full/It_vfs_jffs_048.cpp", - "jffs/full/It_vfs_jffs_049.cpp", - "jffs/full/It_vfs_jffs_050.cpp", - #"jffs/full/It_vfs_jffs_051.cpp", - "jffs/full/It_vfs_jffs_053.cpp", - "jffs/full/It_vfs_jffs_055.cpp", - "jffs/full/It_vfs_jffs_056.cpp", - "jffs/full/It_vfs_jffs_057.cpp", - "jffs/full/It_vfs_jffs_058.cpp", - "jffs/full/It_vfs_jffs_059.cpp", - "jffs/full/It_vfs_jffs_060.cpp", - "jffs/full/It_vfs_jffs_061.cpp", - "jffs/full/It_vfs_jffs_062.cpp", - "jffs/full/It_vfs_jffs_063.cpp", - "jffs/full/It_vfs_jffs_064.cpp", - "jffs/full/It_vfs_jffs_065.cpp", - "jffs/full/It_vfs_jffs_066.cpp", - "jffs/full/It_vfs_jffs_067.cpp", - "jffs/full/It_vfs_jffs_068.cpp", - "jffs/full/It_vfs_jffs_069.cpp", - "jffs/full/It_vfs_jffs_070.cpp", - "jffs/full/It_vfs_jffs_071.cpp", - "jffs/full/It_vfs_jffs_072.cpp", - "jffs/full/It_vfs_jffs_073.cpp", - "jffs/full/It_vfs_jffs_074.cpp", - "jffs/full/It_vfs_jffs_076.cpp", - "jffs/full/It_vfs_jffs_077.cpp", - "jffs/full/It_vfs_jffs_078.cpp", - "jffs/full/It_vfs_jffs_079.cpp", - "jffs/full/It_vfs_jffs_080.cpp", - "jffs/full/It_vfs_jffs_081.cpp", - "jffs/full/It_vfs_jffs_082.cpp", - "jffs/full/It_vfs_jffs_083.cpp", - "jffs/full/It_vfs_jffs_084.cpp", - "jffs/full/It_vfs_jffs_085.cpp", - "jffs/full/It_vfs_jffs_086.cpp", - "jffs/full/It_vfs_jffs_088.cpp", - "jffs/full/It_vfs_jffs_090.cpp", - "jffs/full/It_vfs_jffs_092.cpp", - "jffs/full/It_vfs_jffs_093.cpp", - "jffs/full/It_vfs_jffs_096.cpp", - "jffs/full/It_vfs_jffs_097.cpp", - "jffs/full/It_vfs_jffs_099.cpp", - "jffs/full/It_vfs_jffs_100.cpp", - "jffs/full/It_vfs_jffs_101.cpp", - "jffs/full/It_vfs_jffs_102.cpp", - "jffs/full/It_vfs_jffs_104.cpp", - "jffs/full/It_vfs_jffs_105.cpp", - "jffs/full/It_vfs_jffs_106.cpp", - "jffs/full/It_vfs_jffs_107.cpp", - "jffs/full/It_vfs_jffs_116.cpp", - "jffs/full/It_vfs_jffs_117.cpp", - "jffs/full/It_vfs_jffs_118.cpp", - "jffs/full/It_vfs_jffs_119.cpp", - "jffs/full/It_vfs_jffs_120.cpp", - "jffs/full/It_vfs_jffs_121.cpp", - "jffs/full/It_vfs_jffs_122.cpp", - "jffs/full/It_vfs_jffs_123.cpp", - "jffs/full/It_vfs_jffs_124.cpp", - "jffs/full/It_vfs_jffs_125.cpp", - "jffs/full/It_vfs_jffs_126.cpp", - "jffs/full/It_vfs_jffs_127.cpp", - "jffs/full/It_vfs_jffs_128.cpp", - "jffs/full/It_vfs_jffs_129.cpp", - "jffs/full/It_vfs_jffs_130.cpp", - "jffs/full/It_vfs_jffs_131.cpp", - "jffs/full/It_vfs_jffs_132.cpp", - "jffs/full/It_vfs_jffs_133.cpp", - "jffs/full/It_vfs_jffs_134.cpp", - "jffs/full/It_vfs_jffs_135.cpp", - "jffs/full/It_vfs_jffs_136.cpp", - "jffs/full/It_vfs_jffs_137.cpp", - "jffs/full/It_vfs_jffs_138.cpp", - "jffs/full/It_vfs_jffs_139.cpp", - "jffs/full/It_vfs_jffs_140.cpp", - "jffs/full/It_vfs_jffs_141.cpp", - "jffs/full/It_vfs_jffs_142.cpp", - "jffs/full/It_vfs_jffs_143.cpp", - "jffs/full/It_vfs_jffs_144.cpp", - "jffs/full/It_vfs_jffs_145.cpp", - "jffs/full/It_vfs_jffs_146.cpp", - "jffs/full/It_vfs_jffs_147.cpp", - "jffs/full/It_vfs_jffs_148.cpp", - "jffs/full/It_vfs_jffs_149.cpp", - "jffs/full/It_vfs_jffs_150.cpp", - "jffs/full/It_vfs_jffs_151.cpp", - "jffs/full/It_vfs_jffs_152.cpp", - "jffs/full/It_vfs_jffs_153.cpp", - "jffs/full/It_vfs_jffs_154.cpp", - "jffs/full/It_vfs_jffs_155.cpp", - "jffs/full/It_vfs_jffs_156.cpp", - "jffs/full/It_vfs_jffs_157.cpp", - "jffs/full/It_vfs_jffs_158.cpp", - "jffs/full/It_vfs_jffs_159.cpp", - "jffs/full/It_vfs_jffs_160.cpp", - "jffs/full/It_vfs_jffs_161.cpp", - "jffs/full/It_vfs_jffs_162.cpp", - "jffs/full/It_vfs_jffs_163.cpp", - "jffs/full/It_vfs_jffs_164.cpp", - "jffs/full/It_vfs_jffs_165.cpp", - "jffs/full/It_vfs_jffs_166.cpp", - "jffs/full/It_vfs_jffs_167.cpp", - "jffs/full/It_vfs_jffs_168.cpp", - "jffs/full/It_vfs_jffs_169.cpp", - "jffs/full/It_vfs_jffs_170.cpp", - "jffs/full/It_vfs_jffs_171.cpp", - "jffs/full/It_vfs_jffs_172.cpp", - "jffs/full/It_vfs_jffs_173.cpp", - "jffs/full/It_vfs_jffs_174.cpp", - "jffs/full/It_vfs_jffs_175.cpp", - "jffs/full/It_vfs_jffs_176.cpp", - "jffs/full/It_vfs_jffs_177.cpp", - "jffs/full/It_vfs_jffs_178.cpp", - "jffs/full/It_vfs_jffs_179.cpp", - "jffs/full/It_vfs_jffs_180.cpp", - "jffs/full/It_vfs_jffs_182.cpp", - "jffs/full/It_vfs_jffs_183.cpp", - "jffs/full/It_vfs_jffs_184.cpp", - "jffs/full/It_vfs_jffs_185.cpp", - "jffs/full/It_vfs_jffs_187.cpp", - "jffs/full/It_vfs_jffs_188.cpp", - "jffs/full/It_vfs_jffs_189.cpp", - "jffs/full/It_vfs_jffs_190.cpp", - "jffs/full/It_vfs_jffs_191.cpp", - "jffs/full/It_vfs_jffs_192.cpp", - "jffs/full/It_vfs_jffs_193.cpp", - "jffs/full/It_vfs_jffs_194.cpp", - "jffs/full/It_vfs_jffs_195.cpp", - "jffs/full/It_vfs_jffs_196.cpp", - "jffs/full/It_vfs_jffs_197.cpp", - "jffs/full/It_vfs_jffs_198.cpp", - "jffs/full/It_vfs_jffs_199.cpp", - "jffs/full/It_vfs_jffs_200.cpp", - "jffs/full/It_vfs_jffs_201.cpp", - "jffs/full/It_vfs_jffs_202.cpp", - "jffs/full/It_vfs_jffs_203.cpp", - "jffs/full/It_vfs_jffs_204.cpp", - "jffs/full/It_vfs_jffs_205.cpp", - "jffs/full/It_vfs_jffs_206.cpp", - "jffs/full/It_vfs_jffs_207.cpp", - "jffs/full/It_vfs_jffs_208.cpp", - "jffs/full/It_vfs_jffs_209.cpp", - "jffs/full/It_vfs_jffs_210.cpp", - "jffs/full/It_vfs_jffs_211.cpp", - "jffs/full/It_vfs_jffs_212.cpp", - "jffs/full/It_vfs_jffs_213.cpp", - "jffs/full/It_vfs_jffs_214.cpp", - "jffs/full/It_vfs_jffs_215.cpp", - "jffs/full/It_vfs_jffs_216.cpp", - "jffs/full/It_vfs_jffs_217.cpp", - "jffs/full/It_vfs_jffs_218.cpp", - "jffs/full/It_vfs_jffs_219.cpp", - "jffs/full/It_vfs_jffs_220.cpp", - "jffs/full/It_vfs_jffs_221.cpp", - "jffs/full/It_vfs_jffs_222.cpp", - "jffs/full/It_vfs_jffs_223.cpp", - "jffs/full/It_vfs_jffs_224.cpp", - "jffs/full/It_vfs_jffs_225.cpp", - "jffs/full/It_vfs_jffs_226.cpp", - "jffs/full/It_vfs_jffs_227.cpp", - "jffs/full/It_vfs_jffs_228.cpp", - "jffs/full/It_vfs_jffs_229.cpp", - "jffs/full/It_vfs_jffs_230.cpp", - "jffs/full/It_vfs_jffs_231.cpp", - "jffs/full/It_vfs_jffs_232.cpp", - "jffs/full/It_vfs_jffs_233.cpp", - "jffs/full/It_vfs_jffs_234.cpp", - "jffs/full/It_vfs_jffs_235.cpp", - "jffs/full/It_vfs_jffs_236.cpp", - "jffs/full/It_vfs_jffs_237.cpp", - "jffs/full/It_vfs_jffs_238.cpp", - "jffs/full/It_vfs_jffs_239.cpp", - "jffs/full/It_vfs_jffs_240.cpp", - "jffs/full/It_vfs_jffs_241.cpp", - "jffs/full/It_vfs_jffs_242.cpp", - "jffs/full/It_vfs_jffs_243.cpp", - "jffs/full/It_vfs_jffs_244.cpp", - "jffs/full/It_vfs_jffs_245.cpp", - "jffs/full/It_vfs_jffs_246.cpp", - "jffs/full/It_vfs_jffs_247.cpp", - "jffs/full/It_vfs_jffs_248.cpp", - "jffs/full/It_vfs_jffs_249.cpp", - "jffs/full/It_vfs_jffs_250.cpp", - "jffs/full/It_vfs_jffs_251.cpp", - "jffs/full/It_vfs_jffs_252.cpp", - "jffs/full/It_vfs_jffs_253.cpp", - "jffs/full/It_vfs_jffs_254.cpp", - "jffs/full/It_vfs_jffs_255.cpp", - "jffs/full/It_vfs_jffs_256.cpp", - "jffs/full/It_vfs_jffs_257.cpp", - "jffs/full/It_vfs_jffs_258.cpp", - "jffs/full/It_vfs_jffs_259.cpp", - "jffs/full/It_vfs_jffs_260.cpp", - "jffs/full/It_vfs_jffs_261.cpp", - "jffs/full/It_vfs_jffs_262.cpp", - "jffs/full/It_vfs_jffs_263.cpp", - "jffs/full/It_vfs_jffs_264.cpp", - "jffs/full/It_vfs_jffs_265.cpp", - "jffs/full/It_vfs_jffs_266.cpp", - "jffs/full/It_vfs_jffs_267.cpp", - "jffs/full/It_vfs_jffs_268.cpp", - "jffs/full/It_vfs_jffs_269.cpp", - "jffs/full/It_vfs_jffs_270.cpp", - "jffs/full/It_vfs_jffs_271.cpp", - "jffs/full/It_vfs_jffs_272.cpp", - "jffs/full/It_vfs_jffs_273.cpp", - "jffs/full/It_vfs_jffs_274.cpp", - "jffs/full/It_vfs_jffs_275.cpp", - "jffs/full/It_vfs_jffs_276.cpp", - "jffs/full/It_vfs_jffs_277.cpp", - "jffs/full/It_vfs_jffs_278.cpp", - "jffs/full/It_vfs_jffs_279.cpp", - "jffs/full/It_vfs_jffs_280.cpp", - "jffs/full/It_vfs_jffs_281.cpp", - "jffs/full/It_vfs_jffs_282.cpp", - "jffs/full/It_vfs_jffs_283.cpp", - "jffs/full/It_vfs_jffs_284.cpp", - "jffs/full/It_vfs_jffs_285.cpp", - "jffs/full/It_vfs_jffs_286.cpp", - "jffs/full/It_vfs_jffs_287.cpp", - "jffs/full/It_vfs_jffs_288.cpp", - "jffs/full/It_vfs_jffs_289.cpp", - "jffs/full/It_vfs_jffs_290.cpp", - "jffs/full/It_vfs_jffs_291.cpp", - "jffs/full/It_vfs_jffs_292.cpp", - "jffs/full/It_vfs_jffs_293.cpp", - "jffs/full/It_vfs_jffs_294.cpp", - "jffs/full/It_vfs_jffs_295.cpp", - "jffs/full/It_vfs_jffs_296.cpp", - "jffs/full/It_vfs_jffs_297.cpp", - "jffs/full/It_vfs_jffs_298.cpp", - "jffs/full/It_vfs_jffs_299.cpp", - "jffs/full/It_vfs_jffs_300.cpp", - "jffs/full/It_vfs_jffs_301.cpp", - "jffs/full/It_vfs_jffs_302.cpp", - "jffs/full/It_vfs_jffs_303.cpp", - "jffs/full/It_vfs_jffs_304.cpp", - "jffs/full/It_vfs_jffs_305.cpp", - "jffs/full/It_vfs_jffs_306.cpp", - "jffs/full/It_vfs_jffs_307.cpp", - "jffs/full/It_vfs_jffs_308.cpp", - "jffs/full/It_vfs_jffs_309.cpp", - "jffs/full/It_vfs_jffs_310.cpp", - "jffs/full/It_vfs_jffs_311.cpp", - "jffs/full/It_vfs_jffs_312.cpp", - "jffs/full/It_vfs_jffs_313.cpp", - "jffs/full/It_vfs_jffs_314.cpp", - "jffs/full/It_vfs_jffs_315.cpp", - "jffs/full/It_vfs_jffs_316.cpp", - "jffs/full/It_vfs_jffs_317.cpp", - "jffs/full/It_vfs_jffs_318.cpp", - "jffs/full/It_vfs_jffs_319.cpp", - "jffs/full/It_vfs_jffs_320.cpp", - "jffs/full/It_vfs_jffs_321.cpp", - "jffs/full/It_vfs_jffs_322.cpp", - "jffs/full/It_vfs_jffs_323.cpp", - "jffs/full/It_vfs_jffs_324.cpp", - "jffs/full/It_vfs_jffs_325.cpp", - "jffs/full/It_vfs_jffs_326.cpp", - "jffs/full/It_vfs_jffs_327.cpp", - "jffs/full/It_vfs_jffs_328.cpp", - "jffs/full/It_vfs_jffs_329.cpp", - "jffs/full/It_vfs_jffs_330.cpp", - "jffs/full/It_vfs_jffs_331.cpp", - "jffs/full/It_vfs_jffs_332.cpp", - "jffs/full/It_vfs_jffs_333.cpp", - "jffs/full/It_vfs_jffs_334.cpp", - "jffs/full/It_vfs_jffs_335.cpp", - "jffs/full/It_vfs_jffs_336.cpp", - "jffs/full/It_vfs_jffs_337.cpp", - "jffs/full/It_vfs_jffs_338.cpp", - "jffs/full/It_vfs_jffs_339.cpp", - "jffs/full/It_vfs_jffs_340.cpp", - "jffs/full/It_vfs_jffs_342.cpp", - "jffs/full/It_vfs_jffs_343.cpp", - "jffs/full/It_vfs_jffs_344.cpp", - "jffs/full/It_vfs_jffs_346.cpp", - "jffs/full/It_vfs_jffs_352.cpp", - "jffs/full/It_vfs_jffs_353.cpp", - "jffs/full/It_vfs_jffs_354.cpp", - "jffs/full/It_vfs_jffs_355.cpp", - "jffs/full/It_vfs_jffs_356.cpp", - "jffs/full/It_vfs_jffs_357.cpp", - "jffs/full/It_vfs_jffs_358.cpp", - "jffs/full/It_vfs_jffs_359.cpp", - "jffs/full/It_vfs_jffs_360.cpp", - "jffs/full/It_vfs_jffs_361.cpp", - "jffs/full/It_vfs_jffs_362.cpp", - "jffs/full/It_vfs_jffs_364.cpp", - "jffs/full/It_vfs_jffs_365.cpp", - "jffs/full/It_vfs_jffs_366.cpp", - "jffs/full/It_vfs_jffs_367.cpp", - "jffs/full/It_vfs_jffs_368.cpp", - "jffs/full/It_vfs_jffs_369.cpp", - "jffs/full/It_vfs_jffs_370.cpp", - "jffs/full/It_vfs_jffs_371.cpp", - "jffs/full/It_vfs_jffs_372.cpp", - "jffs/full/It_vfs_jffs_373.cpp", - "jffs/full/It_vfs_jffs_374.cpp", - "jffs/full/It_vfs_jffs_375.cpp", - "jffs/full/It_vfs_jffs_376.cpp", - "jffs/full/It_vfs_jffs_377.cpp", - "jffs/full/It_vfs_jffs_378.cpp", - "jffs/full/It_vfs_jffs_379.cpp", - "jffs/full/It_vfs_jffs_380.cpp", - "jffs/full/It_vfs_jffs_381.cpp", - "jffs/full/It_vfs_jffs_382.cpp", - "jffs/full/It_vfs_jffs_383.cpp", - "jffs/full/It_vfs_jffs_384.cpp", - "jffs/full/It_vfs_jffs_385.cpp", - "jffs/full/It_vfs_jffs_386.cpp", - "jffs/full/It_vfs_jffs_387.cpp", - "jffs/full/It_vfs_jffs_388.cpp", - "jffs/full/It_vfs_jffs_389.cpp", - "jffs/full/It_vfs_jffs_390.cpp", - "jffs/full/It_vfs_jffs_391.cpp", - "jffs/full/It_vfs_jffs_392.cpp", - "jffs/full/It_vfs_jffs_393.cpp", - "jffs/full/It_vfs_jffs_394.cpp", - "jffs/full/It_vfs_jffs_395.cpp", - "jffs/full/It_vfs_jffs_396.cpp", - "jffs/full/It_vfs_jffs_397.cpp", - "jffs/full/It_vfs_jffs_398.cpp", - "jffs/full/It_vfs_jffs_399.cpp", - "jffs/full/It_vfs_jffs_400.cpp", - "jffs/full/It_vfs_jffs_401.cpp", - "jffs/full/It_vfs_jffs_402.cpp", - "jffs/full/It_vfs_jffs_403.cpp", - "jffs/full/It_vfs_jffs_404.cpp", - "jffs/full/It_vfs_jffs_405.cpp", - "jffs/full/It_vfs_jffs_406.cpp", - "jffs/full/It_vfs_jffs_407.cpp", - "jffs/full/It_vfs_jffs_408.cpp", - "jffs/full/It_vfs_jffs_409.cpp", - "jffs/full/It_vfs_jffs_410.cpp", - "jffs/full/It_vfs_jffs_411.cpp", - "jffs/full/It_vfs_jffs_412.cpp", - "jffs/full/It_vfs_jffs_413.cpp", - "jffs/full/It_vfs_jffs_414.cpp", - "jffs/full/It_vfs_jffs_415.cpp", - "jffs/full/It_vfs_jffs_416.cpp", - "jffs/full/It_vfs_jffs_417.cpp", - "jffs/full/It_vfs_jffs_418.cpp", - "jffs/full/It_vfs_jffs_419.cpp", - "jffs/full/It_vfs_jffs_420.cpp", - "jffs/full/It_vfs_jffs_421.cpp", - "jffs/full/It_vfs_jffs_422.cpp", - "jffs/full/It_vfs_jffs_423.cpp", - "jffs/full/It_vfs_jffs_424.cpp", - "jffs/full/It_vfs_jffs_425.cpp", - "jffs/full/It_vfs_jffs_426.cpp", - "jffs/full/It_vfs_jffs_427.cpp", - "jffs/full/It_vfs_jffs_428.cpp", - "jffs/full/It_vfs_jffs_429.cpp", - "jffs/full/It_vfs_jffs_430.cpp", - "jffs/full/It_vfs_jffs_431.cpp", - "jffs/full/It_vfs_jffs_432.cpp", - "jffs/full/It_vfs_jffs_433.cpp", - "jffs/full/It_vfs_jffs_434.cpp", - "jffs/full/It_vfs_jffs_435.cpp", - "jffs/full/It_vfs_jffs_454.cpp", - "jffs/full/It_vfs_jffs_455.cpp", - "jffs/full/It_vfs_jffs_456.cpp", - "jffs/full/It_vfs_jffs_457.cpp", - "jffs/full/It_vfs_jffs_458.cpp", - "jffs/full/It_vfs_jffs_459.cpp", - "jffs/full/It_vfs_jffs_460.cpp", - "jffs/full/It_vfs_jffs_461.cpp", - "jffs/full/It_vfs_jffs_462.cpp", - "jffs/full/It_vfs_jffs_487.cpp", - "jffs/full/It_vfs_jffs_488.cpp", - "jffs/full/It_vfs_jffs_489.cpp", - "jffs/full/It_vfs_jffs_490.cpp", - "jffs/full/It_vfs_jffs_491.cpp", - "jffs/full/It_vfs_jffs_492.cpp", - "jffs/full/It_vfs_jffs_493.cpp", - "jffs/full/It_vfs_jffs_494.cpp", - "jffs/full/It_vfs_jffs_495.cpp", - "jffs/full/It_vfs_jffs_496.cpp", - "jffs/full/It_vfs_jffs_497.cpp", - "jffs/full/It_vfs_jffs_498.cpp", - "jffs/full/It_vfs_jffs_499.cpp", - "jffs/full/It_vfs_jffs_500.cpp", - "jffs/full/It_vfs_jffs_501.cpp", - "jffs/full/It_vfs_jffs_502.cpp", - "jffs/full/It_vfs_jffs_503.cpp", - "jffs/full/It_vfs_jffs_504.cpp", - "jffs/full/It_vfs_jffs_505.cpp", - "jffs/full/It_vfs_jffs_506.cpp", - "jffs/full/It_vfs_jffs_507.cpp", - "jffs/full/It_vfs_jffs_508.cpp", - "jffs/full/It_vfs_jffs_509.cpp", - "jffs/full/It_vfs_jffs_510.cpp", - "jffs/full/It_vfs_jffs_511.cpp", - "jffs/full/It_vfs_jffs_512.cpp", - "jffs/full/It_vfs_jffs_513.cpp", - "jffs/full/It_vfs_jffs_514.cpp", - "jffs/full/It_vfs_jffs_515.cpp", - "jffs/full/It_vfs_jffs_516.cpp", - "jffs/full/It_vfs_jffs_517.cpp", - "jffs/full/It_vfs_jffs_518.cpp", - "jffs/full/It_vfs_jffs_519.cpp", - "jffs/full/It_vfs_jffs_520.cpp", - "jffs/full/It_vfs_jffs_521.cpp", - "jffs/full/It_vfs_jffs_522.cpp", - "jffs/full/It_vfs_jffs_523.cpp", - "jffs/full/It_vfs_jffs_524.cpp", - "jffs/full/It_vfs_jffs_526.cpp", - "jffs/full/It_vfs_jffs_528.cpp", - "jffs/full/It_vfs_jffs_529.cpp", - "jffs/full/It_vfs_jffs_530.cpp", - "jffs/full/It_vfs_jffs_531.cpp", - "jffs/full/It_vfs_jffs_532.cpp", - "jffs/full/It_vfs_jffs_533.cpp", - "jffs/full/It_vfs_jffs_534.cpp", - "jffs/full/It_vfs_jffs_541.cpp", - "jffs/full/It_vfs_jffs_542.cpp", - "jffs/full/It_vfs_jffs_543.cpp", - "jffs/full/It_vfs_jffs_544.cpp", - "jffs/full/It_vfs_jffs_545.cpp", - "jffs/full/It_vfs_jffs_546.cpp", - "jffs/full/It_vfs_jffs_547.cpp", - "jffs/full/It_vfs_jffs_548.cpp", - "jffs/full/It_vfs_jffs_549.cpp", - "jffs/full/It_vfs_jffs_550.cpp", - "jffs/full/It_vfs_jffs_551.cpp", - "jffs/full/It_vfs_jffs_552.cpp", - "jffs/full/It_vfs_jffs_553.cpp", - "jffs/full/It_vfs_jffs_554.cpp", - "jffs/full/It_vfs_jffs_555.cpp", - "jffs/full/It_vfs_jffs_556.cpp", - "jffs/full/It_vfs_jffs_557.cpp", - "jffs/full/It_vfs_jffs_560.cpp", - "jffs/full/It_vfs_jffs_562.cpp", - "jffs/full/It_vfs_jffs_563.cpp", - "jffs/full/It_vfs_jffs_564.cpp", - "jffs/full/It_vfs_jffs_565.cpp", - "jffs/full/It_vfs_jffs_566.cpp", - "jffs/full/It_vfs_jffs_567.cpp", - "jffs/full/It_vfs_jffs_568.cpp", - "jffs/full/It_vfs_jffs_569.cpp", - "jffs/full/It_vfs_jffs_570.cpp", - "jffs/full/It_vfs_jffs_571.cpp", - "jffs/full/It_vfs_jffs_572.cpp", - "jffs/full/It_vfs_jffs_573.cpp", - "jffs/full/It_vfs_jffs_574.cpp", - "jffs/full/It_vfs_jffs_583.cpp", - "jffs/full/It_vfs_jffs_584.cpp", - "jffs/full/It_vfs_jffs_586.cpp", - "jffs/full/It_vfs_jffs_589.cpp", - "jffs/full/It_vfs_jffs_590.cpp", - "jffs/full/It_vfs_jffs_591.cpp", - "jffs/full/It_vfs_jffs_592.cpp", - "jffs/full/It_vfs_jffs_593.cpp", - "jffs/full/It_vfs_jffs_594.cpp", - "jffs/full/It_vfs_jffs_595.cpp", - "jffs/full/It_vfs_jffs_596.cpp", - "jffs/full/It_vfs_jffs_603.cpp", - "jffs/full/It_vfs_jffs_636.cpp", - "jffs/full/It_vfs_jffs_643.cpp", - "jffs/full/It_vfs_jffs_644.cpp", - "jffs/full/It_vfs_jffs_645.cpp", - "jffs/full/It_vfs_jffs_646.cpp", - "jffs/full/It_vfs_jffs_648.cpp", - "jffs/full/It_vfs_jffs_649.cpp", - "jffs/full/It_vfs_jffs_650.cpp", - "jffs/full/It_vfs_jffs_651.cpp", - "jffs/full/It_vfs_jffs_652.cpp", - "jffs/full/It_vfs_jffs_653.cpp", - "jffs/full/It_vfs_jffs_654.cpp", - "jffs/full/It_vfs_jffs_655.cpp", - "jffs/full/It_vfs_jffs_656.cpp", - "jffs/full/It_vfs_jffs_663.cpp", - "jffs/full/It_vfs_jffs_664.cpp", - "jffs/full/It_vfs_jffs_665.cpp", - "jffs/full/It_vfs_jffs_666.cpp", - "jffs/full/It_vfs_jffs_668.cpp", - "jffs/full/It_vfs_jffs_669.cpp", - "jffs/full/It_vfs_jffs_670.cpp", - "jffs/full/It_vfs_jffs_671.cpp", - "jffs/full/It_vfs_jffs_672.cpp", - "jffs/full/It_vfs_jffs_673.cpp", - "jffs/full/It_vfs_jffs_674.cpp", - "jffs/full/It_vfs_jffs_675.cpp", - "jffs/full/It_vfs_jffs_676.cpp", - "jffs/full/It_vfs_jffs_690.cpp", - "jffs/full/It_vfs_jffs_694.cpp", - "jffs/full/It_vfs_jffs_696.cpp", - "jffs/full/It_vfs_jffs_697.cpp", - "jffs/full/It_vfs_jffs_700.cpp", - "jffs/full/It_vfs_jffs_701.cpp", - "jffs/full/It_vfs_jffs_807.cpp", - "jffs/full/It_vfs_jffs_808.cpp", - ] - sources += sources_full - } - deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "//kernel/liteos_a/testsuites/unittest:public_config" ] } + +source_set("sources_other") { + sources = [ + "jffs/full/It_jffs_001.cpp", + "jffs/full/It_jffs_002.cpp", + "jffs/full/It_jffs_003.cpp", + "jffs/full/It_jffs_004.cpp", + "jffs/full/It_jffs_005.cpp", + "jffs/full/It_jffs_006.cpp", + "jffs/full/It_jffs_007.cpp", + "jffs/full/It_jffs_008.cpp", + "jffs/full/It_jffs_009.cpp", + "jffs/full/It_jffs_010.cpp", + "jffs/full/It_jffs_011.cpp", + "jffs/full/It_jffs_012.cpp", + "jffs/full/It_jffs_013.cpp", + "jffs/full/It_jffs_014.cpp", + "jffs/full/It_jffs_015.cpp", + "jffs/full/It_jffs_016.cpp", + "jffs/full/It_jffs_017.cpp", + "jffs/full/It_jffs_018.cpp", + "jffs/full/It_jffs_019.cpp", + "jffs/full/It_jffs_020.cpp", + "jffs/full/It_jffs_021.cpp", + "jffs/full/It_jffs_022.cpp", + "jffs/full/It_jffs_023.cpp", + "jffs/full/It_jffs_024.cpp", + "jffs/full/It_jffs_025.cpp", + "jffs/full/It_jffs_026.cpp", + "jffs/full/It_jffs_027.cpp", + "jffs/full/It_jffs_028.cpp", + "jffs/full/It_jffs_029.cpp", + "jffs/full/It_jffs_030.cpp", + "jffs/full/It_jffs_031.cpp", + "jffs/full/It_jffs_032.cpp", + "jffs/full/It_jffs_033.cpp", + "jffs/full/It_jffs_034.cpp", + "jffs/full/It_jffs_035.cpp", + "jffs/full/It_jffs_036.cpp", + "jffs/full/It_jffs_037.cpp", + "jffs/full/It_jffs_038.cpp", + "jffs/full/It_jffs_039.cpp", + "jffs/full/It_jffs_040.cpp", + "jffs/full/It_jffs_041.cpp", + "jffs/full/It_jffs_042.cpp", + "jffs/full/It_jffs_043.cpp", + "jffs/full/It_jffs_044.cpp", + "jffs/full/It_vfs_jffs_004.cpp", + "jffs/full/It_vfs_jffs_006.cpp", + "jffs/full/It_vfs_jffs_007.cpp", + "jffs/full/It_vfs_jffs_008.cpp", + "jffs/full/It_vfs_jffs_009.cpp", + "jffs/full/It_vfs_jffs_010.cpp", + "jffs/full/It_vfs_jffs_011.cpp", + "jffs/full/It_vfs_jffs_012.cpp", + "jffs/full/It_vfs_jffs_013.cpp", + "jffs/full/It_vfs_jffs_014.cpp", + "jffs/full/It_vfs_jffs_015.cpp", + "jffs/full/It_vfs_jffs_016.cpp", + "jffs/full/It_vfs_jffs_017.cpp", + "jffs/full/It_vfs_jffs_018.cpp", + "jffs/full/It_vfs_jffs_019.cpp", + "jffs/full/It_vfs_jffs_020.cpp", + "jffs/full/It_vfs_jffs_023.cpp", + "jffs/full/It_vfs_jffs_024.cpp", + "jffs/full/It_vfs_jffs_025.cpp", + "jffs/full/It_vfs_jffs_028.cpp", + "jffs/full/It_vfs_jffs_029.cpp", + "jffs/full/It_vfs_jffs_030.cpp", + "jffs/full/It_vfs_jffs_031.cpp", + "jffs/full/It_vfs_jffs_032.cpp", + "jffs/full/It_vfs_jffs_033.cpp", + "jffs/full/It_vfs_jffs_037.cpp", + "jffs/full/It_vfs_jffs_038.cpp", + "jffs/full/It_vfs_jffs_039.cpp", + "jffs/full/It_vfs_jffs_040.cpp", + "jffs/full/It_vfs_jffs_041.cpp", + "jffs/full/It_vfs_jffs_042.cpp", + "jffs/full/It_vfs_jffs_043.cpp", + "jffs/full/It_vfs_jffs_044.cpp", + "jffs/full/It_vfs_jffs_045.cpp", + "jffs/full/It_vfs_jffs_046.cpp", + "jffs/full/It_vfs_jffs_048.cpp", + "jffs/full/It_vfs_jffs_049.cpp", + "jffs/full/It_vfs_jffs_050.cpp", + #"jffs/full/It_vfs_jffs_051.cpp", + "jffs/full/It_vfs_jffs_053.cpp", + "jffs/full/It_vfs_jffs_055.cpp", + "jffs/full/It_vfs_jffs_056.cpp", + "jffs/full/It_vfs_jffs_057.cpp", + "jffs/full/It_vfs_jffs_058.cpp", + "jffs/full/It_vfs_jffs_059.cpp", + "jffs/full/It_vfs_jffs_060.cpp", + "jffs/full/It_vfs_jffs_061.cpp", + "jffs/full/It_vfs_jffs_062.cpp", + "jffs/full/It_vfs_jffs_063.cpp", + "jffs/full/It_vfs_jffs_064.cpp", + "jffs/full/It_vfs_jffs_065.cpp", + "jffs/full/It_vfs_jffs_066.cpp", + "jffs/full/It_vfs_jffs_067.cpp", + "jffs/full/It_vfs_jffs_068.cpp", + "jffs/full/It_vfs_jffs_069.cpp", + "jffs/full/It_vfs_jffs_070.cpp", + "jffs/full/It_vfs_jffs_071.cpp", + "jffs/full/It_vfs_jffs_072.cpp", + "jffs/full/It_vfs_jffs_073.cpp", + "jffs/full/It_vfs_jffs_074.cpp", + "jffs/full/It_vfs_jffs_076.cpp", + "jffs/full/It_vfs_jffs_077.cpp", + "jffs/full/It_vfs_jffs_078.cpp", + "jffs/full/It_vfs_jffs_079.cpp", + "jffs/full/It_vfs_jffs_080.cpp", + "jffs/full/It_vfs_jffs_081.cpp", + "jffs/full/It_vfs_jffs_082.cpp", + "jffs/full/It_vfs_jffs_083.cpp", + "jffs/full/It_vfs_jffs_084.cpp", + "jffs/full/It_vfs_jffs_085.cpp", + "jffs/full/It_vfs_jffs_086.cpp", + "jffs/full/It_vfs_jffs_088.cpp", + "jffs/full/It_vfs_jffs_090.cpp", + "jffs/full/It_vfs_jffs_092.cpp", + "jffs/full/It_vfs_jffs_093.cpp", + "jffs/full/It_vfs_jffs_096.cpp", + "jffs/full/It_vfs_jffs_097.cpp", + "jffs/full/It_vfs_jffs_099.cpp", + "jffs/full/It_vfs_jffs_100.cpp", + "jffs/full/It_vfs_jffs_101.cpp", + "jffs/full/It_vfs_jffs_102.cpp", + "jffs/full/It_vfs_jffs_104.cpp", + "jffs/full/It_vfs_jffs_105.cpp", + "jffs/full/It_vfs_jffs_106.cpp", + "jffs/full/It_vfs_jffs_107.cpp", + "jffs/full/It_vfs_jffs_116.cpp", + "jffs/full/It_vfs_jffs_117.cpp", + "jffs/full/It_vfs_jffs_118.cpp", + "jffs/full/It_vfs_jffs_119.cpp", + "jffs/full/It_vfs_jffs_120.cpp", + "jffs/full/It_vfs_jffs_121.cpp", + "jffs/full/It_vfs_jffs_122.cpp", + "jffs/full/It_vfs_jffs_123.cpp", + "jffs/full/It_vfs_jffs_124.cpp", + "jffs/full/It_vfs_jffs_125.cpp", + "jffs/full/It_vfs_jffs_126.cpp", + "jffs/full/It_vfs_jffs_127.cpp", + "jffs/full/It_vfs_jffs_128.cpp", + "jffs/full/It_vfs_jffs_129.cpp", + "jffs/full/It_vfs_jffs_130.cpp", + "jffs/full/It_vfs_jffs_131.cpp", + "jffs/full/It_vfs_jffs_132.cpp", + "jffs/full/It_vfs_jffs_133.cpp", + "jffs/full/It_vfs_jffs_134.cpp", + "jffs/full/It_vfs_jffs_135.cpp", + "jffs/full/It_vfs_jffs_136.cpp", + "jffs/full/It_vfs_jffs_137.cpp", + "jffs/full/It_vfs_jffs_138.cpp", + "jffs/full/It_vfs_jffs_139.cpp", + "jffs/full/It_vfs_jffs_140.cpp", + "jffs/full/It_vfs_jffs_141.cpp", + "jffs/full/It_vfs_jffs_142.cpp", + "jffs/full/It_vfs_jffs_143.cpp", + "jffs/full/It_vfs_jffs_144.cpp", + "jffs/full/It_vfs_jffs_145.cpp", + "jffs/full/It_vfs_jffs_146.cpp", + "jffs/full/It_vfs_jffs_147.cpp", + "jffs/full/It_vfs_jffs_148.cpp", + "jffs/full/It_vfs_jffs_149.cpp", + "jffs/full/It_vfs_jffs_150.cpp", + "jffs/full/It_vfs_jffs_151.cpp", + "jffs/full/It_vfs_jffs_152.cpp", + "jffs/full/It_vfs_jffs_153.cpp", + "jffs/full/It_vfs_jffs_154.cpp", + "jffs/full/It_vfs_jffs_155.cpp", + "jffs/full/It_vfs_jffs_156.cpp", + "jffs/full/It_vfs_jffs_157.cpp", + "jffs/full/It_vfs_jffs_158.cpp", + "jffs/full/It_vfs_jffs_159.cpp", + "jffs/full/It_vfs_jffs_160.cpp", + "jffs/full/It_vfs_jffs_161.cpp", + "jffs/full/It_vfs_jffs_162.cpp", + "jffs/full/It_vfs_jffs_163.cpp", + "jffs/full/It_vfs_jffs_164.cpp", + "jffs/full/It_vfs_jffs_165.cpp", + "jffs/full/It_vfs_jffs_166.cpp", + "jffs/full/It_vfs_jffs_167.cpp", + "jffs/full/It_vfs_jffs_168.cpp", + "jffs/full/It_vfs_jffs_169.cpp", + "jffs/full/It_vfs_jffs_170.cpp", + "jffs/full/It_vfs_jffs_171.cpp", + "jffs/full/It_vfs_jffs_172.cpp", + "jffs/full/It_vfs_jffs_173.cpp", + "jffs/full/It_vfs_jffs_174.cpp", + "jffs/full/It_vfs_jffs_175.cpp", + "jffs/full/It_vfs_jffs_176.cpp", + "jffs/full/It_vfs_jffs_177.cpp", + "jffs/full/It_vfs_jffs_178.cpp", + "jffs/full/It_vfs_jffs_179.cpp", + "jffs/full/It_vfs_jffs_180.cpp", + "jffs/full/It_vfs_jffs_182.cpp", + "jffs/full/It_vfs_jffs_183.cpp", + "jffs/full/It_vfs_jffs_184.cpp", + "jffs/full/It_vfs_jffs_185.cpp", + "jffs/full/It_vfs_jffs_187.cpp", + "jffs/full/It_vfs_jffs_188.cpp", + "jffs/full/It_vfs_jffs_189.cpp", + "jffs/full/It_vfs_jffs_190.cpp", + "jffs/full/It_vfs_jffs_191.cpp", + "jffs/full/It_vfs_jffs_192.cpp", + "jffs/full/It_vfs_jffs_193.cpp", + "jffs/full/It_vfs_jffs_194.cpp", + "jffs/full/It_vfs_jffs_195.cpp", + "jffs/full/It_vfs_jffs_196.cpp", + "jffs/full/It_vfs_jffs_197.cpp", + "jffs/full/It_vfs_jffs_198.cpp", + "jffs/full/It_vfs_jffs_199.cpp", + "jffs/full/It_vfs_jffs_200.cpp", + "jffs/full/It_vfs_jffs_201.cpp", + "jffs/full/It_vfs_jffs_202.cpp", + "jffs/full/It_vfs_jffs_203.cpp", + "jffs/full/It_vfs_jffs_204.cpp", + "jffs/full/It_vfs_jffs_205.cpp", + "jffs/full/It_vfs_jffs_206.cpp", + "jffs/full/It_vfs_jffs_207.cpp", + "jffs/full/It_vfs_jffs_208.cpp", + "jffs/full/It_vfs_jffs_209.cpp", + "jffs/full/It_vfs_jffs_210.cpp", + "jffs/full/It_vfs_jffs_211.cpp", + "jffs/full/It_vfs_jffs_212.cpp", + "jffs/full/It_vfs_jffs_213.cpp", + "jffs/full/It_vfs_jffs_214.cpp", + "jffs/full/It_vfs_jffs_215.cpp", + "jffs/full/It_vfs_jffs_216.cpp", + "jffs/full/It_vfs_jffs_217.cpp", + "jffs/full/It_vfs_jffs_218.cpp", + "jffs/full/It_vfs_jffs_219.cpp", + "jffs/full/It_vfs_jffs_220.cpp", + "jffs/full/It_vfs_jffs_221.cpp", + "jffs/full/It_vfs_jffs_222.cpp", + "jffs/full/It_vfs_jffs_223.cpp", + "jffs/full/It_vfs_jffs_224.cpp", + "jffs/full/It_vfs_jffs_225.cpp", + "jffs/full/It_vfs_jffs_226.cpp", + "jffs/full/It_vfs_jffs_227.cpp", + "jffs/full/It_vfs_jffs_228.cpp", + "jffs/full/It_vfs_jffs_229.cpp", + "jffs/full/It_vfs_jffs_230.cpp", + "jffs/full/It_vfs_jffs_231.cpp", + "jffs/full/It_vfs_jffs_232.cpp", + "jffs/full/It_vfs_jffs_233.cpp", + "jffs/full/It_vfs_jffs_234.cpp", + "jffs/full/It_vfs_jffs_235.cpp", + "jffs/full/It_vfs_jffs_236.cpp", + "jffs/full/It_vfs_jffs_237.cpp", + "jffs/full/It_vfs_jffs_238.cpp", + "jffs/full/It_vfs_jffs_239.cpp", + "jffs/full/It_vfs_jffs_240.cpp", + "jffs/full/It_vfs_jffs_241.cpp", + "jffs/full/It_vfs_jffs_242.cpp", + "jffs/full/It_vfs_jffs_243.cpp", + "jffs/full/It_vfs_jffs_244.cpp", + "jffs/full/It_vfs_jffs_245.cpp", + "jffs/full/It_vfs_jffs_246.cpp", + "jffs/full/It_vfs_jffs_247.cpp", + "jffs/full/It_vfs_jffs_248.cpp", + "jffs/full/It_vfs_jffs_249.cpp", + "jffs/full/It_vfs_jffs_250.cpp", + "jffs/full/It_vfs_jffs_251.cpp", + "jffs/full/It_vfs_jffs_252.cpp", + "jffs/full/It_vfs_jffs_253.cpp", + "jffs/full/It_vfs_jffs_254.cpp", + "jffs/full/It_vfs_jffs_255.cpp", + "jffs/full/It_vfs_jffs_256.cpp", + "jffs/full/It_vfs_jffs_257.cpp", + "jffs/full/It_vfs_jffs_258.cpp", + "jffs/full/It_vfs_jffs_259.cpp", + "jffs/full/It_vfs_jffs_260.cpp", + "jffs/full/It_vfs_jffs_261.cpp", + "jffs/full/It_vfs_jffs_262.cpp", + "jffs/full/It_vfs_jffs_263.cpp", + "jffs/full/It_vfs_jffs_264.cpp", + "jffs/full/It_vfs_jffs_265.cpp", + "jffs/full/It_vfs_jffs_266.cpp", + "jffs/full/It_vfs_jffs_267.cpp", + "jffs/full/It_vfs_jffs_268.cpp", + "jffs/full/It_vfs_jffs_269.cpp", + "jffs/full/It_vfs_jffs_270.cpp", + "jffs/full/It_vfs_jffs_271.cpp", + "jffs/full/It_vfs_jffs_272.cpp", + "jffs/full/It_vfs_jffs_273.cpp", + "jffs/full/It_vfs_jffs_274.cpp", + "jffs/full/It_vfs_jffs_275.cpp", + "jffs/full/It_vfs_jffs_276.cpp", + "jffs/full/It_vfs_jffs_277.cpp", + "jffs/full/It_vfs_jffs_278.cpp", + "jffs/full/It_vfs_jffs_279.cpp", + "jffs/full/It_vfs_jffs_280.cpp", + "jffs/full/It_vfs_jffs_281.cpp", + "jffs/full/It_vfs_jffs_282.cpp", + "jffs/full/It_vfs_jffs_283.cpp", + "jffs/full/It_vfs_jffs_284.cpp", + "jffs/full/It_vfs_jffs_285.cpp", + "jffs/full/It_vfs_jffs_286.cpp", + "jffs/full/It_vfs_jffs_287.cpp", + "jffs/full/It_vfs_jffs_288.cpp", + "jffs/full/It_vfs_jffs_289.cpp", + "jffs/full/It_vfs_jffs_290.cpp", + "jffs/full/It_vfs_jffs_291.cpp", + "jffs/full/It_vfs_jffs_292.cpp", + "jffs/full/It_vfs_jffs_293.cpp", + "jffs/full/It_vfs_jffs_294.cpp", + "jffs/full/It_vfs_jffs_295.cpp", + "jffs/full/It_vfs_jffs_296.cpp", + "jffs/full/It_vfs_jffs_297.cpp", + "jffs/full/It_vfs_jffs_298.cpp", + "jffs/full/It_vfs_jffs_299.cpp", + "jffs/full/It_vfs_jffs_300.cpp", + "jffs/full/It_vfs_jffs_301.cpp", + "jffs/full/It_vfs_jffs_302.cpp", + "jffs/full/It_vfs_jffs_303.cpp", + "jffs/full/It_vfs_jffs_304.cpp", + "jffs/full/It_vfs_jffs_305.cpp", + "jffs/full/It_vfs_jffs_306.cpp", + "jffs/full/It_vfs_jffs_307.cpp", + "jffs/full/It_vfs_jffs_308.cpp", + "jffs/full/It_vfs_jffs_309.cpp", + "jffs/full/It_vfs_jffs_310.cpp", + "jffs/full/It_vfs_jffs_311.cpp", + "jffs/full/It_vfs_jffs_312.cpp", + "jffs/full/It_vfs_jffs_313.cpp", + "jffs/full/It_vfs_jffs_314.cpp", + "jffs/full/It_vfs_jffs_315.cpp", + "jffs/full/It_vfs_jffs_316.cpp", + "jffs/full/It_vfs_jffs_317.cpp", + "jffs/full/It_vfs_jffs_318.cpp", + "jffs/full/It_vfs_jffs_319.cpp", + "jffs/full/It_vfs_jffs_320.cpp", + "jffs/full/It_vfs_jffs_321.cpp", + "jffs/full/It_vfs_jffs_322.cpp", + "jffs/full/It_vfs_jffs_323.cpp", + "jffs/full/It_vfs_jffs_324.cpp", + "jffs/full/It_vfs_jffs_325.cpp", + "jffs/full/It_vfs_jffs_326.cpp", + "jffs/full/It_vfs_jffs_327.cpp", + "jffs/full/It_vfs_jffs_328.cpp", + "jffs/full/It_vfs_jffs_329.cpp", + "jffs/full/It_vfs_jffs_330.cpp", + "jffs/full/It_vfs_jffs_331.cpp", + "jffs/full/It_vfs_jffs_332.cpp", + "jffs/full/It_vfs_jffs_333.cpp", + "jffs/full/It_vfs_jffs_334.cpp", + "jffs/full/It_vfs_jffs_335.cpp", + "jffs/full/It_vfs_jffs_336.cpp", + "jffs/full/It_vfs_jffs_337.cpp", + "jffs/full/It_vfs_jffs_338.cpp", + "jffs/full/It_vfs_jffs_339.cpp", + "jffs/full/It_vfs_jffs_340.cpp", + "jffs/full/It_vfs_jffs_342.cpp", + "jffs/full/It_vfs_jffs_343.cpp", + "jffs/full/It_vfs_jffs_344.cpp", + "jffs/full/It_vfs_jffs_346.cpp", + "jffs/full/It_vfs_jffs_352.cpp", + "jffs/full/It_vfs_jffs_353.cpp", + "jffs/full/It_vfs_jffs_354.cpp", + "jffs/full/It_vfs_jffs_355.cpp", + "jffs/full/It_vfs_jffs_356.cpp", + "jffs/full/It_vfs_jffs_357.cpp", + "jffs/full/It_vfs_jffs_358.cpp", + "jffs/full/It_vfs_jffs_359.cpp", + "jffs/full/It_vfs_jffs_360.cpp", + "jffs/full/It_vfs_jffs_361.cpp", + "jffs/full/It_vfs_jffs_362.cpp", + "jffs/full/It_vfs_jffs_364.cpp", + "jffs/full/It_vfs_jffs_365.cpp", + "jffs/full/It_vfs_jffs_366.cpp", + "jffs/full/It_vfs_jffs_367.cpp", + "jffs/full/It_vfs_jffs_368.cpp", + "jffs/full/It_vfs_jffs_369.cpp", + "jffs/full/It_vfs_jffs_370.cpp", + "jffs/full/It_vfs_jffs_371.cpp", + "jffs/full/It_vfs_jffs_372.cpp", + "jffs/full/It_vfs_jffs_373.cpp", + "jffs/full/It_vfs_jffs_374.cpp", + "jffs/full/It_vfs_jffs_375.cpp", + "jffs/full/It_vfs_jffs_376.cpp", + "jffs/full/It_vfs_jffs_377.cpp", + "jffs/full/It_vfs_jffs_378.cpp", + "jffs/full/It_vfs_jffs_379.cpp", + "jffs/full/It_vfs_jffs_380.cpp", + "jffs/full/It_vfs_jffs_381.cpp", + "jffs/full/It_vfs_jffs_382.cpp", + "jffs/full/It_vfs_jffs_383.cpp", + "jffs/full/It_vfs_jffs_384.cpp", + "jffs/full/It_vfs_jffs_385.cpp", + "jffs/full/It_vfs_jffs_386.cpp", + "jffs/full/It_vfs_jffs_387.cpp", + "jffs/full/It_vfs_jffs_388.cpp", + "jffs/full/It_vfs_jffs_389.cpp", + "jffs/full/It_vfs_jffs_390.cpp", + "jffs/full/It_vfs_jffs_391.cpp", + "jffs/full/It_vfs_jffs_392.cpp", + "jffs/full/It_vfs_jffs_393.cpp", + "jffs/full/It_vfs_jffs_394.cpp", + "jffs/full/It_vfs_jffs_395.cpp", + "jffs/full/It_vfs_jffs_396.cpp", + "jffs/full/It_vfs_jffs_397.cpp", + "jffs/full/It_vfs_jffs_398.cpp", + "jffs/full/It_vfs_jffs_399.cpp", + "jffs/full/It_vfs_jffs_400.cpp", + "jffs/full/It_vfs_jffs_401.cpp", + "jffs/full/It_vfs_jffs_402.cpp", + "jffs/full/It_vfs_jffs_403.cpp", + "jffs/full/It_vfs_jffs_404.cpp", + "jffs/full/It_vfs_jffs_405.cpp", + "jffs/full/It_vfs_jffs_406.cpp", + "jffs/full/It_vfs_jffs_407.cpp", + "jffs/full/It_vfs_jffs_408.cpp", + "jffs/full/It_vfs_jffs_409.cpp", + "jffs/full/It_vfs_jffs_410.cpp", + "jffs/full/It_vfs_jffs_411.cpp", + "jffs/full/It_vfs_jffs_412.cpp", + "jffs/full/It_vfs_jffs_413.cpp", + "jffs/full/It_vfs_jffs_414.cpp", + "jffs/full/It_vfs_jffs_415.cpp", + "jffs/full/It_vfs_jffs_416.cpp", + "jffs/full/It_vfs_jffs_417.cpp", + "jffs/full/It_vfs_jffs_418.cpp", + "jffs/full/It_vfs_jffs_419.cpp", + "jffs/full/It_vfs_jffs_420.cpp", + "jffs/full/It_vfs_jffs_421.cpp", + "jffs/full/It_vfs_jffs_422.cpp", + "jffs/full/It_vfs_jffs_423.cpp", + "jffs/full/It_vfs_jffs_424.cpp", + "jffs/full/It_vfs_jffs_425.cpp", + "jffs/full/It_vfs_jffs_426.cpp", + "jffs/full/It_vfs_jffs_427.cpp", + "jffs/full/It_vfs_jffs_428.cpp", + "jffs/full/It_vfs_jffs_429.cpp", + "jffs/full/It_vfs_jffs_430.cpp", + "jffs/full/It_vfs_jffs_431.cpp", + "jffs/full/It_vfs_jffs_432.cpp", + "jffs/full/It_vfs_jffs_433.cpp", + "jffs/full/It_vfs_jffs_434.cpp", + "jffs/full/It_vfs_jffs_435.cpp", + "jffs/full/It_vfs_jffs_454.cpp", + "jffs/full/It_vfs_jffs_455.cpp", + "jffs/full/It_vfs_jffs_456.cpp", + "jffs/full/It_vfs_jffs_457.cpp", + "jffs/full/It_vfs_jffs_458.cpp", + "jffs/full/It_vfs_jffs_459.cpp", + "jffs/full/It_vfs_jffs_460.cpp", + "jffs/full/It_vfs_jffs_461.cpp", + "jffs/full/It_vfs_jffs_462.cpp", + "jffs/full/It_vfs_jffs_487.cpp", + "jffs/full/It_vfs_jffs_488.cpp", + "jffs/full/It_vfs_jffs_489.cpp", + "jffs/full/It_vfs_jffs_490.cpp", + "jffs/full/It_vfs_jffs_491.cpp", + "jffs/full/It_vfs_jffs_492.cpp", + "jffs/full/It_vfs_jffs_493.cpp", + "jffs/full/It_vfs_jffs_494.cpp", + "jffs/full/It_vfs_jffs_495.cpp", + "jffs/full/It_vfs_jffs_496.cpp", + "jffs/full/It_vfs_jffs_497.cpp", + "jffs/full/It_vfs_jffs_498.cpp", + "jffs/full/It_vfs_jffs_499.cpp", + "jffs/full/It_vfs_jffs_500.cpp", + "jffs/full/It_vfs_jffs_501.cpp", + "jffs/full/It_vfs_jffs_502.cpp", + "jffs/full/It_vfs_jffs_503.cpp", + "jffs/full/It_vfs_jffs_504.cpp", + "jffs/full/It_vfs_jffs_505.cpp", + "jffs/full/It_vfs_jffs_506.cpp", + "jffs/full/It_vfs_jffs_507.cpp", + "jffs/full/It_vfs_jffs_508.cpp", + "jffs/full/It_vfs_jffs_509.cpp", + "jffs/full/It_vfs_jffs_510.cpp", + "jffs/full/It_vfs_jffs_511.cpp", + "jffs/full/It_vfs_jffs_512.cpp", + "jffs/full/It_vfs_jffs_513.cpp", + "jffs/full/It_vfs_jffs_514.cpp", + "jffs/full/It_vfs_jffs_515.cpp", + "jffs/full/It_vfs_jffs_516.cpp", + "jffs/full/It_vfs_jffs_517.cpp", + "jffs/full/It_vfs_jffs_518.cpp", + "jffs/full/It_vfs_jffs_519.cpp", + "jffs/full/It_vfs_jffs_520.cpp", + "jffs/full/It_vfs_jffs_521.cpp", + "jffs/full/It_vfs_jffs_522.cpp", + "jffs/full/It_vfs_jffs_523.cpp", + "jffs/full/It_vfs_jffs_524.cpp", + "jffs/full/It_vfs_jffs_526.cpp", + "jffs/full/It_vfs_jffs_528.cpp", + "jffs/full/It_vfs_jffs_529.cpp", + "jffs/full/It_vfs_jffs_530.cpp", + "jffs/full/It_vfs_jffs_531.cpp", + "jffs/full/It_vfs_jffs_532.cpp", + "jffs/full/It_vfs_jffs_533.cpp", + "jffs/full/It_vfs_jffs_534.cpp", + "jffs/full/It_vfs_jffs_541.cpp", + "jffs/full/It_vfs_jffs_542.cpp", + "jffs/full/It_vfs_jffs_543.cpp", + "jffs/full/It_vfs_jffs_544.cpp", + "jffs/full/It_vfs_jffs_545.cpp", + "jffs/full/It_vfs_jffs_546.cpp", + "jffs/full/It_vfs_jffs_547.cpp", + "jffs/full/It_vfs_jffs_548.cpp", + "jffs/full/It_vfs_jffs_549.cpp", + "jffs/full/It_vfs_jffs_550.cpp", + "jffs/full/It_vfs_jffs_551.cpp", + "jffs/full/It_vfs_jffs_552.cpp", + "jffs/full/It_vfs_jffs_553.cpp", + "jffs/full/It_vfs_jffs_554.cpp", + "jffs/full/It_vfs_jffs_555.cpp", + "jffs/full/It_vfs_jffs_556.cpp", + "jffs/full/It_vfs_jffs_557.cpp", + "jffs/full/It_vfs_jffs_560.cpp", + "jffs/full/It_vfs_jffs_562.cpp", + "jffs/full/It_vfs_jffs_563.cpp", + "jffs/full/It_vfs_jffs_564.cpp", + "jffs/full/It_vfs_jffs_565.cpp", + "jffs/full/It_vfs_jffs_566.cpp", + "jffs/full/It_vfs_jffs_567.cpp", + "jffs/full/It_vfs_jffs_568.cpp", + "jffs/full/It_vfs_jffs_569.cpp", + "jffs/full/It_vfs_jffs_570.cpp", + "jffs/full/It_vfs_jffs_571.cpp", + "jffs/full/It_vfs_jffs_572.cpp", + "jffs/full/It_vfs_jffs_573.cpp", + "jffs/full/It_vfs_jffs_574.cpp", + "jffs/full/It_vfs_jffs_583.cpp", + "jffs/full/It_vfs_jffs_584.cpp", + "jffs/full/It_vfs_jffs_586.cpp", + "jffs/full/It_vfs_jffs_589.cpp", + "jffs/full/It_vfs_jffs_590.cpp", + "jffs/full/It_vfs_jffs_591.cpp", + "jffs/full/It_vfs_jffs_592.cpp", + "jffs/full/It_vfs_jffs_593.cpp", + "jffs/full/It_vfs_jffs_594.cpp", + "jffs/full/It_vfs_jffs_595.cpp", + "jffs/full/It_vfs_jffs_596.cpp", + "jffs/full/It_vfs_jffs_603.cpp", + "jffs/full/It_vfs_jffs_636.cpp", + "jffs/full/It_vfs_jffs_643.cpp", + "jffs/full/It_vfs_jffs_644.cpp", + "jffs/full/It_vfs_jffs_645.cpp", + "jffs/full/It_vfs_jffs_646.cpp", + "jffs/full/It_vfs_jffs_648.cpp", + "jffs/full/It_vfs_jffs_649.cpp", + "jffs/full/It_vfs_jffs_650.cpp", + "jffs/full/It_vfs_jffs_651.cpp", + "jffs/full/It_vfs_jffs_652.cpp", + "jffs/full/It_vfs_jffs_653.cpp", + "jffs/full/It_vfs_jffs_654.cpp", + "jffs/full/It_vfs_jffs_655.cpp", + "jffs/full/It_vfs_jffs_656.cpp", + "jffs/full/It_vfs_jffs_663.cpp", + "jffs/full/It_vfs_jffs_664.cpp", + "jffs/full/It_vfs_jffs_665.cpp", + "jffs/full/It_vfs_jffs_666.cpp", + "jffs/full/It_vfs_jffs_668.cpp", + "jffs/full/It_vfs_jffs_669.cpp", + "jffs/full/It_vfs_jffs_670.cpp", + "jffs/full/It_vfs_jffs_671.cpp", + "jffs/full/It_vfs_jffs_672.cpp", + "jffs/full/It_vfs_jffs_673.cpp", + "jffs/full/It_vfs_jffs_674.cpp", + "jffs/full/It_vfs_jffs_675.cpp", + "jffs/full/It_vfs_jffs_676.cpp", + "jffs/full/It_vfs_jffs_690.cpp", + "jffs/full/It_vfs_jffs_694.cpp", + "jffs/full/It_vfs_jffs_696.cpp", + "jffs/full/It_vfs_jffs_697.cpp", + "jffs/full/It_vfs_jffs_700.cpp", + "jffs/full/It_vfs_jffs_701.cpp", + "jffs/full/It_vfs_jffs_807.cpp", + "jffs/full/It_vfs_jffs_808.cpp", + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_fs_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + if (LOSCFG_USER_TEST_PRESSURE == true) { + deps += [ ":sources_pressure" ] + } + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_fs_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/fs/proc/BUILD.gn b/testsuites/unittest/fs/proc/BUILD.gn index 7f50856d..32c6d9b2 100644 --- a/testsuites/unittest/fs/proc/BUILD.gn +++ b/testsuites/unittest/fs/proc/BUILD.gn @@ -30,29 +30,58 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_fs_procfs_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "//kernel/liteos_a/test/unittest/common/include", - "//kernel/liteos_a/test/unittest/fs/proc", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "//kernel/liteos_a/test/unittest/fs/proc", +] + +sources_entry = [ + "../../common/osTest.cpp", + "It_vfs_proc.cpp", +] + +source_set("sources_smoke") { sources = [ - "//kernel/liteos_a/test/unittest/common/osTest.cpp", - "It_vfs_proc.cpp", ] - if (LOSCFG_USER_TEST_FULL == true) { - sources_full = [ - "full/It_vfs_proc_001.cpp", - "full/It_vfs_proc_002.cpp", - "full/It_vfs_proc_003.cpp", - "full/It_vfs_proc_004.cpp", - "full/It_vfs_proc_005.cpp", - "full/It_vfs_proc_006.cpp", - ] - sources += sources_full - } + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "//kernel/liteos_a/test/unittest:public_config" ] - deps += [ "//kernel/liteos_a:kernel" ] } + +source_set("sources_other") { + sources = [ + "full/It_vfs_proc_001.cpp", + "full/It_vfs_proc_002.cpp", + "full/It_vfs_proc_003.cpp", + "full/It_vfs_proc_004.cpp", + "full/It_vfs_proc_005.cpp", + "full/It_vfs_proc_006.cpp", + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_fs_procfs_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_fs_procfs_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/fs/vfat2/BUILD.gn b/testsuites/unittest/fs/vfat2/BUILD.gn index 47a1a786..763ba1f7 100644 --- a/testsuites/unittest/fs/vfat2/BUILD.gn +++ b/testsuites/unittest/fs/vfat2/BUILD.gn @@ -30,20 +30,29 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_fs_vfat_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "//kernel/liteos_a/testsuites/unittest/common/include", - "//kernel/liteos_a/testsuites/unittest/fs/vfs", - "//kernel/liteos_a/testsuites/unittest/fs/vfat2", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "//kernel/liteos_a/testsuites/unittest/fs/vfs", + "//kernel/liteos_a/testsuites/unittest/fs/vfat2", +] + +sources_entry = [ + "../../common/osTest.cpp", + "VfsFatTest.cpp", +] + +source_set("sources_smoke") { sources = [ - "//kernel/liteos_a/testsuites/unittest/common/osTest.cpp", - "VfsFatTest.cpp", + "smoke/It_vfs_fat_026.cpp", ] - if (LOSCFG_USER_TEST_PRESSURE == true) { - sources_pressure = [ + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_PRESSURE == true) { + source_set("sources_pressure") { + sources = [ "pressure/It_fs_fat_performance_001.cpp", "pressure/It_fs_fat_performance_002.cpp", "pressure/It_fs_fat_performance_003.cpp", @@ -110,85 +119,108 @@ unittest("liteos_a_fs_vfat_unittest_door") { "pressure/It_vfs_fat_mutipthread_049.cpp", "pressure/It_vfs_fat_mutipthread_050.cpp", ] - sources += sources_pressure + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/It_vfs_fat_026.cpp", - ] - sources += sources_smoke - } - if (LOSCFG_USER_TEST_FULL == true) { - sources_full = [ - "full/It_vfs_fat_066.cpp", - "full/It_vfs_fat_068.cpp", - "full/It_vfs_fat_072.cpp", - "full/It_vfs_fat_073.cpp", - "full/It_vfs_fat_074.cpp", - "full/It_vfs_fat_496.cpp", - "full/It_vfs_fat_497.cpp", - "full/It_vfs_fat_498.cpp", - "full/It_vfs_fat_499.cpp", - "full/It_vfs_fat_500.cpp", - "full/It_vfs_fat_501.cpp", - "full/It_vfs_fat_502.cpp", - "full/It_vfs_fat_503.cpp", - "full/It_vfs_fat_504.cpp", - "full/It_vfs_fat_506.cpp", - "full/It_vfs_fat_507.cpp", - "full/It_vfs_fat_508.cpp", - "full/It_vfs_fat_509.cpp", - "full/It_vfs_fat_510.cpp", - "full/It_vfs_fat_511.cpp", - "full/It_vfs_fat_512.cpp", - "full/It_vfs_fat_513.cpp", - "full/It_vfs_fat_514.cpp", - "full/It_vfs_fat_515.cpp", - "full/It_vfs_fat_516.cpp", - "full/It_vfs_fat_517.cpp", - "full/It_vfs_fat_518.cpp", - "full/It_vfs_fat_519.cpp", - "full/It_vfs_fat_662.cpp", - "full/It_vfs_fat_663.cpp", - "full/It_vfs_fat_664.cpp", - "full/It_vfs_fat_665.cpp", - "full/It_vfs_fat_666.cpp", - "full/It_vfs_fat_667.cpp", - "full/It_vfs_fat_668.cpp", - "full/It_vfs_fat_669.cpp", - "full/It_vfs_fat_670.cpp", - "full/It_vfs_fat_671.cpp", - "full/It_vfs_fat_672.cpp", - "full/It_vfs_fat_673.cpp", - "full/It_vfs_fat_674.cpp", - "full/It_vfs_fat_675.cpp", - "full/It_vfs_fat_676.cpp", - "full/It_vfs_fat_677.cpp", - "full/It_vfs_fat_678.cpp", - "full/It_vfs_fat_679.cpp", - "full/It_vfs_fat_680.cpp", - "full/It_vfs_fat_681.cpp", - "full/It_vfs_fat_682.cpp", - "full/It_vfs_fat_683.cpp", - "full/It_vfs_fat_684.cpp", - "full/It_vfs_fat_685.cpp", - "full/It_vfs_fat_686.cpp", - "full/It_vfs_fat_687.cpp", - "full/It_vfs_fat_692.cpp", - "full/It_vfs_fat_693.cpp", - "full/It_vfs_fat_694.cpp", - "full/It_vfs_fat_870.cpp", - "full/It_vfs_fat_872.cpp", - "full/It_vfs_fat_873.cpp", - "full/It_vfs_fat_874.cpp", - "full/It_vfs_fat_875.cpp", - "full/It_vfs_fat_902.cpp", - "full/It_vfs_fat_903.cpp", - "full/It_vfs_fat_904.cpp", - "full/It_vfs_fat_909.cpp", - ] - sources += sources_full - } - deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "//kernel/liteos_a/testsuites/unittest:public_config" ] } + +source_set("sources_other") { + sources = [ + "full/It_vfs_fat_066.cpp", + "full/It_vfs_fat_068.cpp", + "full/It_vfs_fat_072.cpp", + "full/It_vfs_fat_073.cpp", + "full/It_vfs_fat_074.cpp", + "full/It_vfs_fat_496.cpp", + "full/It_vfs_fat_497.cpp", + "full/It_vfs_fat_498.cpp", + "full/It_vfs_fat_499.cpp", + "full/It_vfs_fat_500.cpp", + "full/It_vfs_fat_501.cpp", + "full/It_vfs_fat_502.cpp", + "full/It_vfs_fat_503.cpp", + "full/It_vfs_fat_504.cpp", + "full/It_vfs_fat_506.cpp", + "full/It_vfs_fat_507.cpp", + "full/It_vfs_fat_508.cpp", + "full/It_vfs_fat_509.cpp", + "full/It_vfs_fat_510.cpp", + "full/It_vfs_fat_511.cpp", + "full/It_vfs_fat_512.cpp", + "full/It_vfs_fat_513.cpp", + "full/It_vfs_fat_514.cpp", + "full/It_vfs_fat_515.cpp", + "full/It_vfs_fat_516.cpp", + "full/It_vfs_fat_517.cpp", + "full/It_vfs_fat_518.cpp", + "full/It_vfs_fat_519.cpp", + "full/It_vfs_fat_662.cpp", + "full/It_vfs_fat_663.cpp", + "full/It_vfs_fat_664.cpp", + "full/It_vfs_fat_665.cpp", + "full/It_vfs_fat_666.cpp", + "full/It_vfs_fat_667.cpp", + "full/It_vfs_fat_668.cpp", + "full/It_vfs_fat_669.cpp", + "full/It_vfs_fat_670.cpp", + "full/It_vfs_fat_671.cpp", + "full/It_vfs_fat_672.cpp", + "full/It_vfs_fat_673.cpp", + "full/It_vfs_fat_674.cpp", + "full/It_vfs_fat_675.cpp", + "full/It_vfs_fat_676.cpp", + "full/It_vfs_fat_677.cpp", + "full/It_vfs_fat_678.cpp", + "full/It_vfs_fat_679.cpp", + "full/It_vfs_fat_680.cpp", + "full/It_vfs_fat_681.cpp", + "full/It_vfs_fat_682.cpp", + "full/It_vfs_fat_683.cpp", + "full/It_vfs_fat_684.cpp", + "full/It_vfs_fat_685.cpp", + "full/It_vfs_fat_686.cpp", + "full/It_vfs_fat_687.cpp", + "full/It_vfs_fat_692.cpp", + "full/It_vfs_fat_693.cpp", + "full/It_vfs_fat_694.cpp", + "full/It_vfs_fat_870.cpp", + "full/It_vfs_fat_872.cpp", + "full/It_vfs_fat_873.cpp", + "full/It_vfs_fat_874.cpp", + "full/It_vfs_fat_875.cpp", + "full/It_vfs_fat_902.cpp", + "full/It_vfs_fat_903.cpp", + "full/It_vfs_fat_904.cpp", + "full/It_vfs_fat_909.cpp", + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_fs_vfat_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + if (LOSCFG_USER_TEST_PRESSURE == true) { + deps += [ ":sources_pressure" ] + } + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_fs_vfat_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/liteipc/BUILD.gn b/testsuites/unittest/liteipc/BUILD.gn index 5dd6bd3c..07daaafd 100644 --- a/testsuites/unittest/liteipc/BUILD.gn +++ b/testsuites/unittest/liteipc/BUILD.gn @@ -30,25 +30,55 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_liteipc_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../common/include", - "../liteipc", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../common/include", + "../liteipc", +] + +sources_entry = [ + "../common/osTest.cpp", + "smgr_demo.cpp", + "it_test_liteipc.cpp", +] + +source_set("sources_smoke") { sources = [ - "../common/osTest.cpp", - "smgr_demo.cpp", - "it_test_liteipc.cpp", + "smoke/liteipc_test_001.cpp", + "smoke/liteipc_test_002.cpp", ] - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/liteipc_test_001.cpp", - "smoke/liteipc_test_002.cpp", - ] - sources += sources_smoke - } + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "..:public_config" ] +} + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_liteipc_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_liteipc_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } } diff --git a/testsuites/unittest/mem/shm/BUILD.gn b/testsuites/unittest/mem/shm/BUILD.gn index 0406cc11..c54afa84 100644 --- a/testsuites/unittest/mem/shm/BUILD.gn +++ b/testsuites/unittest/mem/shm/BUILD.gn @@ -30,19 +30,19 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_mem_shm_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "../../mem/shm", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "../../mem/shm", +] + +sources_entry = [ + "../../common/osTest.cpp", + "mem_shm_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "mem_shm_test.cpp", - ] - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ "smoke/shm_test_001.cpp", "smoke/shm_test_002.cpp", "smoke/shm_test_003.cpp", @@ -57,9 +57,39 @@ unittest("liteos_a_mem_shm_unittest_door") { "smoke/shm_test_012.cpp", "smoke/shm_test_013.cpp", "smoke/shm_test_014.cpp", - ] - sources += sources_smoke - } - configs = [ "../..:public_config" ] + ] + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_mem_shm_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_mem_shm_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} diff --git a/testsuites/unittest/mem/vm/BUILD.gn b/testsuites/unittest/mem/vm/BUILD.gn index 257c2368..1d15ab9c 100644 --- a/testsuites/unittest/mem/vm/BUILD.gn +++ b/testsuites/unittest/mem/vm/BUILD.gn @@ -30,37 +30,67 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_mem_vm_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "../../mem/vm", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "../../mem/vm", +] + +sources_entry = [ + "../../common/osTest.cpp", + "mem_vm_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "mem_vm_test.cpp", + "smoke/mmap_test_001.cpp", + "smoke/mmap_test_002.cpp", + "smoke/mmap_test_003.cpp", + "smoke/mmap_test_004.cpp", + "smoke/mmap_test_005.cpp", + "smoke/mmap_test_006.cpp", + "smoke/mmap_test_007.cpp", + "smoke/mmap_test_008.cpp", + "smoke/mmap_test_009.cpp", + "smoke/mmap_test_010.cpp", + "smoke/mprotect_test_001.cpp", + "smoke/mremap_test_001.cpp", + "smoke/oom_test_001.cpp", + "smoke/open_wmemstream_test_001.cpp", + "smoke/user_copy_test_001.cpp", ] - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/mmap_test_001.cpp", - "smoke/mmap_test_002.cpp", - "smoke/mmap_test_003.cpp", - "smoke/mmap_test_004.cpp", - "smoke/mmap_test_005.cpp", - "smoke/mmap_test_006.cpp", - "smoke/mmap_test_007.cpp", - "smoke/mmap_test_008.cpp", - "smoke/mmap_test_009.cpp", - "smoke/mmap_test_010.cpp", - "smoke/mprotect_test_001.cpp", - "smoke/mremap_test_001.cpp", - "smoke/oom_test_001.cpp", - "smoke/open_wmemstream_test_001.cpp", - "smoke/user_copy_test_001.cpp", - ] - sources += sources_smoke - } - configs = [ "../..:public_config" ] + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_mem_vm_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_mem_vm_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} diff --git a/testsuites/unittest/misc/BUILD.gn b/testsuites/unittest/misc/BUILD.gn index 8b50157c..c0d85a52 100644 --- a/testsuites/unittest/misc/BUILD.gn +++ b/testsuites/unittest/misc/BUILD.gn @@ -30,44 +30,66 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_misc_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../common/include", - "../misc", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../common/include", + "../misc", +] +sources_entry = [ + "../common/osTest.cpp", + "misc_test.cpp", +] + +source_set("sources_other") { sources = [ - "../common/osTest.cpp", - "misc_test.cpp", + "full/misc_test_006.cpp", + "full/misc_test_007.cpp", + "full/misc_test_010.cpp", + "full/misc_test_011.cpp", + "full/misc_test_012.cpp", + "full/misc_test_013.cpp", ] - - if (LOSCFG_USER_TEST_FULL == true) { - sources_full = [ - "full/misc_test_006.cpp", - "full/misc_test_007.cpp", - "full/misc_test_010.cpp", - "full/misc_test_011.cpp", - "full/misc_test_012.cpp", - "full/misc_test_013.cpp", - ] - sources += sources_full - } - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/misc_test_001.cpp", - "smoke/misc_test_002.cpp", - "smoke/misc_test_003.cpp", - "smoke/misc_test_004.cpp", - "smoke/misc_test_005.cpp", - "smoke/misc_test_008.cpp", - "smoke/misc_test_009.cpp", - "smoke/misc_test_014.cpp", - ] - sources += sources_smoke - } - - configs = [ "..:public_config" ] + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } + +source_set("sources_smoke") { + sources = [ + "smoke/misc_test_001.cpp", + "smoke/misc_test_002.cpp", + "smoke/misc_test_003.cpp", + "smoke/misc_test_004.cpp", + "smoke/misc_test_005.cpp", + "smoke/misc_test_008.cpp", + "smoke/misc_test_009.cpp", + "smoke/misc_test_014.cpp", + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_misc_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_misc_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/net/netdb/BUILD.gn b/testsuites/unittest/net/netdb/BUILD.gn index 68a51b55..f214a453 100644 --- a/testsuites/unittest/net/netdb/BUILD.gn +++ b/testsuites/unittest/net/netdb/BUILD.gn @@ -37,46 +37,74 @@ config("net_local_config") { } } -unittest("liteos_a_net_netdb_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "./", - ] - sources = [ +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "./", +] + +sources_entry = [ "../../common/osTest.cpp", "net_netdb_test.cpp", +] + +source_set("sources_smoke") { + sources = [ + "smoke/net_netdb_test_001.cpp", + "smoke/net_netdb_test_013.cpp", ] - if (LOSCFG_USER_TEST_FULL == true) { - sources_full = [ - "full/net_netdb_test_001.cpp", - "full/net_netdb_test_002.cpp", - "full/net_netdb_test_003.cpp", - "full/net_netdb_test_004.cpp", - "full/net_netdb_test_005.cpp", - "full/net_netdb_test_006.cpp", - "full/net_netdb_test_007.cpp", - "full/net_netdb_test_008.cpp", - "full/net_netdb_test_009.cpp", - "full/net_netdb_test_010.cpp", - "full/net_netdb_test_011.cpp", - "full/net_netdb_test_012.cpp", - "full/net_netdb_test_013.cpp", - "full/net_netdb_test_014.cpp", - "full/net_netdb_test_015.cpp", - "full/net_netdb_test_016.cpp", - "full/net_netdb_test_017.cpp", - "full/net_netdb_test_018.cpp", - "full/net_netdb_test_019.cpp", - "full/net_netdb_test_020.cpp", - "full/net_netdb_test_021.cpp", - "full/net_netdb_test_022.cpp", - ] - sources += sources_full - } - configs = [ - "../..:public_config", - ":net_local_config", - ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } + +source_set("sources_other") { + sources = [ + "full/net_netdb_test_002.cpp", + "full/net_netdb_test_003.cpp", + "full/net_netdb_test_004.cpp", + "full/net_netdb_test_005.cpp", + "full/net_netdb_test_006.cpp", + "full/net_netdb_test_007.cpp", + "full/net_netdb_test_008.cpp", + "full/net_netdb_test_009.cpp", + "full/net_netdb_test_010.cpp", + "full/net_netdb_test_011.cpp", + "full/net_netdb_test_012.cpp", + "full/net_netdb_test_014.cpp", + "full/net_netdb_test_015.cpp", + "full/net_netdb_test_016.cpp", + "full/net_netdb_test_017.cpp", + "full/net_netdb_test_018.cpp", + "full/net_netdb_test_019.cpp", + "full/net_netdb_test_020.cpp", + "full/net_netdb_test_021.cpp", + "full/net_netdb_test_022.cpp", + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +unittest("liteos_a_net_netdb_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + configs += [ ":net_local_config" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_net_netdb_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + configs += [ ":net_local_config" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/net/netdb/net_netdb_test.cpp b/testsuites/unittest/net/netdb/net_netdb_test.cpp index 7f50082b..84761e3f 100644 --- a/testsuites/unittest/net/netdb/net_netdb_test.cpp +++ b/testsuites/unittest/net/netdb/net_netdb_test.cpp @@ -49,7 +49,7 @@ public: static void TearDownTestCase(void) {} }; -#if defined(LOSCFG_USER_TEST_FULL) && defined(LOSCFG_USER_TEST_NET_NETDB) +#if defined(LOSCFG_USER_TEST_SMOKE) && defined(LOSCFG_USER_TEST_NET_NETDB) /* * * @tc.name: NetNetDbTest001 * @tc.desc: function for NetDbTest diff --git a/testsuites/unittest/net/netdb/full/net_netdb_test_001.cpp b/testsuites/unittest/net/netdb/smoke/net_netdb_test_001.cpp similarity index 100% rename from testsuites/unittest/net/netdb/full/net_netdb_test_001.cpp rename to testsuites/unittest/net/netdb/smoke/net_netdb_test_001.cpp diff --git a/testsuites/unittest/net/netdb/full/net_netdb_test_013.cpp b/testsuites/unittest/net/netdb/smoke/net_netdb_test_013.cpp similarity index 100% rename from testsuites/unittest/net/netdb/full/net_netdb_test_013.cpp rename to testsuites/unittest/net/netdb/smoke/net_netdb_test_013.cpp diff --git a/testsuites/unittest/net/resolv/BUILD.gn b/testsuites/unittest/net/resolv/BUILD.gn index cca16a69..8d7a1d9e 100644 --- a/testsuites/unittest/net/resolv/BUILD.gn +++ b/testsuites/unittest/net/resolv/BUILD.gn @@ -37,32 +37,62 @@ config("net_local_config") { } } -unittest("liteos_a_net_resolv_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "./", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "./", +] + +sources_entry = [ + "../../common/osTest.cpp", + "net_resolv_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "net_resolv_test.cpp", - ] - if (LOSCFG_USER_TEST_FULL == true) { - sources_full = [ - "full/net_resolv_test_001.cpp", - "full/net_resolv_test_002.cpp", - "full/net_resolv_test_003.cpp", - "full/net_resolv_test_004.cpp", - "full/net_resolv_test_005.cpp", - "full/net_resolv_test_006.cpp", - "full/net_resolv_test_007.cpp", - "full/net_resolv_test_008.cpp", - ] - sources += sources_full - } - configs = [ - "../..:public_config", - ":net_local_config", + "smoke/net_resolv_test_001.cpp", + "smoke/net_resolv_test_002.cpp", + "smoke/net_resolv_test_003.cpp", + "smoke/net_resolv_test_006.cpp", + "smoke/net_resolv_test_007.cpp", ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } + +source_set("sources_other") { + sources = [ + "full/net_resolv_test_004.cpp", + "full/net_resolv_test_005.cpp", + "full/net_resolv_test_008.cpp", + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_net_resolv_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + configs += [ ":net_local_config" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_net_resolv_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + configs += [ ":net_local_config" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/net/resolv/net_resolv_test.cpp b/testsuites/unittest/net/resolv/net_resolv_test.cpp index aaee3241..731c9bf5 100644 --- a/testsuites/unittest/net/resolv/net_resolv_test.cpp +++ b/testsuites/unittest/net/resolv/net_resolv_test.cpp @@ -52,7 +52,7 @@ public: static void TearDownTestCase(void) {} }; -#if defined(LOSCFG_USER_TEST_FULL) && defined(LOSCFG_USER_TEST_NET_RESOLV) +#if defined(LOSCFG_USER_TEST_SMOKE) && defined(LOSCFG_USER_TEST_NET_RESOLV) /* * * @tc.name: NetResolvTest001 * @tc.desc: function for NetResolvTest diff --git a/testsuites/unittest/net/resolv/full/net_resolv_test_001.cpp b/testsuites/unittest/net/resolv/smoke/net_resolv_test_001.cpp similarity index 100% rename from testsuites/unittest/net/resolv/full/net_resolv_test_001.cpp rename to testsuites/unittest/net/resolv/smoke/net_resolv_test_001.cpp diff --git a/testsuites/unittest/net/resolv/full/net_resolv_test_002.cpp b/testsuites/unittest/net/resolv/smoke/net_resolv_test_002.cpp similarity index 100% rename from testsuites/unittest/net/resolv/full/net_resolv_test_002.cpp rename to testsuites/unittest/net/resolv/smoke/net_resolv_test_002.cpp diff --git a/testsuites/unittest/net/resolv/full/net_resolv_test_003.cpp b/testsuites/unittest/net/resolv/smoke/net_resolv_test_003.cpp similarity index 100% rename from testsuites/unittest/net/resolv/full/net_resolv_test_003.cpp rename to testsuites/unittest/net/resolv/smoke/net_resolv_test_003.cpp diff --git a/testsuites/unittest/net/resolv/full/net_resolv_test_006.cpp b/testsuites/unittest/net/resolv/smoke/net_resolv_test_006.cpp similarity index 100% rename from testsuites/unittest/net/resolv/full/net_resolv_test_006.cpp rename to testsuites/unittest/net/resolv/smoke/net_resolv_test_006.cpp diff --git a/testsuites/unittest/net/resolv/full/net_resolv_test_007.cpp b/testsuites/unittest/net/resolv/smoke/net_resolv_test_007.cpp similarity index 100% rename from testsuites/unittest/net/resolv/full/net_resolv_test_007.cpp rename to testsuites/unittest/net/resolv/smoke/net_resolv_test_007.cpp diff --git a/testsuites/unittest/net/socket/BUILD.gn b/testsuites/unittest/net/socket/BUILD.gn index 716eddbe..5cb59553 100644 --- a/testsuites/unittest/net/socket/BUILD.gn +++ b/testsuites/unittest/net/socket/BUILD.gn @@ -37,38 +37,67 @@ config("net_local_config") { } } -unittest("liteos_a_net_socket_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "../../net/socket", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "./", +] + +sources_entry = [ + "../../common/osTest.cpp", + "net_socket_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "net_socket_test.cpp", + "smoke/net_socket_test_001.cpp", + "smoke/net_socket_test_002.cpp", + "smoke/net_socket_test_003.cpp", + "smoke/net_socket_test_004.cpp", + "smoke/net_socket_test_005.cpp", + "smoke/net_socket_test_006.cpp", + "smoke/net_socket_test_007.cpp", + "smoke/net_socket_test_008.cpp", + "smoke/net_socket_test_009.cpp", + "smoke/net_socket_test_010.cpp", + "smoke/net_socket_test_011.cpp", + "smoke/net_socket_test_012.cpp", + "smoke/net_socket_test_013.cpp", ] - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/net_socket_test_001.cpp", - "smoke/net_socket_test_002.cpp", - "smoke/net_socket_test_003.cpp", - "smoke/net_socket_test_004.cpp", - "smoke/net_socket_test_005.cpp", - "smoke/net_socket_test_006.cpp", - "smoke/net_socket_test_007.cpp", - "smoke/net_socket_test_008.cpp", - "smoke/net_socket_test_009.cpp", - "smoke/net_socket_test_010.cpp", - "smoke/net_socket_test_011.cpp", - "smoke/net_socket_test_012.cpp", - "smoke/net_socket_test_013.cpp", - ] - sources += sources_smoke - } + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ - "../../:public_config", - ":net_local_config", - ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_net_socket_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + configs += [ ":net_local_config" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_net_socket_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + configs += [ ":net_local_config" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/posix/mem/BUILD.gn b/testsuites/unittest/posix/mem/BUILD.gn index 6fc5205b..6f3252b9 100644 --- a/testsuites/unittest/posix/mem/BUILD.gn +++ b/testsuites/unittest/posix/mem/BUILD.gn @@ -30,26 +30,54 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_posix_mem_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "../../posix/mem", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "./", +] + +sources_entry = [ + "../../common/osTest.cpp", + "posix_mem_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "posix_mem_test.cpp", + "smoke/It_posix_mem_001.cpp", + "smoke/It_posix_mem_003.cpp", ] - - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/It_posix_mem_001.cpp", - "smoke/It_posix_mem_003.cpp", - ] - sources += sources_smoke - } - + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "../..:public_config" ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_posix_mem_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_posix_mem_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/posix/mqueue/BUILD.gn b/testsuites/unittest/posix/mqueue/BUILD.gn index a5dc7957..ec5ab14c 100644 --- a/testsuites/unittest/posix/mqueue/BUILD.gn +++ b/testsuites/unittest/posix/mqueue/BUILD.gn @@ -35,180 +35,204 @@ config("mqueue_config") { cflags_cc = cflags } -unittest("liteos_a_posix_mqueue_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "../../posix/mqueue", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "./", +] + +sources_entry = [ + "../../common/osTest.cpp", + "posix_mqueue_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "posix_mqueue_test.cpp", + "smoke/It_posix_queue_001.cpp", + "smoke/It_posix_queue_003.cpp", + "smoke/It_posix_queue_028.cpp", + "smoke/It_posix_queue_053.cpp", + "smoke/It_posix_queue_144.cpp", + "smoke/It_posix_queue_062.cpp", + "smoke/It_posix_queue_205.cpp", + "smoke/It_posix_queue_206.cpp", + "smoke/It_posix_queue_207.cpp", + "smoke/It_posix_queue_208.cpp", + "smoke/It_posix_queue_209.cpp", ] - - if (LOSCFG_USER_TEST_FULL == true) { - sources_full = [ - "full/It_posix_queue_002.cpp", - "full/It_posix_queue_005.cpp", - "full/It_posix_queue_008.cpp", - "full/It_posix_queue_011.cpp", - "full/It_posix_queue_013.cpp", - "full/It_posix_queue_014.cpp", - "full/It_posix_queue_015.cpp", - "full/It_posix_queue_016.cpp", - "full/It_posix_queue_018.cpp", - "full/It_posix_queue_019.cpp", - "full/It_posix_queue_020.cpp", - "full/It_posix_queue_021.cpp", - "full/It_posix_queue_025.cpp", - "full/It_posix_queue_026.cpp", - "full/It_posix_queue_027.cpp", - "full/It_posix_queue_030.cpp", - "full/It_posix_queue_031.cpp", - "full/It_posix_queue_032.cpp", - "full/It_posix_queue_033.cpp", - "full/It_posix_queue_036.cpp", - "full/It_posix_queue_038.cpp", - "full/It_posix_queue_040.cpp", - "full/It_posix_queue_041.cpp", - "full/It_posix_queue_042.cpp", - "full/It_posix_queue_043.cpp", - "full/It_posix_queue_044.cpp", - "full/It_posix_queue_046.cpp", - "full/It_posix_queue_047.cpp", - "full/It_posix_queue_048.cpp", - "full/It_posix_queue_049.cpp", - "full/It_posix_queue_050.cpp", - "full/It_posix_queue_052.cpp", - "full/It_posix_queue_054.cpp", - "full/It_posix_queue_055.cpp", - "full/It_posix_queue_056.cpp", - "full/It_posix_queue_057.cpp", - "full/It_posix_queue_058.cpp", - "full/It_posix_queue_060.cpp", - "full/It_posix_queue_061.cpp", - "full/It_posix_queue_063.cpp", - "full/It_posix_queue_064.cpp", - "full/It_posix_queue_065.cpp", - "full/It_posix_queue_066.cpp", - "full/It_posix_queue_067.cpp", - "full/It_posix_queue_069.cpp", - "full/It_posix_queue_070.cpp", - "full/It_posix_queue_071.cpp", - "full/It_posix_queue_072.cpp", - "full/It_posix_queue_073.cpp", - "full/It_posix_queue_074.cpp", - "full/It_posix_queue_075.cpp", - "full/It_posix_queue_076.cpp", - "full/It_posix_queue_077.cpp", - "full/It_posix_queue_078.cpp", - "full/It_posix_queue_079.cpp", - "full/It_posix_queue_080.cpp", - "full/It_posix_queue_081.cpp", - "full/It_posix_queue_082.cpp", - "full/It_posix_queue_083.cpp", - "full/It_posix_queue_084.cpp", - "full/It_posix_queue_085.cpp", - "full/It_posix_queue_086.cpp", - "full/It_posix_queue_087.cpp", - "full/It_posix_queue_088.cpp", - "full/It_posix_queue_089.cpp", - "full/It_posix_queue_090.cpp", - "full/It_posix_queue_091.cpp", - "full/It_posix_queue_093.cpp", - "full/It_posix_queue_094.cpp", - "full/It_posix_queue_095.cpp", - "full/It_posix_queue_096.cpp", - "full/It_posix_queue_097.cpp", - "full/It_posix_queue_098.cpp", - "full/It_posix_queue_100.cpp", - "full/It_posix_queue_101.cpp", - "full/It_posix_queue_102.cpp", - "full/It_posix_queue_103.cpp", - "full/It_posix_queue_104.cpp", - "full/It_posix_queue_106.cpp", - "full/It_posix_queue_108.cpp", - "full/It_posix_queue_109.cpp", - "full/It_posix_queue_110.cpp", - "full/It_posix_queue_111.cpp", - "full/It_posix_queue_112.cpp", - "full/It_posix_queue_113.cpp", - "full/It_posix_queue_114.cpp", - "full/It_posix_queue_115.cpp", - "full/It_posix_queue_116.cpp", - "full/It_posix_queue_117.cpp", - "full/It_posix_queue_118.cpp", - "full/It_posix_queue_119.cpp", - "full/It_posix_queue_120.cpp", - "full/It_posix_queue_121.cpp", - "full/It_posix_queue_122.cpp", - "full/It_posix_queue_123.cpp", - "full/It_posix_queue_124.cpp", - "full/It_posix_queue_125.cpp", - "full/It_posix_queue_126.cpp", - "full/It_posix_queue_127.cpp", - "full/It_posix_queue_128.cpp", - "full/It_posix_queue_129.cpp", - "full/It_posix_queue_130.cpp", - "full/It_posix_queue_133.cpp", - "full/It_posix_queue_134.cpp", - "full/It_posix_queue_136.cpp", - "full/It_posix_queue_143.cpp", - "full/It_posix_queue_145.cpp", - "full/It_posix_queue_146.cpp", - "full/It_posix_queue_147.cpp", - "full/It_posix_queue_148.cpp", - "full/It_posix_queue_149.cpp", - "full/It_posix_queue_150.cpp", - "full/It_posix_queue_151.cpp", - "full/It_posix_queue_152.cpp", - "full/It_posix_queue_153.cpp", - "full/It_posix_queue_154.cpp", - "full/It_posix_queue_155.cpp", - "full/It_posix_queue_156.cpp", - "full/It_posix_queue_157.cpp", - "full/It_posix_queue_159.cpp", - "full/It_posix_queue_160.cpp", - "full/It_posix_queue_161.cpp", - "full/It_posix_queue_162.cpp", - "full/It_posix_queue_163.cpp", - "full/It_posix_queue_164.cpp", - "full/It_posix_queue_165.cpp", - "full/It_posix_queue_166.cpp", - "full/It_posix_queue_168.cpp", - "full/It_posix_queue_169.cpp", - "full/It_posix_queue_173.cpp", - "full/It_posix_queue_175.cpp", - "full/It_posix_queue_176.cpp", - "full/It_posix_queue_177.cpp", - "full/It_posix_queue_187.cpp", - "full/It_posix_queue_200.cpp", - "full/It_posix_queue_201.cpp", - "full/It_posix_queue_202.cpp", - "full/It_posix_queue_203.cpp", - "full/It_posix_queue_204.cpp", - ] - sources += sources_full - } - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/It_posix_queue_001.cpp", - "smoke/It_posix_queue_003.cpp", - "smoke/It_posix_queue_028.cpp", - "smoke/It_posix_queue_053.cpp", - "smoke/It_posix_queue_144.cpp", - "smoke/It_posix_queue_062.cpp", - "smoke/It_posix_queue_205.cpp", - "smoke/It_posix_queue_206.cpp", - "smoke/It_posix_queue_207.cpp", - "smoke/It_posix_queue_208.cpp", - "smoke/It_posix_queue_209.cpp", - ] - sources += sources_smoke - } - + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "../..:public_config" ] - configs += [ ":mqueue_config" ] } + +source_set("sources_other") { + sources = [ + "full/It_posix_queue_002.cpp", + "full/It_posix_queue_005.cpp", + "full/It_posix_queue_008.cpp", + "full/It_posix_queue_011.cpp", + "full/It_posix_queue_013.cpp", + "full/It_posix_queue_014.cpp", + "full/It_posix_queue_015.cpp", + "full/It_posix_queue_016.cpp", + "full/It_posix_queue_018.cpp", + "full/It_posix_queue_019.cpp", + "full/It_posix_queue_020.cpp", + "full/It_posix_queue_021.cpp", + "full/It_posix_queue_025.cpp", + "full/It_posix_queue_026.cpp", + "full/It_posix_queue_027.cpp", + "full/It_posix_queue_030.cpp", + "full/It_posix_queue_031.cpp", + "full/It_posix_queue_032.cpp", + "full/It_posix_queue_033.cpp", + "full/It_posix_queue_036.cpp", + "full/It_posix_queue_038.cpp", + "full/It_posix_queue_040.cpp", + "full/It_posix_queue_041.cpp", + "full/It_posix_queue_042.cpp", + "full/It_posix_queue_043.cpp", + "full/It_posix_queue_044.cpp", + "full/It_posix_queue_046.cpp", + "full/It_posix_queue_047.cpp", + "full/It_posix_queue_048.cpp", + "full/It_posix_queue_049.cpp", + "full/It_posix_queue_050.cpp", + "full/It_posix_queue_052.cpp", + "full/It_posix_queue_054.cpp", + "full/It_posix_queue_055.cpp", + "full/It_posix_queue_056.cpp", + "full/It_posix_queue_057.cpp", + "full/It_posix_queue_058.cpp", + "full/It_posix_queue_060.cpp", + "full/It_posix_queue_061.cpp", + "full/It_posix_queue_063.cpp", + "full/It_posix_queue_064.cpp", + "full/It_posix_queue_065.cpp", + "full/It_posix_queue_066.cpp", + "full/It_posix_queue_067.cpp", + "full/It_posix_queue_069.cpp", + "full/It_posix_queue_070.cpp", + "full/It_posix_queue_071.cpp", + "full/It_posix_queue_072.cpp", + "full/It_posix_queue_073.cpp", + "full/It_posix_queue_074.cpp", + "full/It_posix_queue_075.cpp", + "full/It_posix_queue_076.cpp", + "full/It_posix_queue_077.cpp", + "full/It_posix_queue_078.cpp", + "full/It_posix_queue_079.cpp", + "full/It_posix_queue_080.cpp", + "full/It_posix_queue_081.cpp", + "full/It_posix_queue_082.cpp", + "full/It_posix_queue_083.cpp", + "full/It_posix_queue_084.cpp", + "full/It_posix_queue_085.cpp", + "full/It_posix_queue_086.cpp", + "full/It_posix_queue_087.cpp", + "full/It_posix_queue_088.cpp", + "full/It_posix_queue_089.cpp", + "full/It_posix_queue_090.cpp", + "full/It_posix_queue_091.cpp", + "full/It_posix_queue_093.cpp", + "full/It_posix_queue_094.cpp", + "full/It_posix_queue_095.cpp", + "full/It_posix_queue_096.cpp", + "full/It_posix_queue_097.cpp", + "full/It_posix_queue_098.cpp", + "full/It_posix_queue_100.cpp", + "full/It_posix_queue_101.cpp", + "full/It_posix_queue_102.cpp", + "full/It_posix_queue_103.cpp", + "full/It_posix_queue_104.cpp", + "full/It_posix_queue_106.cpp", + "full/It_posix_queue_108.cpp", + "full/It_posix_queue_109.cpp", + "full/It_posix_queue_110.cpp", + "full/It_posix_queue_111.cpp", + "full/It_posix_queue_112.cpp", + "full/It_posix_queue_113.cpp", + "full/It_posix_queue_114.cpp", + "full/It_posix_queue_115.cpp", + "full/It_posix_queue_116.cpp", + "full/It_posix_queue_117.cpp", + "full/It_posix_queue_118.cpp", + "full/It_posix_queue_119.cpp", + "full/It_posix_queue_120.cpp", + "full/It_posix_queue_121.cpp", + "full/It_posix_queue_122.cpp", + "full/It_posix_queue_123.cpp", + "full/It_posix_queue_124.cpp", + "full/It_posix_queue_125.cpp", + "full/It_posix_queue_126.cpp", + "full/It_posix_queue_127.cpp", + "full/It_posix_queue_128.cpp", + "full/It_posix_queue_129.cpp", + "full/It_posix_queue_130.cpp", + "full/It_posix_queue_133.cpp", + "full/It_posix_queue_134.cpp", + "full/It_posix_queue_136.cpp", + "full/It_posix_queue_143.cpp", + "full/It_posix_queue_145.cpp", + "full/It_posix_queue_146.cpp", + "full/It_posix_queue_147.cpp", + "full/It_posix_queue_148.cpp", + "full/It_posix_queue_149.cpp", + "full/It_posix_queue_150.cpp", + "full/It_posix_queue_151.cpp", + "full/It_posix_queue_152.cpp", + "full/It_posix_queue_153.cpp", + "full/It_posix_queue_154.cpp", + "full/It_posix_queue_155.cpp", + "full/It_posix_queue_156.cpp", + "full/It_posix_queue_157.cpp", + "full/It_posix_queue_159.cpp", + "full/It_posix_queue_160.cpp", + "full/It_posix_queue_161.cpp", + "full/It_posix_queue_162.cpp", + "full/It_posix_queue_163.cpp", + "full/It_posix_queue_164.cpp", + "full/It_posix_queue_165.cpp", + "full/It_posix_queue_166.cpp", + "full/It_posix_queue_168.cpp", + "full/It_posix_queue_169.cpp", + "full/It_posix_queue_173.cpp", + "full/It_posix_queue_175.cpp", + "full/It_posix_queue_176.cpp", + "full/It_posix_queue_177.cpp", + "full/It_posix_queue_187.cpp", + "full/It_posix_queue_200.cpp", + "full/It_posix_queue_201.cpp", + "full/It_posix_queue_202.cpp", + "full/It_posix_queue_203.cpp", + "full/It_posix_queue_204.cpp", + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_posix_mqueue_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + configs += [ ":mqueue_config" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_posix_mqueue_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + configs += [ ":mqueue_config" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/posix/pthread/BUILD.gn b/testsuites/unittest/posix/pthread/BUILD.gn index a3a3f07a..9e0dea9e 100644 --- a/testsuites/unittest/posix/pthread/BUILD.gn +++ b/testsuites/unittest/posix/pthread/BUILD.gn @@ -35,143 +35,169 @@ config("pthread_config") { cflags_cc = cflags } -unittest("liteos_a_posix_pthread_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "../../posix/pthread", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "./", +] + +sources_entry = [ + "../../common/osTest.cpp", + "posix_pthread_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "posix_pthread_test.cpp", + "smoke/It_posix_pthread_003.cpp", + "smoke/It_posix_pthread_004.cpp", + "smoke/It_posix_pthread_005.cpp", + "smoke/It_posix_pthread_006.cpp", + "smoke/It_posix_pthread_018.cpp", + "smoke/It_posix_pthread_019.cpp", + "smoke/It_posix_pthread_020.cpp", + "smoke/It_posix_pthread_021.cpp", + "smoke/It_posix_pthread_022.cpp", + "smoke/It_posix_pthread_203.cpp", ] - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/It_posix_pthread_003.cpp", - "smoke/It_posix_pthread_004.cpp", - "smoke/It_posix_pthread_005.cpp", - "smoke/It_posix_pthread_006.cpp", - "smoke/It_posix_pthread_018.cpp", - "smoke/It_posix_pthread_019.cpp", - "smoke/It_posix_pthread_020.cpp", - "smoke/It_posix_pthread_021.cpp", - "smoke/It_posix_pthread_022.cpp", - "smoke/It_posix_pthread_203.cpp", - ] - sources += sources_smoke - } - if (LOSCFG_USER_TEST_FULL == true) { - sources_full = [ - "full/It_posix_pthread_001.cpp", - "full/It_posix_pthread_002.cpp", - "full/It_posix_pthread_007.cpp", - "full/It_posix_pthread_010.cpp", - "full/It_posix_pthread_011.cpp", - "full/It_posix_pthread_013.cpp", - "full/It_posix_pthread_023.cpp", - "full/It_posix_pthread_025.cpp", - "full/It_posix_pthread_026.cpp", - "full/It_posix_pthread_027.cpp", - "full/It_posix_pthread_028.cpp", - "full/It_posix_pthread_029.cpp", - "full/It_posix_pthread_030.cpp", - "full/It_posix_pthread_031.cpp", - "full/It_posix_pthread_034.cpp", - "full/It_posix_pthread_035.cpp", - "full/It_posix_pthread_039.cpp", - "full/It_posix_pthread_040.cpp", - "full/It_posix_pthread_042.cpp", - "full/It_posix_pthread_044.cpp", - "full/It_posix_pthread_045.cpp", - "full/It_posix_pthread_046.cpp", - "full/It_posix_pthread_051.cpp", - "full/It_posix_pthread_052.cpp", - "full/It_posix_pthread_053.cpp", - "full/It_posix_pthread_054.cpp", - "full/It_posix_pthread_055.cpp", - "full/It_posix_pthread_057.cpp", - "full/It_posix_pthread_059.cpp", - "full/It_posix_pthread_060.cpp", - "full/It_posix_pthread_061.cpp", - "full/It_posix_pthread_062.cpp", - "full/It_posix_pthread_063.cpp", - "full/It_posix_pthread_064.cpp", - "full/It_posix_pthread_066.cpp", - "full/It_posix_pthread_069.cpp", - "full/It_posix_pthread_070.cpp", - "full/It_posix_pthread_071.cpp", - "full/It_posix_pthread_072.cpp", - "full/It_posix_pthread_073.cpp", - "full/It_posix_pthread_074.cpp", - "full/It_posix_pthread_078.cpp", - "full/It_posix_pthread_079.cpp", - "full/It_posix_pthread_080.cpp", - "full/It_posix_pthread_081.cpp", - "full/It_posix_pthread_082.cpp", - "full/It_posix_pthread_083.cpp", - "full/It_posix_pthread_084.cpp", - "full/It_posix_pthread_085.cpp", - "full/It_posix_pthread_087.cpp", - "full/It_posix_pthread_088.cpp", - "full/It_posix_pthread_089.cpp", - "full/It_posix_pthread_090.cpp", - "full/It_posix_pthread_091.cpp", - "full/It_posix_pthread_092.cpp", - "full/It_posix_pthread_094.cpp", - "full/It_posix_pthread_095.cpp", - "full/It_posix_pthread_106.cpp", - "full/It_posix_pthread_107.cpp", - "full/It_posix_pthread_116.cpp", - "full/It_posix_pthread_123.cpp", - "full/It_posix_pthread_124.cpp", - "full/It_posix_pthread_125.cpp", - "full/It_posix_pthread_127.cpp", - "full/It_posix_pthread_129.cpp", - "full/It_posix_pthread_132.cpp", - "full/It_posix_pthread_133.cpp", - "full/It_posix_pthread_134.cpp", - "full/It_posix_pthread_136.cpp", - "full/It_posix_pthread_138.cpp", - "full/It_posix_pthread_141.cpp", - "full/It_posix_pthread_142.cpp", - "full/It_posix_pthread_144.cpp", - "full/It_posix_pthread_152.cpp", - "full/It_posix_pthread_154.cpp", - "full/It_posix_pthread_166.cpp", - "full/It_posix_pthread_167.cpp", - "full/It_posix_pthread_173.cpp", - "full/It_posix_pthread_175.cpp", - "full/It_posix_pthread_176.cpp", - "full/It_posix_pthread_177.cpp", - "full/It_posix_pthread_182.cpp", - "full/It_posix_pthread_185.cpp", - "full/It_posix_pthread_186.cpp", - "full/It_posix_pthread_187.cpp", - "full/It_posix_pthread_188.cpp", - "full/It_posix_pthread_193.cpp", - "full/It_posix_pthread_194.cpp", - "full/It_posix_pthread_200.cpp", - "full/It_posix_pthread_204.cpp", - "full/It_posix_pthread_205.cpp", - "full/It_posix_pthread_206.cpp", - "full/It_posix_pthread_209.cpp", - "full/It_posix_pthread_213.cpp", - "full/It_posix_pthread_217.cpp", - "full/It_posix_pthread_218.cpp", - "full/It_posix_pthread_219.cpp", - "full/It_posix_pthread_221.cpp", - "full/It_posix_pthread_224.cpp", - "full/It_posix_pthread_226.cpp", - "full/It_posix_pthread_233.cpp", - "full/It_posix_pthread_238.cpp", - "full/It_posix_pthread_239.cpp", - "full/It_posix_pthread_240.cpp", - "full/It_posix_pthread_241.cpp", - ] - sources += sources_full - } + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "../..:public_config" ] - configs += [ ":pthread_config" ] } + +source_set("sources_other") { + sources = [ + "full/It_posix_pthread_001.cpp", + "full/It_posix_pthread_002.cpp", + "full/It_posix_pthread_007.cpp", + "full/It_posix_pthread_010.cpp", + "full/It_posix_pthread_011.cpp", + "full/It_posix_pthread_013.cpp", + "full/It_posix_pthread_023.cpp", + "full/It_posix_pthread_025.cpp", + "full/It_posix_pthread_026.cpp", + "full/It_posix_pthread_027.cpp", + "full/It_posix_pthread_028.cpp", + "full/It_posix_pthread_029.cpp", + "full/It_posix_pthread_030.cpp", + "full/It_posix_pthread_031.cpp", + "full/It_posix_pthread_034.cpp", + "full/It_posix_pthread_035.cpp", + "full/It_posix_pthread_039.cpp", + "full/It_posix_pthread_040.cpp", + "full/It_posix_pthread_042.cpp", + "full/It_posix_pthread_044.cpp", + "full/It_posix_pthread_045.cpp", + "full/It_posix_pthread_046.cpp", + "full/It_posix_pthread_051.cpp", + "full/It_posix_pthread_052.cpp", + "full/It_posix_pthread_053.cpp", + "full/It_posix_pthread_054.cpp", + "full/It_posix_pthread_055.cpp", + "full/It_posix_pthread_057.cpp", + "full/It_posix_pthread_059.cpp", + "full/It_posix_pthread_060.cpp", + "full/It_posix_pthread_061.cpp", + "full/It_posix_pthread_062.cpp", + "full/It_posix_pthread_063.cpp", + "full/It_posix_pthread_064.cpp", + "full/It_posix_pthread_066.cpp", + "full/It_posix_pthread_069.cpp", + "full/It_posix_pthread_070.cpp", + "full/It_posix_pthread_071.cpp", + "full/It_posix_pthread_072.cpp", + "full/It_posix_pthread_073.cpp", + "full/It_posix_pthread_074.cpp", + "full/It_posix_pthread_078.cpp", + "full/It_posix_pthread_079.cpp", + "full/It_posix_pthread_080.cpp", + "full/It_posix_pthread_081.cpp", + "full/It_posix_pthread_082.cpp", + "full/It_posix_pthread_083.cpp", + "full/It_posix_pthread_084.cpp", + "full/It_posix_pthread_085.cpp", + "full/It_posix_pthread_087.cpp", + "full/It_posix_pthread_088.cpp", + "full/It_posix_pthread_089.cpp", + "full/It_posix_pthread_090.cpp", + "full/It_posix_pthread_091.cpp", + "full/It_posix_pthread_092.cpp", + "full/It_posix_pthread_094.cpp", + "full/It_posix_pthread_095.cpp", + "full/It_posix_pthread_106.cpp", + "full/It_posix_pthread_107.cpp", + "full/It_posix_pthread_116.cpp", + "full/It_posix_pthread_123.cpp", + "full/It_posix_pthread_124.cpp", + "full/It_posix_pthread_125.cpp", + "full/It_posix_pthread_127.cpp", + "full/It_posix_pthread_129.cpp", + "full/It_posix_pthread_132.cpp", + "full/It_posix_pthread_133.cpp", + "full/It_posix_pthread_134.cpp", + "full/It_posix_pthread_136.cpp", + "full/It_posix_pthread_138.cpp", + "full/It_posix_pthread_141.cpp", + "full/It_posix_pthread_142.cpp", + "full/It_posix_pthread_144.cpp", + "full/It_posix_pthread_152.cpp", + "full/It_posix_pthread_154.cpp", + "full/It_posix_pthread_166.cpp", + "full/It_posix_pthread_167.cpp", + "full/It_posix_pthread_173.cpp", + "full/It_posix_pthread_175.cpp", + "full/It_posix_pthread_176.cpp", + "full/It_posix_pthread_177.cpp", + "full/It_posix_pthread_182.cpp", + "full/It_posix_pthread_185.cpp", + "full/It_posix_pthread_186.cpp", + "full/It_posix_pthread_187.cpp", + "full/It_posix_pthread_188.cpp", + "full/It_posix_pthread_193.cpp", + "full/It_posix_pthread_194.cpp", + "full/It_posix_pthread_200.cpp", + "full/It_posix_pthread_204.cpp", + "full/It_posix_pthread_205.cpp", + "full/It_posix_pthread_206.cpp", + "full/It_posix_pthread_209.cpp", + "full/It_posix_pthread_213.cpp", + "full/It_posix_pthread_217.cpp", + "full/It_posix_pthread_218.cpp", + "full/It_posix_pthread_219.cpp", + "full/It_posix_pthread_221.cpp", + "full/It_posix_pthread_224.cpp", + "full/It_posix_pthread_226.cpp", + "full/It_posix_pthread_233.cpp", + "full/It_posix_pthread_238.cpp", + "full/It_posix_pthread_239.cpp", + "full/It_posix_pthread_240.cpp", + "full/It_posix_pthread_241.cpp", + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_posix_pthread_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + configs += [ ":pthread_config" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_posix_pthread_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + configs += [ ":pthread_config" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/process/mutex/BUILD.gn b/testsuites/unittest/process/mutex/BUILD.gn index 0b1dfa29..75ed44d0 100644 --- a/testsuites/unittest/process/mutex/BUILD.gn +++ b/testsuites/unittest/process/mutex/BUILD.gn @@ -30,47 +30,77 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_mutex_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "../../process/mutex", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "./", +] + +sources_entry = [ + "../../common/osTest.cpp", + "process_mutex_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "process_mutex_test.cpp", + "smoke/pthread_mutex_test_001.cpp", + "smoke/pthread_mutex_test_002.cpp", + "smoke/pthread_mutex_test_003.cpp", + "smoke/pthread_mutex_test_004.cpp", + "smoke/pthread_mutex_test_005.cpp", + "smoke/pthread_mutex_test_006.cpp", + "smoke/pthread_mutex_test_007.cpp", + "smoke/pthread_mutex_test_008.cpp", + "smoke/pthread_mutex_test_009.cpp", + "smoke/pthread_mutex_test_010.cpp", + "smoke/pthread_mutex_test_011.cpp", + "smoke/pthread_mutex_test_012.cpp", + "smoke/pthread_mutex_test_013.cpp", + "smoke/pthread_mutex_test_014.cpp", + "smoke/pthread_mutex_test_015.cpp", + "smoke/pthread_mutex_test_016.cpp", + "smoke/pthread_mutex_test_017.cpp", + "smoke/pthread_mutex_test_018.cpp", + "smoke/pthread_mutex_test_019.cpp", + "smoke/pthread_mutex_test_020.cpp", + "smoke/pthread_mutex_test_021.cpp", + "smoke/pthread_mutex_test_022.cpp", + "smoke/pthread_mutex_test_023.cpp", + "smoke/pthread_mutex_test_024.cpp", + "smoke/pthread_mutex_test_025.cpp", ] - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/pthread_mutex_test_001.cpp", - "smoke/pthread_mutex_test_002.cpp", - "smoke/pthread_mutex_test_003.cpp", - "smoke/pthread_mutex_test_004.cpp", - "smoke/pthread_mutex_test_005.cpp", - "smoke/pthread_mutex_test_006.cpp", - "smoke/pthread_mutex_test_007.cpp", - "smoke/pthread_mutex_test_008.cpp", - "smoke/pthread_mutex_test_009.cpp", - "smoke/pthread_mutex_test_010.cpp", - "smoke/pthread_mutex_test_011.cpp", - "smoke/pthread_mutex_test_012.cpp", - "smoke/pthread_mutex_test_013.cpp", - "smoke/pthread_mutex_test_014.cpp", - "smoke/pthread_mutex_test_015.cpp", - "smoke/pthread_mutex_test_016.cpp", - "smoke/pthread_mutex_test_017.cpp", - "smoke/pthread_mutex_test_018.cpp", - "smoke/pthread_mutex_test_019.cpp", - "smoke/pthread_mutex_test_020.cpp", - "smoke/pthread_mutex_test_021.cpp", - "smoke/pthread_mutex_test_022.cpp", - "smoke/pthread_mutex_test_023.cpp", - "smoke/pthread_mutex_test_024.cpp", - "smoke/pthread_mutex_test_025.cpp", - ] - sources += sources_smoke - } + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "../..:public_config" ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_mutex_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_mutex_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/process/process/BUILD.gn b/testsuites/unittest/process/process/BUILD.gn index 4acab1dc..5a7391c1 100644 --- a/testsuites/unittest/process/process/BUILD.gn +++ b/testsuites/unittest/process/process/BUILD.gn @@ -30,96 +30,126 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_process_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "../../process/process", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "./", +] + +sources_entry = [ + "../../common/osTest.cpp", + "process_process_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "process_process_test.cpp", + "smoke/process_test_001.cpp", + "smoke/process_test_002.cpp", + "smoke/process_test_004.cpp", + "smoke/process_test_005.cpp", + "smoke/process_test_006.cpp", + "smoke/process_test_007.cpp", + "smoke/process_test_008.cpp", + "smoke/process_test_009.cpp", + "smoke/process_test_010.cpp", + "smoke/process_test_011.cpp", + "smoke/process_test_012.cpp", + "smoke/process_test_013.cpp", + "smoke/process_test_014.cpp", + "smoke/process_test_015.cpp", + "smoke/process_test_016.cpp", + "smoke/process_test_017.cpp", + "smoke/process_test_018.cpp", + "smoke/process_test_019.cpp", + "smoke/process_test_020.cpp", + "smoke/process_test_021.cpp", + "smoke/process_test_022.cpp", + "smoke/process_test_023.cpp", + "smoke/process_test_024.cpp", + "smoke/process_test_025.cpp", + "smoke/process_test_026.cpp", + "smoke/process_test_027.cpp", + "smoke/process_test_029.cpp", + "smoke/process_test_030.cpp", + "smoke/process_test_031.cpp", + "smoke/process_test_032.cpp", + "smoke/process_test_033.cpp", + "smoke/process_test_034.cpp", + "smoke/process_test_035.cpp", + "smoke/process_test_036.cpp", + "smoke/process_test_037.cpp", + "smoke/process_test_038.cpp", + "smoke/process_test_039.cpp", + "smoke/process_test_040.cpp", + "smoke/process_test_041.cpp", + "smoke/process_test_042.cpp", + "smoke/process_test_043.cpp", + "smoke/process_test_044.cpp", + "smoke/process_test_045.cpp", + "smoke/process_test_046.cpp", + "smoke/process_test_047.cpp", + "smoke/process_test_048.cpp", + "smoke/process_test_049.cpp", + "smoke/process_test_050.cpp", + "smoke/process_test_051.cpp", + "smoke/process_test_053.cpp", + "smoke/process_test_054.cpp", + "smoke/process_test_055.cpp", + "smoke/process_test_056.cpp", + "smoke/process_test_057.cpp", + "smoke/process_test_058.cpp", + "smoke/process_test_059.cpp", + "smoke/process_test_060.cpp", + "smoke/process_test_061.cpp", + "smoke/process_test_062.cpp", + "smoke/process_test_063.cpp", + "smoke/process_test_064.cpp", + "smoke/process_test_065.cpp", + "smoke/process_test_066.cpp", + "smoke/process_test_067.cpp", + "smoke/process_test_068.cpp", + "smoke/process_test_069.cpp", + "smp/process_test_smp_001.cpp", + "smp/process_test_smp_002.cpp", + "smp/process_test_smp_003.cpp", + "smp/process_test_smp_004.cpp", + "smp/process_test_smp_005.cpp", + "smp/process_test_smp_006.cpp", + "smp/process_test_smp_007.cpp", + "smp/process_test_smp_008.cpp", ] - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/process_test_001.cpp", - "smoke/process_test_002.cpp", - "smoke/process_test_004.cpp", - "smoke/process_test_005.cpp", - "smoke/process_test_006.cpp", - "smoke/process_test_007.cpp", - "smoke/process_test_008.cpp", - "smoke/process_test_009.cpp", - "smoke/process_test_010.cpp", - "smoke/process_test_011.cpp", - "smoke/process_test_012.cpp", - "smoke/process_test_013.cpp", - "smoke/process_test_014.cpp", - "smoke/process_test_015.cpp", - "smoke/process_test_016.cpp", - "smoke/process_test_017.cpp", - "smoke/process_test_018.cpp", - "smoke/process_test_019.cpp", - "smoke/process_test_020.cpp", - "smoke/process_test_021.cpp", - "smoke/process_test_022.cpp", - "smoke/process_test_023.cpp", - "smoke/process_test_024.cpp", - "smoke/process_test_025.cpp", - "smoke/process_test_026.cpp", - "smoke/process_test_027.cpp", - "smoke/process_test_029.cpp", - "smoke/process_test_030.cpp", - "smoke/process_test_031.cpp", - "smoke/process_test_032.cpp", - "smoke/process_test_033.cpp", - "smoke/process_test_034.cpp", - "smoke/process_test_035.cpp", - "smoke/process_test_036.cpp", - "smoke/process_test_037.cpp", - "smoke/process_test_038.cpp", - "smoke/process_test_039.cpp", - "smoke/process_test_040.cpp", - "smoke/process_test_041.cpp", - "smoke/process_test_042.cpp", - "smoke/process_test_043.cpp", - "smoke/process_test_044.cpp", - "smoke/process_test_045.cpp", - "smoke/process_test_046.cpp", - "smoke/process_test_047.cpp", - "smoke/process_test_048.cpp", - "smoke/process_test_049.cpp", - "smoke/process_test_050.cpp", - "smoke/process_test_051.cpp", - "smoke/process_test_053.cpp", - "smoke/process_test_054.cpp", - "smoke/process_test_055.cpp", - "smoke/process_test_056.cpp", - "smoke/process_test_057.cpp", - "smoke/process_test_058.cpp", - "smoke/process_test_059.cpp", - "smoke/process_test_060.cpp", - "smoke/process_test_061.cpp", - "smoke/process_test_062.cpp", - "smoke/process_test_063.cpp", - "smoke/process_test_064.cpp", - "smoke/process_test_065.cpp", - "smoke/process_test_066.cpp", - "smoke/process_test_067.cpp", - "smoke/process_test_068.cpp", - "smoke/process_test_069.cpp", - "smp/process_test_smp_001.cpp", - "smp/process_test_smp_002.cpp", - "smp/process_test_smp_003.cpp", - "smp/process_test_smp_004.cpp", - "smp/process_test_smp_005.cpp", - "smp/process_test_smp_006.cpp", - "smp/process_test_smp_007.cpp", - "smp/process_test_smp_008.cpp", - ] - sources += sources_smoke - } + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "../..:public_config" ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_process_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_process_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/process/pthread/BUILD.gn b/testsuites/unittest/process/pthread/BUILD.gn index a396b1a9..90fb5f75 100644 --- a/testsuites/unittest/process/pthread/BUILD.gn +++ b/testsuites/unittest/process/pthread/BUILD.gn @@ -30,46 +30,76 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_pthread_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "../../process/pthread", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "./", +] + +sources_entry = [ + "../../common/osTest.cpp", + "process_pthread_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "process_pthread_test.cpp", + "smoke/pthread_atfork_test_001.cpp", + "smoke/pthread_atfork_test_002.cpp", + "smoke/pthread_cond_test_001.cpp", + "smoke/pthread_cond_test_002.cpp", + "smoke/pthread_once_test_001.cpp", + "smoke/pthread_test_001.cpp", + "smoke/pthread_test_002.cpp", + "smoke/pthread_test_003.cpp", + "smoke/pthread_test_004.cpp", + "smoke/pthread_test_005.cpp", + "smoke/pthread_test_006.cpp", + "smoke/pthread_test_007.cpp", + "smoke/pthread_test_008.cpp", + "smoke/pthread_test_009.cpp", + "smoke/pthread_test_010.cpp", + "smoke/pthread_test_011.cpp", + "smoke/pthread_test_012.cpp", + "smoke/pthread_test_013.cpp", + "smoke/pthread_test_014.cpp", + "smoke/pthread_test_015.cpp", + "smoke/pthread_test_016.cpp", + "smoke/pthread_test_017.cpp", + "smoke/pthread_test_018.cpp", + "smoke/pthread_test_019.cpp", ] - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/pthread_atfork_test_001.cpp", - "smoke/pthread_atfork_test_002.cpp", - "smoke/pthread_cond_test_001.cpp", - "smoke/pthread_cond_test_002.cpp", - "smoke/pthread_once_test_001.cpp", - "smoke/pthread_test_001.cpp", - "smoke/pthread_test_002.cpp", - "smoke/pthread_test_003.cpp", - "smoke/pthread_test_004.cpp", - "smoke/pthread_test_005.cpp", - "smoke/pthread_test_006.cpp", - "smoke/pthread_test_007.cpp", - "smoke/pthread_test_008.cpp", - "smoke/pthread_test_009.cpp", - "smoke/pthread_test_010.cpp", - "smoke/pthread_test_011.cpp", - "smoke/pthread_test_012.cpp", - "smoke/pthread_test_013.cpp", - "smoke/pthread_test_014.cpp", - "smoke/pthread_test_015.cpp", - "smoke/pthread_test_016.cpp", - "smoke/pthread_test_017.cpp", - "smoke/pthread_test_018.cpp", - "smoke/pthread_test_019.cpp", - ] - sources += sources_smoke - } + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "../..:public_config" ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_pthread_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_pthread_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/process/rwlock/BUILD.gn b/testsuites/unittest/process/rwlock/BUILD.gn index 2df813f2..aa69d086 100644 --- a/testsuites/unittest/process/rwlock/BUILD.gn +++ b/testsuites/unittest/process/rwlock/BUILD.gn @@ -30,24 +30,54 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_rwlock_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "../../process/rwlock", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "./", +] + +sources_entry = [ + "../../common/osTest.cpp", + "process_rwlock_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "process_rwlock_test.cpp", + "smoke/pthread_rwlock_test_001.cpp", + "smoke/pthread_rwlock_test_002.cpp", ] - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/pthread_rwlock_test_001.cpp", - "smoke/pthread_rwlock_test_002.cpp", - ] - sources += sources_smoke - } + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "../..:public_config" ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_rwlock_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_rwlock_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/process/spinlock/BUILD.gn b/testsuites/unittest/process/spinlock/BUILD.gn index 78dd962b..4d87c87c 100644 --- a/testsuites/unittest/process/spinlock/BUILD.gn +++ b/testsuites/unittest/process/spinlock/BUILD.gn @@ -30,23 +30,53 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_spinlock_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "../../process/spinlock", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "./", +] + +sources_entry = [ + "../../common/osTest.cpp", + "process_spinlock_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "process_spinlock_test.cpp", + "smoke/pthread_spinlock_test_001.cpp", ] - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/pthread_spinlock_test_001.cpp", - ] - sources += sources_smoke - } + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "../..:public_config" ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_spinlock_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_spinlock_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/security/capability/BUILD.gn b/testsuites/unittest/security/capability/BUILD.gn index fa9bea0e..f1bfffb4 100644 --- a/testsuites/unittest/security/capability/BUILD.gn +++ b/testsuites/unittest/security/capability/BUILD.gn @@ -2,24 +2,53 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_security_capability_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "../../security/capability", - "//third_party/bounds_checking_function/include", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "./", +] + +sources_entry = [ + "../../common/osTest.cpp", + "security_capability_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "security_capability_test.cpp", + "smoke/cap_test_001.cpp", ] - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/cap_test_001.cpp", - ] - sources += sources_smoke - } - configs = [ "../..:public_config" ] + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_security_capability_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_security_capability_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/security/capability/smoke/cap_test_001.cpp b/testsuites/unittest/security/capability/smoke/cap_test_001.cpp index 74dcad73..95f6eb9f 100644 --- a/testsuites/unittest/security/capability/smoke/cap_test_001.cpp +++ b/testsuites/unittest/security/capability/smoke/cap_test_001.cpp @@ -47,12 +47,13 @@ static void Sigac(int param) static void Child() { - int i = 100; + int i = 10; signal(25, Sigac); while (i--) { - sleep(10); + sleep(1); } + exit(0); } static int TestChild(VOID) @@ -131,7 +132,7 @@ static int TestChild(VOID) ret = capset(&capheader, &capdata[0]); ret = sched_setparam(pid, ¶m); ICUNIT_ASSERT_EQUAL(ret, -1, ret); - + wait(nullptr); exit(92); return 0; diff --git a/testsuites/unittest/security/reugid/BUILD.gn b/testsuites/unittest/security/reugid/BUILD.gn index 7e9ce59a..c5a76673 100644 --- a/testsuites/unittest/security/reugid/BUILD.gn +++ b/testsuites/unittest/security/reugid/BUILD.gn @@ -30,23 +30,53 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_security_reugid_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "../../security/reugid", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "./", +] + +sources_entry = [ + "../../common/osTest.cpp", + "security_reugid_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "security_reugid_test.cpp", + "smoke/reugid_test_001.cpp", ] - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/reugid_test_001.cpp", - ] - sources += sources_smoke - } - configs = [ "../..:public_config" ] + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_security_reugid_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_security_reugid_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/security/vid/BUILD.gn b/testsuites/unittest/security/vid/BUILD.gn index 07e824a7..f30f4767 100644 --- a/testsuites/unittest/security/vid/BUILD.gn +++ b/testsuites/unittest/security/vid/BUILD.gn @@ -30,23 +30,53 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_security_vid_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "../../security/vid", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "./", +] + +sources_entry = [ + "../../common/osTest.cpp", + "security_vid_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "security_vid_test.cpp", + "smoke/vid_test_001.cpp", ] - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/vid_test_001.cpp", - ] - sources += sources_smoke - } - configs = [ "../..:public_config" ] + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_security_vid_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_security_vid_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/signal/BUILD.gn b/testsuites/unittest/signal/BUILD.gn index 81a4e901..bb601ac3 100644 --- a/testsuites/unittest/signal/BUILD.gn +++ b/testsuites/unittest/signal/BUILD.gn @@ -30,85 +30,115 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_signal_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../common/include", - "../signal", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../common/include", + "./", +] + +sources_entry = [ + "../common/osTest.cpp", + "signal_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../common/osTest.cpp", - "signal_test.cpp", + "smoke/It_ipc_fdclr_001.cpp", + "smoke/It_ipc_fdisset_001.cpp", + "smoke/It_ipc_fdset_001.cpp", + "smoke/It_ipc_fdzero_001.cpp", + "smoke/It_ipc_mkfifo_002.cpp", + "smoke/It_ipc_mkfifo_003.cpp", + "smoke/It_ipc_pipe_002.cpp", + "smoke/It_ipc_pipe_003.cpp", + "smoke/It_ipc_pipe_004.cpp", + "smoke/It_ipc_pipe_005.cpp", + "smoke/It_ipc_sigaction_001.cpp", + "smoke/It_ipc_sigpause_001.cpp", + "smoke/It_ipc_sigprocmask_001.cpp", + "smoke/mkfifo_test_001.cpp", + "smoke/mkfifo_test_002.cpp", + "smoke/pipe_test_001.cpp", + "smoke/pipe_test_002.cpp", + "smoke/pipe_test_003.cpp", + "smoke/pipe_test_004.cpp", + "smoke/pipe_test_005.cpp", + "smoke/pipe_test_006.cpp", + "smoke/signal_test_001.cpp", + "smoke/signal_test_002.cpp", + "smoke/signal_test_003.cpp", + "smoke/signal_test_004.cpp", + "smoke/signal_test_005.cpp", + "smoke/signal_test_006.cpp", + "smoke/signal_test_007.cpp", + "smoke/signal_test_008.cpp", + "smoke/signal_test_009.cpp", + "smoke/signal_test_010.cpp", + "smoke/signal_test_011.cpp", + "smoke/signal_test_012.cpp", + "smoke/signal_test_013.cpp", + "smoke/signal_test_014.cpp", + "smoke/signal_test_015.cpp", + "smoke/signal_test_016.cpp", + "smoke/signal_test_017.cpp", + "smoke/signal_test_018.cpp", + "smoke/signal_test_019.cpp", + "smoke/signal_test_020.cpp", + "smoke/signal_test_021.cpp", + "smoke/signal_test_022.cpp", + "smoke/signal_test_023.cpp", + "smoke/signal_test_024.cpp", + "smoke/signal_test_025.cpp", + "smoke/signal_test_026.cpp", + "smoke/signal_test_028.cpp", + "smoke/signal_test_029.cpp", + "smoke/signal_test_030.cpp", + "smoke/signal_test_031.cpp", + "smoke/signal_test_032.cpp", + "smoke/signal_test_033.cpp", + "smoke/signal_test_035.cpp", + "smoke/signal_test_036.cpp", + "smoke/signal_test_037.cpp", + "smoke/signal_test_038.cpp", + "smoke/signal_test_039.cpp", + "smoke/signal_test_040.cpp", + "smoke/signal_test_041.cpp", + "smoke/signal_test_042.cpp", + "smoke/sigset_test_001.cpp", + "smoke/sigset_test_002.cpp", ] - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/It_ipc_fdclr_001.cpp", - "smoke/It_ipc_fdisset_001.cpp", - "smoke/It_ipc_fdset_001.cpp", - "smoke/It_ipc_fdzero_001.cpp", - "smoke/It_ipc_mkfifo_002.cpp", - "smoke/It_ipc_mkfifo_003.cpp", - "smoke/It_ipc_pipe_002.cpp", - "smoke/It_ipc_pipe_003.cpp", - "smoke/It_ipc_pipe_004.cpp", - "smoke/It_ipc_pipe_005.cpp", - "smoke/It_ipc_sigaction_001.cpp", - "smoke/It_ipc_sigpause_001.cpp", - "smoke/It_ipc_sigprocmask_001.cpp", - "smoke/mkfifo_test_001.cpp", - "smoke/mkfifo_test_002.cpp", - "smoke/pipe_test_001.cpp", - "smoke/pipe_test_002.cpp", - "smoke/pipe_test_003.cpp", - "smoke/pipe_test_004.cpp", - "smoke/pipe_test_005.cpp", - "smoke/pipe_test_006.cpp", - "smoke/signal_test_001.cpp", - "smoke/signal_test_002.cpp", - "smoke/signal_test_003.cpp", - "smoke/signal_test_004.cpp", - "smoke/signal_test_005.cpp", - "smoke/signal_test_006.cpp", - "smoke/signal_test_007.cpp", - "smoke/signal_test_008.cpp", - "smoke/signal_test_009.cpp", - "smoke/signal_test_010.cpp", - "smoke/signal_test_011.cpp", - "smoke/signal_test_012.cpp", - "smoke/signal_test_013.cpp", - "smoke/signal_test_014.cpp", - "smoke/signal_test_015.cpp", - "smoke/signal_test_016.cpp", - "smoke/signal_test_017.cpp", - "smoke/signal_test_018.cpp", - "smoke/signal_test_019.cpp", - "smoke/signal_test_020.cpp", - "smoke/signal_test_021.cpp", - "smoke/signal_test_022.cpp", - "smoke/signal_test_023.cpp", - "smoke/signal_test_024.cpp", - "smoke/signal_test_025.cpp", - "smoke/signal_test_026.cpp", - "smoke/signal_test_028.cpp", - "smoke/signal_test_029.cpp", - "smoke/signal_test_030.cpp", - "smoke/signal_test_031.cpp", - "smoke/signal_test_032.cpp", - "smoke/signal_test_033.cpp", - "smoke/signal_test_035.cpp", - "smoke/signal_test_036.cpp", - "smoke/signal_test_037.cpp", - "smoke/signal_test_038.cpp", - "smoke/signal_test_039.cpp", - "smoke/signal_test_040.cpp", - "smoke/signal_test_041.cpp", - "smoke/signal_test_042.cpp", - "smoke/sigset_test_001.cpp", - "smoke/sigset_test_002.cpp", - ] - sources += sources_smoke - } + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "..:public_config" ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_signal_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_signal_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/sys/BUILD.gn b/testsuites/unittest/sys/BUILD.gn index d6f5d738..60c9f87a 100644 --- a/testsuites/unittest/sys/BUILD.gn +++ b/testsuites/unittest/sys/BUILD.gn @@ -30,52 +30,80 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_sys_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../common/include", - "../sys", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../common/include", + "./", +] + +sources_entry = [ + "../common/osTest.cpp", + "sys_unit_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../common/osTest.cpp", - "sys_unit_test.cpp", + "smoke/sys_test_001.cpp", + "smoke/sys_test_004.cpp", + "smoke/sys_test_005.cpp", + "smoke/sys_test_006.cpp", + "smoke/sys_test_007.cpp", + "smoke/sys_test_008.cpp", + "smoke/sys_test_009.cpp", + "smoke/sys_test_010.cpp", + "smoke/sys_test_012.cpp", + "smoke/sys_test_013.cpp", + "smoke/sys_test_014.cpp", + "smoke/sys_test_015.cpp", + "smoke/sys_test_016.cpp", + "smoke/sys_test_017.cpp", + "smoke/sys_test_018.cpp", + "smoke/sys_test_019.cpp", + "smoke/sys_test_020.cpp", + "smoke/sys_test_021.cpp", + "smoke/sys_test_022.cpp", + "smoke/sys_test_023.cpp", + "smoke/sys_test_024.cpp", + "smoke/sys_test_025.cpp", + "smoke/sys_test_026.cpp", + "smoke/sys_test_027.cpp", + "smoke/sys_test_028.cpp", + "smoke/sys_test_029.cpp", + "smoke/sys_test_030.cpp", + "smoke/sys_test_031.cpp", ] - - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/sys_test_001.cpp", - "smoke/sys_test_004.cpp", - "smoke/sys_test_005.cpp", - "smoke/sys_test_006.cpp", - "smoke/sys_test_007.cpp", - "smoke/sys_test_008.cpp", - "smoke/sys_test_009.cpp", - "smoke/sys_test_010.cpp", - "smoke/sys_test_012.cpp", - "smoke/sys_test_013.cpp", - "smoke/sys_test_014.cpp", - "smoke/sys_test_015.cpp", - "smoke/sys_test_016.cpp", - "smoke/sys_test_017.cpp", - "smoke/sys_test_018.cpp", - "smoke/sys_test_019.cpp", - "smoke/sys_test_020.cpp", - "smoke/sys_test_021.cpp", - "smoke/sys_test_022.cpp", - "smoke/sys_test_023.cpp", - "smoke/sys_test_024.cpp", - "smoke/sys_test_025.cpp", - "smoke/sys_test_026.cpp", - "smoke/sys_test_027.cpp", - "smoke/sys_test_028.cpp", - "smoke/sys_test_029.cpp", - "smoke/sys_test_030.cpp", - "smoke/sys_test_031.cpp", - ] - sources += sources_smoke - } - + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "..:public_config" ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_sys_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_sys_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/time/clock/BUILD.gn b/testsuites/unittest/time/clock/BUILD.gn index 475aa4f2..5895738d 100644 --- a/testsuites/unittest/time/clock/BUILD.gn +++ b/testsuites/unittest/time/clock/BUILD.gn @@ -30,41 +30,63 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_time_clock_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "../../time/clock", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "./", +] +sources_entry = [ + "../../common/osTest.cpp", + "time_clock_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "time_clock_test.cpp", + "smoke/clock_test_001.cpp", + "smoke/clock_test_002.cpp", + "smoke/clock_test_003.cpp", + "smoke/clock_test_004.cpp", + "smoke/clock_test_006.cpp", + "smoke/clock_test_007.cpp", + "smoke/clock_test_008.cpp", + "smoke/clock_test_009.cpp", + "smoke/clock_test_011.cpp", + "smoke/clock_test_012.cpp", ] - - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/clock_test_001.cpp", - "smoke/clock_test_002.cpp", - "smoke/clock_test_003.cpp", - "smoke/clock_test_004.cpp", - "smoke/clock_test_006.cpp", - "smoke/clock_test_007.cpp", - "smoke/clock_test_008.cpp", - "smoke/clock_test_009.cpp", - "smoke/clock_test_011.cpp", - "smoke/clock_test_012.cpp", - ] - sources += sources_smoke - } - - if (LOSCFG_USER_TEST_FULL == true) { - sources_full = [ - "full/clock_test_010.cpp", - ] - sources += sources_full - } + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "../../../unittest:public_config" ] } + +source_set("sources_other") { + sources = [ + "full/clock_test_010.cpp", + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_time_clock_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_time_clock_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/time/timer/BUILD.gn b/testsuites/unittest/time/timer/BUILD.gn index fcce247d..7bf06d32 100644 --- a/testsuites/unittest/time/timer/BUILD.gn +++ b/testsuites/unittest/time/timer/BUILD.gn @@ -30,31 +30,58 @@ import("//build/lite/config/test.gni") import("../../config.gni") -unittest("liteos_a_time_timer_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../../common/include", - "../../time/timer", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../../common/include", + "./", +] +sources_entry = [ + "../../common/osTest.cpp", + "time_timer_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../../common/osTest.cpp", - "time_timer_test.cpp", + "smoke/timer_test_001.cpp", + "smoke/timer_test_002.cpp", + "smoke/timer_test_003.cpp", + "smoke/timer_test_004.cpp", + "smoke/timer_test_tzset_001.cpp", + "smoke/timer_test_tzset_002.cpp", ] - - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ - "smoke/timer_test_001.cpp", - "smoke/timer_test_002.cpp", - "smoke/timer_test_003.cpp", - "smoke/timer_test_004.cpp", - "smoke/timer_test_tzset_001.cpp", - "smoke/timer_test_tzset_002.cpp", - ] - sources += sources_smoke - } - + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "../../../unittest:public_config" ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_time_timer_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_time_timer_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "../..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file diff --git a/testsuites/unittest/util/BUILD.gn b/testsuites/unittest/util/BUILD.gn index c5e03406..964f0bb2 100644 --- a/testsuites/unittest/util/BUILD.gn +++ b/testsuites/unittest/util/BUILD.gn @@ -30,22 +30,21 @@ import("//build/lite/config/test.gni") import("../config.gni") -unittest("liteos_a_util_unittest_door") { - output_extension = "bin" - output_dir = "$root_out_dir/test/unittest/kernel" - include_dirs = [ - "../common/include", - "./", - "../misc", - ] +common_include_dirs = [ + "//third_party/googletest/googletest/include", + "../common/include", + "../misc", + "./", +] + +sources_entry = [ + "../common/osTest.cpp", + "util_test.cpp", +] + +source_set("sources_smoke") { sources = [ - "../common/osTest.cpp", - "util_test.cpp", - ] - - if (LOSCFG_USER_TEST_SMOKE == true) { - sources_smoke = [ "smoke/it_test_util_100.cpp", "smoke/it_test_util_101.cpp", "smoke/util_test_001.cpp", @@ -55,10 +54,39 @@ unittest("liteos_a_util_unittest_door") { "smoke/util_test_005.cpp", "smoke/util_test_006.cpp", "smoke/util_test_007.cpp", - ] - sources += sources_smoke - } - + ] + include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] - configs = [ "../../unittest:public_config" ] } + +source_set("sources_other") { + sources = [ + ] + include_dirs = common_include_dirs + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] +} + +if (LOSCFG_USER_TEST_FOR_ALL == true) { + unittest("liteos_a_util_unittest") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_full" ] + deps = [] + deps += [ ":sources_smoke" ] + deps += [ ":sources_other" ] + } +} + +if (LOSCFG_USER_TEST_FOR_DOOR == true) { + unittest("liteos_a_util_unittest_door") { + output_extension = "bin" + output_dir = "$root_out_dir/test/unittest/kernel" + include_dirs = common_include_dirs + sources = sources_entry + configs = [ "..:public_config_smk" ] + deps = [] + deps += [ ":sources_smoke" ] + } +} \ No newline at end of file From b27264b9f32d6d6ef50ffdb96782fc7a09327e0f Mon Sep 17 00:00:00 2001 From: lnlan Date: Sat, 8 May 2021 10:09:39 +0800 Subject: [PATCH 23/36] add testsuites/kernel to build Change-Id: Ia14a3413b6c974771cef2e147083c7748abd1c59 --- Kconfig | 6 ++++++ kernel/common/los_config.c | 6 +++++- testsuites/Makefile | 1 - testsuites/kernel/include/osTest.h | 2 +- .../sample/kernel_base/core/task/smp/It_smp_los_task_002.c | 2 +- .../sample/kernel_base/core/task/smp/It_smp_los_task_003.c | 2 +- .../sample/kernel_base/core/task/smp/It_smp_los_task_026.c | 2 +- .../sample/kernel_base/ipc/event/full/It_los_event_039.c | 3 ++- testsuites/kernel/sample/kernel_base/ipc/sem/It_los_sem.c | 5 ----- testsuites/kernel/src/osTest.c | 4 ++-- 10 files changed, 19 insertions(+), 14 deletions(-) diff --git a/Kconfig b/Kconfig index fbf80924..88fc3389 100644 --- a/Kconfig +++ b/Kconfig @@ -322,6 +322,12 @@ menu "Security" source "../../kernel/liteos_a/security/Kconfig" endmenu +menu "Test" +config ENABLE_KERNEL_TEST + bool "Enable Kernel Test" + default n +endmenu + menu "Stack Smashing Protector (SSP) Compiler Feature" choice diff --git a/kernel/common/los_config.c b/kernel/common/los_config.c index d593007f..bca1ceb1 100644 --- a/kernel/common/los_config.c +++ b/kernel/common/los_config.c @@ -117,7 +117,6 @@ #include "los_hilog.h" #endif - STATIC SystemRebootFunc g_rebootHook = NULL; VOID OsSetRebootHook(SystemRebootFunc func) @@ -373,7 +372,12 @@ STATIC UINT32 OsSystemInitTaskCreate(VOID) TSK_INIT_PARAM_S sysTask; (VOID)memset_s(&sysTask, sizeof(TSK_INIT_PARAM_S), 0, sizeof(TSK_INIT_PARAM_S)); +#ifndef LOSCFG_ENABLE_KERNEL_TEST sysTask.pfnTaskEntry = (TSK_ENTRY_FUNC)SystemInit; +#else + extern void TestSystemInit(void); + sysTask.pfnTaskEntry = (TSK_ENTRY_FUNC)TestSystemInit; +#endif sysTask.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE; sysTask.pcName = "SystemInit"; sysTask.usTaskPrio = LOSCFG_BASE_CORE_TSK_DEFAULT_PRIO; diff --git a/testsuites/Makefile b/testsuites/Makefile index 4b3d7ee8..a50c0552 100644 --- a/testsuites/Makefile +++ b/testsuites/Makefile @@ -92,7 +92,6 @@ $(LITEOS_TEST_LIBC): $(KERNEL) $(KERNEL): $(LITEOS_TEST_AUTOCONFIG_H) $(HIDE)$(MAKE) -C ../ lib || exit 1 - #echo "LITEOS_CFLAGS : $(LITEOS_CFLAGS)" ##### make test menuconfig ##### export CONFIG_=LOSCFG_ diff --git a/testsuites/kernel/include/osTest.h b/testsuites/kernel/include/osTest.h index bdb549a5..7ad31b69 100644 --- a/testsuites/kernel/include/osTest.h +++ b/testsuites/kernel/include/osTest.h @@ -94,7 +94,7 @@ extern "C" { testTask.pcName = task_name; \ testTask.usTaskPrio = prio; \ testTask.uwResved = LOS_TASK_STATUS_DETACHED; \ - } while (0) + } while (0); #if (LOSCFG_KERNEL_SMP == YES) #define TEST_TASK_PARAM_INIT_AFFI(testTask, task_name, entry, prio, affi) \ diff --git a/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_002.c b/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_002.c index cb28d377..ad1ee4a4 100644 --- a/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_002.c +++ b/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_002.c @@ -40,7 +40,7 @@ extern "C" { static void TaskF01(void) { while (1) { - Wfi(); + WFI; }; } diff --git a/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_003.c b/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_003.c index f845f457..cdf68a71 100644 --- a/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_003.c +++ b/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_003.c @@ -40,7 +40,7 @@ extern "C" { static void TaskF01(void) { while (1) { - Wfi(); + WFI; }; } diff --git a/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_026.c b/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_026.c index 6f2f81cc..d0ba60e3 100644 --- a/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_026.c +++ b/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_026.c @@ -42,7 +42,7 @@ static void TaskF01(void) { LOS_AtomicInc(&g_testCount); while (1) { - Wfi(); + WFI; } } diff --git a/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_039.c b/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_039.c index 886dd7ed..4afc4dcf 100644 --- a/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_039.c +++ b/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_039.c @@ -43,7 +43,7 @@ static VOID TaskF01(VOID) g_testCount++; - ret = LOS_EventRead(&g_event, 0x11, LOS_WAITMODE_AND, 2); // 2, The timeout period for reading events. + ret = LOS_EventRead(&g_event, 0x11, LOS_WAITMODE_AND, 200); // 200, The timeout period for reading events. ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT); ICUNIT_GOTO_EQUAL(g_event.uwEventID, 0, g_event.uwEventID, EXIT); @@ -98,6 +98,7 @@ static UINT32 Testcase(VOID) LOS_TaskUnlock(); + LOS_TaskDelay(1); ICUNIT_GOTO_EQUAL(g_testCount, 2, g_testCount, EXIT); // 2, Here, assert that g_testCount is equal to 2. EXIT: diff --git a/testsuites/kernel/sample/kernel_base/ipc/sem/It_los_sem.c b/testsuites/kernel/sample/kernel_base/ipc/sem/It_los_sem.c index 3e8b583f..4a07e548 100644 --- a/testsuites/kernel/sample/kernel_base/ipc/sem/It_los_sem.c +++ b/testsuites/kernel/sample/kernel_base/ipc/sem/It_los_sem.c @@ -98,11 +98,6 @@ VOID ItSuiteLosSem(void) ItLosSem017(); ItLosSem019(); ItLosSem020(); -#if (LOSCFG_KERNEL_SMP != YES) - ItLosSem018(); - ItLosSem021(); - ItLosSem025(); -#endif ItLosSem022(); ItLosSem023(); ItLosSem026(); diff --git a/testsuites/kernel/src/osTest.c b/testsuites/kernel/src/osTest.c index 12d730d4..a9762cec 100644 --- a/testsuites/kernel/src/osTest.c +++ b/testsuites/kernel/src/osTest.c @@ -294,7 +294,7 @@ VOID TestBusyTaskDelay(UINT32 tick) if (runtime <= TestTickCountByCurrCpuid()) { break; } - Wfi(); + WFI; } } @@ -307,7 +307,7 @@ VOID TestAssertBusyTaskDelay(UINT32 timeout, UINT32 flag) if ((runtime <= TestTickCountGet()) || (g_testCount == flag)) { break; } - Wfi(); + WFI; } } From f76fa4a344e7de8b9c5d6cd68dcefe57f6d5da81 Mon Sep 17 00:00:00 2001 From: zhOu <974843735@qq.com> Date: Sat, 8 May 2021 14:24:12 +0800 Subject: [PATCH 24/36] feature: support ipc copy fd to process --- fs/include/fs/fd_table.h | 2 + fs/vfs/include/operation/fs_file.h | 4 + fs/vfs/operation/fs_file.c | 179 ++++++++++++++++++++++++++- kernel/extended/liteipc/hm_liteipc.c | 22 +++- 4 files changed, 201 insertions(+), 6 deletions(-) diff --git a/fs/include/fs/fd_table.h b/fs/include/fs/fd_table.h index ba98fee4..6d8a7eac 100644 --- a/fs/include/fs/fd_table.h +++ b/fs/include/fs/fd_table.h @@ -64,6 +64,8 @@ typedef struct ProcessCB LosProcessCB; void files_refer(int fd); +int files_close_internal(int fd, LosProcessCB *processCB); + struct files_struct *dup_fd(struct files_struct *oldf); struct files_struct *alloc_files(void); diff --git a/fs/vfs/include/operation/fs_file.h b/fs/vfs/include/operation/fs_file.h index 8b8f3239..3bfe1df0 100644 --- a/fs/vfs/include/operation/fs_file.h +++ b/fs/vfs/include/operation/fs_file.h @@ -54,4 +54,8 @@ int CheckProcessFd(int procFd); void FreeProcessFd(int procFd); +int CopyFdToProc(int fd, unsigned int targetPid); + +int CloseProcFd(int fd, unsigned int targetPid); + #endif diff --git a/fs/vfs/operation/fs_file.c b/fs/vfs/operation/fs_file.c index 9b47648d..96e66779 100644 --- a/fs/vfs/operation/fs_file.c +++ b/fs/vfs/operation/fs_file.c @@ -34,6 +34,10 @@ #include "fs/fd_table.h" #include "fs/file.h" #include "fs/fs.h" +#include "mqueue.h" +#ifdef LOSCFG_NET_LWIP_SACK +#include "lwip/sockets.h" +#endif static void FileTableLock(struct fd_table_s *fdt) { @@ -247,7 +251,7 @@ int AllocLowestProcessFd(int minFd) return VFS_ERROR; } - // occupy the fd set + /* occupy the fd set */ FD_SET(procFd, fdt->proc_fds); FileTableUnLock(fdt); @@ -275,7 +279,7 @@ int AllocAndAssocProcessFd(int sysFd, int minFd) return VFS_ERROR; } - // occupy the fd set + /* occupy the fd set */ FD_SET(procFd, fdt->proc_fds); fdt->ft_fds[procFd].sysFd = sysFd; FileTableUnLock(fdt); @@ -303,3 +307,174 @@ int AllocAndAssocSystemFd(int procFd, int minFd) return sysFd; } +static void FdRefer(int sysFd) +{ + if ((sysFd > STDERR_FILENO) && (sysFd < CONFIG_NFILE_DESCRIPTORS)) { + files_refer(sysFd); + } +#if defined(LOSCFG_NET_LWIP_SACK) + if ((sysFd >= CONFIG_NFILE_DESCRIPTORS) && (sysFd < (CONFIG_NFILE_DESCRIPTORS + CONFIG_NSOCKET_DESCRIPTORS))) { + socks_refer(sysFd); + } +#endif +#if defined(LOSCFG_COMPAT_POSIX) + if ((sysFd >= MQUEUE_FD_OFFSET) && (sysFd < (MQUEUE_FD_OFFSET + CONFIG_NQUEUE_DESCRIPTORS))) { + mqueue_refer(sysFd); + } +#endif +} + +static void FdClose(int sysFd, unsigned int targetPid) +{ + UINT32 intSave; + + if ((sysFd > STDERR_FILENO) && (sysFd < CONFIG_NFILE_DESCRIPTORS)) { + LosProcessCB *processCB = OS_PCB_FROM_PID(targetPid); + SCHEDULER_LOCK(intSave); + if (OsProcessIsInactive(processCB)) { + SCHEDULER_UNLOCK(intSave); + return; + } + SCHEDULER_UNLOCK(intSave); + + files_close_internal(sysFd, processCB); + } +#if defined(LOSCFG_NET_LWIP_SACK) + if ((sysFd >= CONFIG_NFILE_DESCRIPTORS) && (sysFd < (CONFIG_NFILE_DESCRIPTORS + CONFIG_NSOCKET_DESCRIPTORS))) { + socks_close(sysFd); + } +#endif +#if defined(LOSCFG_COMPAT_POSIX) + if ((sysFd >= MQUEUE_FD_OFFSET) && (sysFd < (MQUEUE_FD_OFFSET + CONFIG_NQUEUE_DESCRIPTORS))) { + mq_close((mqd_t)sysFd); + } +#endif +} + +static struct fd_table_s *GetProcessFTable(unsigned int pid, sem_t *semId) +{ + UINT32 intSave; + struct files_struct *procFiles = NULL; + LosProcessCB *processCB = OS_PCB_FROM_PID(pid); + + SCHEDULER_LOCK(intSave); + if (OsProcessIsInactive(processCB)) { + SCHEDULER_UNLOCK(intSave); + return NULL; + } + + procFiles = processCB->files; + if (procFiles == NULL || procFiles->fdt == NULL) { + SCHEDULER_UNLOCK(intSave); + return NULL; + } + + *semId = procFiles->fdt->ft_sem; + SCHEDULER_UNLOCK(intSave); + + return procFiles->fdt; +} + +int CopyFdToProc(int fd, unsigned int targetPid) +{ +#if !defined(LOSCFG_NET_LWIP_SACK) && !defined(LOSCFG_COMPAT_POSIX) && !defined(LOSCFG_FS_VFS) + return -ENOSYS; +#else + int sysFd; + struct fd_table_s *fdt = NULL; + int procFd; + sem_t semId; + + if (OS_PID_CHECK_INVALID(targetPid)) { + return -EINVAL; + } + + sysFd = GetAssociatedSystemFd(fd); + if (sysFd < 0) { + return -EBADF; + } + + FdRefer(sysFd); + fdt = GetProcessFTable(targetPid, &semId); + if (fdt == NULL || fdt->ft_fds == NULL) { + FdClose(sysFd, targetPid); + return -EPERM; + } + + /* Take the semaphore (perhaps waiting) */ + if (sem_wait(&semId) != 0) { + /* Target process changed */ + FdClose(sysFd, targetPid); + return -ESRCH; + } + + procFd = AssignProcessFd(fdt, 3); + if (procFd < 0) { + if (sem_post(&semId) == -1) { + PRINT_ERR("sem_post error, errno %d \n", get_errno()); + } + FdClose(sysFd, targetPid); + return -EPERM; + } + + /* occupy the fd set */ + FD_SET(procFd, fdt->proc_fds); + fdt->ft_fds[procFd].sysFd = sysFd; + if (sem_post(&semId) == -1) { + PRINTK("sem_post error, errno %d \n", get_errno()); + } + + return procFd; +#endif +} + +int CloseProcFd(int procFd, unsigned int targetPid) +{ +#if !defined(LOSCFG_NET_LWIP_SACK) && !defined(LOSCFG_COMPAT_POSIX) && !defined(LOSCFG_FS_VFS) + return -ENOSYS; +#else + int sysFd; + struct fd_table_s *fdt = NULL; + sem_t semId; + + if (OS_PID_CHECK_INVALID(targetPid)) { + return -EINVAL; + } + + fdt = GetProcessFTable(targetPid, &semId); + if (fdt == NULL || fdt->ft_fds == NULL) { + return -EPERM; + } + + /* Take the semaphore (perhaps waiting) */ + if (sem_wait(&semId) != 0) { + /* Target process changed */ + return -ESRCH; + } + + if (!IsValidProcessFd(fdt, procFd)) { + if (sem_post(&semId) == -1) { + PRINTK("sem_post error, errno %d \n", get_errno()); + } + return -EPERM; + } + + sysFd = fdt->ft_fds[procFd].sysFd; + if (sysFd < 0) { + if (sem_post(&semId) == -1) { + PRINTK("sem_post error, errno %d \n", get_errno()); + } + return -EPERM; + } + + /* clean the fd set */ + FD_CLR(procFd, fdt->proc_fds); + fdt->ft_fds[procFd].sysFd = -1; + if (sem_post(&semId) == -1) { + PRINTK("sem_post error, errno %d \n", get_errno()); + } + FdClose(sysFd, targetPid); + + return 0; +#endif +} \ No newline at end of file diff --git a/kernel/extended/liteipc/hm_liteipc.c b/kernel/extended/liteipc/hm_liteipc.c index 4d745828..51dc48df 100644 --- a/kernel/extended/liteipc/hm_liteipc.c +++ b/kernel/extended/liteipc/hm_liteipc.c @@ -32,6 +32,7 @@ #include "hm_liteipc.h" #include "linux/kernel.h" #include +#include "fs_file.h" #include "los_mp.h" #include "los_mux.h" #include "los_process_pri.h" @@ -43,8 +44,8 @@ #include "los_trace_frame.h" #endif #include "los_vm_map.h" -#include "los_vm_phys.h" #include "los_vm_page.h" +#include "los_vm_phys.h" #include "los_vm_lock.h" #define USE_TASKID_AS_HANDLE YES @@ -656,9 +657,22 @@ LITE_OS_SEC_TEXT STATIC BOOL IsTaskAlive(UINT32 taskID) return TRUE; } -LITE_OS_SEC_TEXT STATIC UINT32 HandleFd(SpecialObj *obj, BOOL isRollback) +LITE_OS_SEC_TEXT STATIC UINT32 HandleFd(UINT32 processID, SpecialObj *obj, BOOL isRollback) { - /* now fd is not Isolated between processes, do nothing */ + int ret; + if (isRollback == FALSE) { + ret = CopyFdToProc(obj->content.fd, processID); + if (ret < 0) { + return ret; + } + obj->content.fd = ret; + } else { + ret = CloseProcFd(obj->content.fd, processID); + if (ret < 0) { + return ret; + } + } + return LOS_OK; } @@ -719,7 +733,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 HandleObj(UINT32 dstTid, SpecialObj *obj, BOOL is UINT32 processID = OS_TCB_FROM_TID(dstTid)->processID; switch (obj->type) { case OBJ_FD: - ret = HandleFd(obj, isRollback); + ret = HandleFd(processID, obj, isRollback); break; case OBJ_PTR: ret = HandlePtr(processID, obj, isRollback); From e840188a653f5fcff5e151cc4d54d7ea10d744c2 Mon Sep 17 00:00:00 2001 From: zhushengle Date: Tue, 11 May 2021 15:34:06 +0800 Subject: [PATCH 25/36] fix:User-mode exception handling runs on the thread's SVC stack. Close #I3QFXL Change-Id: Iaa036651415d93df231916d7534364ad3a86ed3c --- arch/arm/arm/src/include/los_exc_pri.h | 5 ----- arch/arm/arm/src/los_exc.c | 20 +++++++++----------- arch/arm/arm/src/los_hw_exc.S | 7 +++++++ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/arch/arm/arm/src/include/los_exc_pri.h b/arch/arm/arm/src/include/los_exc_pri.h index e1e9c487..84e37d0a 100644 --- a/arch/arm/arm/src/include/los_exc_pri.h +++ b/arch/arm/arm/src/include/los_exc_pri.h @@ -40,11 +40,6 @@ extern "C" { #endif /* __cplusplus */ #endif /* __cplusplus */ -STATIC INLINE VOID OsSetCurrCpuSp(UINTPTR regSp) -{ - __asm__ __volatile__("mov sp, %0" :: "r"(regSp)); -} - #define OS_SYSTEM_NORMAL 0 #define OS_SYSTEM_EXC_CURR_CPU 1 #define OS_SYSTEM_EXC_OTHER_CPU 2 diff --git a/arch/arm/arm/src/los_exc.c b/arch/arm/arm/src/los_exc.c index e7a1a87c..873b8e1a 100644 --- a/arch/arm/arm/src/los_exc.c +++ b/arch/arm/arm/src/los_exc.c @@ -525,7 +525,7 @@ VOID OsDumpContextMem(const ExcContext *excBufAddr) } } -STATIC VOID OsExcRestore(UINTPTR taskStackPointer) +STATIC VOID OsExcRestore(VOID) { UINT32 currCpuID = ArchCurrCpuid(); @@ -536,8 +536,6 @@ STATIC VOID OsExcRestore(UINTPTR taskStackPointer) OsPercpuGet()->excFlag = CPU_RUNNING; #endif OsPercpuGet()->taskLockCnt = 0; - - OsSetCurrCpuSp(taskStackPointer); } STATIC VOID OsUserExcHandle(ExcContext *excBufAddr) @@ -564,8 +562,6 @@ STATIC VOID OsUserExcHandle(ExcContext *excBufAddr) #endif runProcess->processStatus &= ~OS_PROCESS_FLAG_EXIT; - OsExcRestore(excBufAddr->SP); - #if (LOSCFG_KERNEL_SMP == YES) #ifdef LOSCFG_FS_VFS OsWakeConsoleSendTask(); @@ -577,6 +573,9 @@ STATIC VOID OsUserExcHandle(ExcContext *excBufAddr) #endif OsProcessExitCodeSignalSet(runProcess, SIGUSR2); + /* Exception handling All operations should be kept prior to that operation */ + OsExcRestore(); + /* kill user exc process */ LOS_Exit(OS_PRO_EXIT_OK); @@ -962,7 +961,7 @@ STATIC VOID OsWaitOtherCoresHandleExcEnd(UINT32 currCpuID) } } -STATIC VOID OsCheckAllCpuStatus(UINTPTR taskStackPointer) +STATIC VOID OsCheckAllCpuStatus(VOID) { UINT32 currCpuID = ArchCurrCpuid(); UINT32 ret, target; @@ -982,7 +981,7 @@ STATIC VOID OsCheckAllCpuStatus(UINTPTR taskStackPointer) } else if (g_excFromUserMode[currCpuID] == TRUE) { if (OsCurrProcessGet()->processID == g_currHandleExcPID) { LOS_SpinUnlock(&g_excSerializerSpin); - OsExcRestore(taskStackPointer); + OsExcRestore(); while (1) { ret = LOS_TaskSuspend(OsCurrTaskGet()->taskID); PrintExcInfo("%s supend task :%u failed: 0x%x\n", __FUNCTION__, OsCurrTaskGet()->taskID, ret); @@ -1010,12 +1009,11 @@ STATIC VOID OsCheckAllCpuStatus(UINTPTR taskStackPointer) } #endif -STATIC VOID OsCheckCpuStatus(UINTPTR taskStackPointer) +STATIC VOID OsCheckCpuStatus(VOID) { #if (LOSCFG_KERNEL_SMP == YES) - OsCheckAllCpuStatus(taskStackPointer); + OsCheckAllCpuStatus(); #else - (VOID)taskStackPointer; g_currHandleExcCpuID = ArchCurrCpuid(); #endif } @@ -1036,7 +1034,7 @@ LITE_OS_SEC_TEXT VOID STATIC OsExcPriorDisposal(ExcContext *excBufAddr) g_excFromUserMode[ArchCurrCpuid()] = FALSE; } - OsCheckCpuStatus(excBufAddr->SP); + OsCheckCpuStatus(); if (g_excFromUserMode[ArchCurrCpuid()] == TRUE) { while (1) { diff --git a/arch/arm/arm/src/los_hw_exc.S b/arch/arm/arm/src/los_hw_exc.S index 82dad4f8..98ebba86 100644 --- a/arch/arm/arm/src/los_hw_exc.S +++ b/arch/arm/arm/src/los_hw_exc.S @@ -371,6 +371,13 @@ _osExceptDispatch: MOV R1, SP +#ifdef LOSCFG_KERNEL_VM + LDR R2, [SP, #(19 * 4)] @ Get CPSR + AND R2, R2, #CPSR_MASK_MODE @ Interrupted mode + CMP R2, #CPSR_USER_MODE @ User mode + BEQ _osExceptionGetSP +#endif + EXC_SP_SET __exc_stack_top, OS_EXC_STACK_SIZE, R6, R7 MRC P15, 0, R4, C0, C0, 5 From 0cf9748ce00867051b23d84005256bcbc1ff017f Mon Sep 17 00:00:00 2001 From: lnlan Date: Tue, 11 May 2021 20:22:05 +0800 Subject: [PATCH 26/36] delete useless module in Kconfig Change-Id: I748e6e82c4a09cdbbae741da668cf2bec0406690 --- testsuites/Kconfig | 1 - testsuites/kernel/Kconfig | 347 ----------------------------- testsuites/kernel/Kconfig_case | 387 --------------------------------- 3 files changed, 735 deletions(-) delete mode 100644 testsuites/kernel/Kconfig_case diff --git a/testsuites/Kconfig b/testsuites/Kconfig index b93b9a89..a6ea6fae 100644 --- a/testsuites/Kconfig +++ b/testsuites/Kconfig @@ -45,6 +45,5 @@ config TEST depends on KERNEL_TEST source "./kernel/Kconfig" -source "./kernel/Kconfig_case" endmenu diff --git a/testsuites/kernel/Kconfig b/testsuites/kernel/Kconfig index e6165afa..9ff05b0d 100644 --- a/testsuites/kernel/Kconfig +++ b/testsuites/kernel/Kconfig @@ -43,20 +43,6 @@ config TEST_FULL default y depends on TEST && TEST_LEVEL -config TEST_PRESSURE - bool "Enable Test Pressure" - default n - depends on TEST && TEST_LEVEL - -config TEST_LLT - bool "Enable Test LLT" - default n - depends on TEST && TEST_LEVEL - -config TEST_MUTIL - bool "Enable Multi Testsuit" - default n - depends on KERNEL_TEST && TEST config TEST_KERNEL_BASE bool "Enable Kernel Testsuit" default y @@ -69,90 +55,18 @@ config TEST_KERNEL_BASE_CORE bool "Enable CORE Testsuit" default y depends on KERNEL_TEST && TEST_KERNEL_BASE && TEST -config TEST_KERNEL_BASE_MP - bool "Enable MP Testsuit" - default n - depends on KERNEL_TEST && TEST_KERNEL_BASE && TEST && KERNEL_SMP -config TEST_KERNEL_BASE_MEM - bool "Enable MEM Testsuit" - default n - depends on KERNEL_TEST && TEST_KERNEL_BASE && TEST -config TEST_KERNEL_BASE_VM - bool "Enable VM Testsuit" - default n - depends on KERNEL_TEST && TEST_KERNEL_BASE && TEST -config TEST_KERNEL_BASE_MISC - bool "Enable MISC Testsuit" - default n - depends on KERNEL_TEST && TEST_KERNEL_BASE && TEST -config TEST_KERNEL_BASE_OM - bool "Enable OM Testsuit" - default n - depends on KERNEL_TEST && TEST_KERNEL_BASE && TEST -config TEST_KERNEL_BASE_ATOMIC - bool "Enable ATOMIC Testsuit" - default n - depends on KERNEL_TEST && TEST_KERNEL_BASE && TEST config TEST_KERNEL_EXTEND bool "Enable Extended Kernel Testsuit" default y depends on KERNEL_TEST && TEST -config TEST_KERNEL_EXTEND_CPP - bool "Enable CPP Testsuit" - default n - depends on KERNEL_TEST && TEST_KERNEL_EXTEND && TEST config TEST_KERNEL_EXTEND_CPUP bool "Enable CPUP Testsuit" default y depends on KERNEL_TEST && TEST_KERNEL_EXTEND && TEST -config TEST_KERNEL_EXTEND_EXC - bool "Enable EXC Testsuit" - default n - depends on KERNEL_TEST && TEST_KERNEL_EXTEND && TEST -config TEST_KERNEL_EXTEND_UNALIGNACCESS - bool "Enable UNALIGNACCESS Testsuit" - default n - depends on KERNEL_TEST && DO_ALIGN && TEST_KERNEL_EXTEND && TEST -config TEST_KERNEL_EXTEND_MMU - bool "Enable MMU Testsuit" - default n - depends on KERNEL_TEST && TEST_KERNEL_EXTEND && TEST -config TEST_KERNEL_EXTEND_DYNLOAD - bool "Enable DYNLOAD Testsuit" - default n - depends on KERNEL_TEST && TEST_KERNEL_EXTEND && TEST -config TEST_KERNEL_EXTEND_MPU - bool "Enable MPU Testsuit" - default n - depends on KERNEL_TEST && TEST_KERNEL_EXTEND && TEST -config TEST_KERNEL_EXTEND_RUNSTOP - bool "Enable RUNSTOP Testsuit" - default n - depends on KERNEL_TEST && TEST_KERNEL_EXTEND && KERNEL_RUNSTOP && TEST -config TEST_KERNEL_EXTEND_SCATTER - bool "Enable SCATTER Testsuit" - default n - depends on KERNEL_TEST && TEST_KERNEL_EXTEND && KERNEL_SCATTER && TEST -config TEST_KERNEL_EXTEND_TICKLESS - bool "Enable TICKLESS Testsuit" - default n - depends on KERNEL_TEST && TEST_KERNEL_EXTEND && TEST -config TEST_KERNEL_EXTEND_TRACE - bool "Enable TRACE Testsuit" - default n - depends on KERNEL_TEST && TEST_KERNEL_EXTEND && TEST config TEST_POSIX bool "Enable Posix Testsuit" default y depends on KERNEL_TEST && TEST -config TEST_POSIX_MEM - bool "Enable Mem Testsuit" - default n - depends on KERNEL_TEST && TEST_POSIX && TEST -config TEST_POSIX_MQUEUE - bool "Enable Mqueue Testsuit" - default n - depends on KERNEL_TEST && TEST_POSIX && TEST config TEST_POSIX_MUTEX bool "Enable Mutex Testsuit" default y @@ -161,266 +75,5 @@ config TEST_POSIX_PTHREAD bool "Enable Pthread Testsuit" default y depends on KERNEL_TEST && TEST_POSIX && TEST -config TEST_POSIX_SCHED - bool "Enable Sched Testsuit" - default n - depends on KERNEL_TEST && TEST_POSIX && TEST -config TEST_POSIX_SEM - bool "Enable Sem Testsuit" - default n - depends on KERNEL_TEST && TEST_POSIX && TEST -config TEST_POSIX_SWTMR - bool "Enable Swtmr Testsuit" - default n - depends on KERNEL_TEST && TEST_POSIX && TEST -config TEST_LINUX - bool "Enable Linux Testsuit" - default n - depends on KERNEL_TEST && TEST -config TEST_LINUX_HRTIMER - bool "Enable Hrtimer Testsuit" - default n - depends on KERNEL_TEST && TEST_LINUX && TEST -config TEST_FS - bool "Enable FS Testsuit" - default n - depends on KERNEL_TEST && TEST - -config TEST_FS_VFS - bool "Enable VFS Test" - default n - depends on KERNEL_TEST && TEST_FS && TEST -config TEST_FS_JFFS - bool "Enable JFFS Test" - default n - depends on KERNEL_TEST && TEST_FS && TEST -config TEST_FS_RAMFS - bool "Enable RAMFS Test" - default n - depends on KERNEL_TEST && TEST_FS && TEST - -config TEST_FS_FAT - bool "Enable FAT Test" - default n - depends on KERNEL_TEST && TEST_FS && TEST -config TEST_FS_FAT_FAT32 - bool "Enable FAT32 Test" - default n - depends on KERNEL_TEST && TEST_FS_FAT && TEST -config TEST_FAT32_FSCK - bool "Enable FAT32 Fsck Test" - default n - depends on KERNEL_TEST && TEST_FS_FAT && TEST - -config TEST_FS_VIRPART - bool "Enable FAT virtual partition test" - default n - depends on KERNEL_TEST && FS_FAT_VIRTUAL_PARTITION && TEST_FS && TEST -config TEST_FS_PROC - bool "Enable PROC Test" - default n - depends on KERNEL_TEST && TEST_FS && TEST -config TEST_FS_NFS - bool "Enable NFS Test" - default n - depends on KERNEL_TEST && TEST_FS && TEST -config TEST_MTD - bool "Enable MTD Testsuit" - default n - depends on KERNEL_TEST && TEST - -config TEST_MTD_JFFS - bool "Enable JFFS MTD Testsuit" - default n - depends on KERNEL_TEST && TEST_MTD && TEST - -config TEST_MTD_FAT - bool "Enable FAT MTD Testsuit" - default n - depends on KERNEL_TEST && TEST_MTD && !FS_FAT_VIRTUAL_PARTITION && TEST - -config TEST_MTD_DISK - bool "Enable FAT MTD DISK Test" - default n - depends on KERNEL_TEST && TEST_MTD && !FS_FAT_VIRTUAL_PARTITION && TEST - -config TEST_MTD_FAT_VIRPART - bool "Enable FAT virtual partition MTD test" - default n - depends on KERNEL_TEST && TEST_MTD && FS_FAT_VIRTUAL_PARTITION && TEST - -config TEST_DRIVERBASE - bool "Enable DriverBase Testsuit" - default n - depends on KERNEL_TEST && TEST -config TEST_LIBC - bool "Enable LIBC Testsuit" - default n - depends on KERNEL_TEST && TEST -config TEST_LIBM - bool "Enable LIBM Testsuit" - default n - depends on KERNEL_TEST && TEST - -config TEST_SHELL - bool "Enable Shell Testsuit" - default n - depends on KERNEL_TEST && TEST -config TEST_USB - bool "Enable Usb Manual Testsuit" - default n - depends on KERNEL_TEST && TEST && DRIVERS_USB - help - -config TEST_HOST_MASS_DEVICE - bool "Enable Host Mass Testsuit" - default n - depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_MASS_STORAGE && TEST -config TEST_HOST_UVC - bool "Enable Host UVC Testsuit" - default n - depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_HOST_UVC && TEST - -config TEST_DEVICE_MASS_GADGET - bool "Enable Device Mass Testsuit" - default n - depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_MASS_STORAGE_GADGET && TEST -config TEST_UVC_GADGET - bool "Enable UVC Gadget Testsuit" - default n - depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_UVC_GADGET && TEST -config TEST_UAC_GADGET - bool "Enable UAC Gadget Testsuit" - default n - depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_UAC_GADGET && TEST - -config TEST_CAMERA_GADGET - bool "Enable Camera Gadget Testsuit" - default n - depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_CAMERA_GADGET && TEST -config TEST_HUB_GADGET - bool "Enable HUB Gadget Testsuit" - default n - depends on KERNEL_TEST && TEST_USB && TEST -config TEST_SERIAL_GADGET - bool "Enable Serial Gadget Testsuit" - default n - depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_SERIAL_GADGET && TEST -config TEST_HID_GADGET - bool "Enable HID Gadget Testsuit" - default n - depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_HID_GADGET && TEST -config TEST_ETHERNET_GADGET - bool "Enable Ethernet Gadget Testsuit" - default n - depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_ETHERNET_GADGET && TEST -config TEST_MULTI_GADGET - bool "Enable Ethernet & Serial Gadget Testsuit" - default n - depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_ETH_SER_GADGET && TEST -config TEST_DFU_GADGET - bool "Enable Drivers DFU Testsuit" - default n - depends on KERNEL_TEST && TEST_USB && DRIVERS_USB_DFU_GADGET && TEST -config TEST_MUTILDEVICE_GADGET - bool "Enable Drivers Multidevices Testsuit" - default n - depends on KERNEL_TEST && TEST_USB && TEST -config TEST_SMP_USB - bool "Enable Usb SMP Testsuit" - default n - depends on KERNEL_TEST && TEST_USB && TEST && KERNEL_SMP -config TEST_HOST_ETH - bool "Enable Host Eth Testsuit" - default n - depends on KERNEL_TEST && TEST_USB && TEST - -config TEST_AUTO_USB - bool "Enable Usb Auto Testsuit" - default n - depends on KERNEL_TEST && TEST && DRIVERS_USB - -config TEST_MMC - bool "Enable MMC Testsuit" - default n - depends on KERNEL_TEST && DRIVERS_MMC && TEST - -config TEST_SD - bool "Enable SD Testsuit" - default n - depends on KERNEL_TEST && DRIVERS_MMC && TEST_MMC && TEST - -config TEST_SDIO - bool "Enable SDIO Testsuit" - default n - depends on KERNEL_TEST && DRIVERS_MMC && TEST_MMC && TEST - -comment "Only one platform can be selected" - depends on KERNEL_TEST && DRIVERS_MMC && TEST_MMC && TEST && TEST_SDIO -config TEST_SDIO_1131S - depends on KERNEL_TEST && DRIVERS_MMC && TEST_MMC && TEST && TEST_SDIO - bool "1131s" -config TEST_SDIO_RTL8189 - depends on KERNEL_TEST && DRIVERS_MMC && TEST_MMC && TEST && TEST_SDIO - bool "RTL8189" - -config TEST_PERFORMANCE - bool "Enable Performance Testsuit" - default n - depends on KERNEL_TEST && TEST -config TEST_PERFORMANCE_CORE - bool "Enable Performance CORE Testsuit" - default n - depends on KERNEL_TEST && TEST_PERFORMANCE && TEST -config TEST_PERFORMANCE_MEM - bool "Enable Performance MEM Testsuit" - default n - depends on KERNEL_TEST && TEST_PERFORMANCE && TEST -config TEST_PERFORMANCE_FS - bool "Enable Performance FS Testsuit" - default n - depends on KERNEL_TEST && TEST_PERFORMANCE && TEST -config TEST_PERFORMANCE_USB - bool "Enable Performance USB Testsuit" - default n - depends on KERNEL_TEST && TEST_PERFORMANCE && TEST -config TEST_PERFORMANCE_NET - bool "Enable Performance NET Testsuit" - default n - depends on KERNEL_TEST && TEST_PERFORMANCE && TEST - -config TEST_NET - bool "Enable NET Test" - default n - depends on KERNEL_TEST && TEST - help - Attention: if this option turns on, other test suits will be ignored. -config TEST_LWIP - bool "Enable LWIP Testsuit" - default n - depends on KERNEL_TEST && TEST_NET && TEST -config AR6K3_WIFI_TEST - bool "Enable AR6K3_WIFI Test" - default n - depends on KERNEL_TEST && TEST && DRIVERS_WIFI_QRD - help - Attention: if this option turns on, other test suits will be ignored. -config BCM_WIFI_TEST - bool "Enable BCM_WIFI Test" - default n - depends on KERNEL_TEST && TEST && DRIVERS_WIFI_BCM - help - Attention: if this option turns on, other test suits will be ignored. - -config TEST_PLATFORM - bool "Enable Platform Testsuit" - default n - depends on KERNEL_TEST && TEST -config 3RDPARTY_TEST - bool "Enable 3rdParty Test" - default n - depends on KERNEL_TEST && TEST && 3RDPARTY - help - Attention: 3rdParty tools and libs test diff --git a/testsuites/kernel/Kconfig_case b/testsuites/kernel/Kconfig_case deleted file mode 100644 index 45d67d47..00000000 --- a/testsuites/kernel/Kconfig_case +++ /dev/null @@ -1,387 +0,0 @@ -# Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. -# Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without modification, -# are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, this list of -# conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, this list -# of conditions and the following disclaimer in the documentation and/or other materials -# provided with the distribution. -# -# 3. Neither the name of the copyright holder nor the names of its contributors may be used -# to endorse or promote products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -config LOSCFG_TEST_LEVEL - int "Test Level" - default 2 - depends on LOSCFG_TESTSUIT_SHELL - help - Attention: - 0:smoke test - 1:llt test - 2:full test - 3:presssure test -config LOSCFG_TEST_KERNEL_BASE - bool "Enable Kernel Testsuit" - default n - depends on LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_KERNEL_BASE_IPC - bool "Enable IPC Testsuit" - default n - depends on LOSCFG_TEST_KERNEL_BASE && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_KERNEL_BASE_CORE - bool "Enable CORE Testsuit" - default n - depends on LOSCFG_TEST_KERNEL_BASE && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_KERNEL_BASE_MEM - bool "Enable MEM Testsuit" - default n - depends on LOSCFG_TEST_KERNEL_BASE && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_KERNEL_BASE_VM - bool "Enable VM Testsuit" - default n - depends on LOSCFG_TEST_KERNEL_BASE && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_KERNEL_BASE_MISC - bool "Enable MISC Testsuit" - default n - depends on LOSCFG_TEST_KERNEL_BASE && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_KERNEL_BASE_OM - bool "Enable OM Testsuit" - default n - depends on LOSCFG_TEST_KERNEL_BASE && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_KERNEL_BASE_ATOMIC - bool "Enable ATOMIC Testsuit" - default n - depends on LOSCFG_TEST_KERNEL_BASE && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_KERNEL_EXTEND - bool "Enable Extended Kernel Testsuit" - default n - depends on LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_KERNEL_EXTEND_CPP - bool "Enable CPP Testsuit" - default n - depends on LOSCFG_TEST_KERNEL_EXTEND && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_KERNEL_EXTEND_CPUP - bool "Enable CPUP Testsuit" - default n - depends on LOSCFG_TEST_KERNEL_EXTEND && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_KERNEL_EXTEND_EXC - bool "Enable EXC Testsuit" - default n - depends on LOSCFG_TEST_KERNEL_EXTEND && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_KERNEL_EXTEND_UNALIGNACCESS - bool "Enable UNALIGNACCESS Testsuit" - default n - depends on LOSCFG_DO_ALIGN && LOSCFG_TEST_KERNEL_EXTEND && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_KERNEL_EXTEND_MMU - bool "Enable MMU Testsuit" - default n - depends on LOSCFG_TEST_KERNEL_EXTEND && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_KERNEL_EXTEND_DYNLOAD - bool "Enable DYNLOAD Testsuit" - default n - depends on LOSCFG_TEST_KERNEL_EXTEND && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_KERNEL_EXTEND_MPU - bool "Enable MPU Testsuit" - default n - depends on LOSCFG_TEST_KERNEL_EXTEND && LOSCFG_TESTSUIT_SHELL - -config LOSCFG_TEST_KERNEL_EXTEND_TICKLESS - bool "Enable TICKLESS Testsuit" - default n - depends on LOSCFG_TEST_KERNEL_EXTEND && LOSCFG_TESTSUIT_SHELL - -config LOSCFG_TEST_KERNEL_EXTEND_TRACE - bool "Enable TRACE Testsuit" - default n - depends on LOSCFG_TEST_KERNEL_EXTEND && LOSCFG_TESTSUIT_SHELL - -config LOSCFG_TEST_POSIX - bool "Enable Posix Testsuit" - default n - depends on LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_POSIX_MEM - bool "Enable Mem Testsuit" - default n - depends on LOSCFG_TEST_POSIX && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_POSIX_MQUEUE - bool "Enable Mqueue Testsuit" - default n - depends on LOSCFG_TEST_POSIX && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_POSIX_MUTEX - bool "Enable Mutex Testsuit" - default n - depends on LOSCFG_TEST_POSIX && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_POSIX_PTHREAD - bool "Enable Pthread Testsuit" - default n - depends on LOSCFG_TEST_POSIX && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_POSIX_SCHED - bool "Enable Sched Testsuit" - default n - depends on LOSCFG_TEST_POSIX && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_POSIX_SEM - bool "Enable Sem Testsuit" - default n - depends on LOSCFG_TEST_POSIX && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_POSIX_SWTMR - bool "Enable Swtmr Testsuit" - default n - depends on LOSCFG_TEST_POSIX && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_LINUX - bool "Enable Linux Testsuit" - default n - depends on LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_LINUX_HRTIMER - bool "Enable Hrtimer Testsuit" - default n - depends on LOSCFG_TEST_LINUX && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_FS - bool "Enable FS Testsuit" - default n - depends on LOSCFG_TESTSUIT_SHELL - -config LOSCFG_TEST_FS_VFS - bool "Enable VFS Test" - default n - depends on LOSCFG_TEST_FS && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_FS_JFFS - bool "Enable JFFS Test" - default n - depends on LOSCFG_TEST_FS && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_FS_RAMFS - bool "Enable RAMFS Test" - default n - depends on LOSCFG_TEST_FS && LOSCFG_TESTSUIT_SHELL - -config LOSCFG_TEST_FS_FAT - bool "Enable FAT Test" - default n - depends on LOSCFG_TEST_FS && !LOSCFG_FS_FAT_VIRTUAL_PARTITION && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_FS_FAT_FAT32 - bool "Enable FAT32 Test" - default n - depends on LOSCFG_TEST_FS_FAT && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_FS_FAT_EXFAT - bool "Enable exFAT Test" - default n - depends on LOSCFG_TEST_FS_FAT && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_FAT32_FSCK - bool "Enable FAT32 Fsck Test" - default n - depends on LOSCFG_TEST_FS_FAT && LOSCFG_TESTSUIT_SHELL - -config LOSCFG_TEST_FS_VIRPART - bool "Enable FAT virtual partition test" - default n - depends on LOSCFG_FS_FAT_VIRTUAL_PARTITION && LOSCFG_TEST_FS && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_FS_PROC - bool "Enable PROC Test" - default n - depends on LOSCFG_TEST_FS && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_FS_NFS - bool "Enable NFS Test" - default n - depends on LOSCFG_TEST_FS && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_MTD - bool "Enable MTD Testsuit" - default n - depends on LOSCFG_TESTSUIT_SHELL - -config LOSCFG_TEST_MTD_JFFS - bool "Enable JFFS MTD Testsuit" - default n - depends on LOSCFG_TEST_MTD && LOSCFG_TESTSUIT_SHELL - -config LOSCFG_TEST_MTD_FAT - bool "Enable FAT MTD Testsuit" - default n - depends on LOSCFG_TEST_MTD && !LOSCFG_FS_FAT_VIRTUAL_PARTITION && LOSCFG_TESTSUIT_SHELL - -config LOSCFG_TEST_MTD_FAT_VIRPART - bool "Enable FAT virtual partition MTD test" - default n - depends on LOSCFG_TEST_MTD && LOSCFG_FS_FAT_VIRTUAL_PARTITION && LOSCFG_TESTSUIT_SHELL - -config LOSCFG_TEST_DRIVERBASE - bool "Enable DriverBase Testsuit" - default n - depends on LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_LIBC - bool "Enable LIBC Testsuit" - default n - depends on LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_LIBM - bool "Enable LIBM Testsuit" - default n - depends on LOSCFG_TESTSUIT_SHELL - -config LOSCFG_TEST_SHELL - bool "Enable Shell Testsuit" - default n - depends on LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_USB - bool "Enable Usb Testsuit" - default n - depends on LOSCFG_TESTSUIT_SHELL && LOSCFG_DRIVERS_USB - help - -config LOSCFG_TEST_HOST_MASS_DEVICE - bool "Enable Host Mass Testsuit" - default n - depends on LOSCFG_TEST_USB && LOSCFG_DRIVERS_USB_MASS_STORAGE && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_DEVICE_MASS_GADGET - bool "Enable Device Mass Testsuit" - default n - depends on LOSCFG_TEST_USB && LOSCFG_DRIVERS_USB_MASS_STORAGE_GADGET && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_UVC_GADGET - bool "Enable UVC Gadget Testsuit" - default n - depends on LOSCFG_TEST_USB && LOSCFG_DRIVERS_USB_UVC_GADGET && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_UAC_GADGET - bool "Enable UAC Gadget Testsuit" - default n - depends on LOSCFG_TEST_USB && LOSCFG_DRIVERS_USB_UAC_GADGET && LOSCFG_TESTSUIT_SHELL - -config LOSCFG_TEST_CAMERA_GADGET - bool "Enable Camera Gadget Testsuit" - default n - depends on LOSCFG_TEST_USB && LOSCFG_DRIVERS_USB_CAMERA_GADGET && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_HUB_GADGET - bool "Enable HUB Gadget Testsuit" - default n - depends on LOSCFG_TEST_USB && LOSCFG_DRIVERS_USB_MASS_STORAGE && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_SERIAL_GADGET - bool "Enable Serial Gadget Testsuit" - default n - depends on LOSCFG_TEST_USB && LOSCFG_DRIVERS_USB_SERIAL_GADGET && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_ETHERNET_GADGET - bool "Enable Ethernet Gadget Testsuit" - default n - depends on LOSCFG_TEST_USB && LOSCFG_DRIVERS_USB_ETHERNET_GADGET && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_MULTI_GADGET - bool "Enable Ethernet & Serial Gadget Testsuit" - default n - depends on LOSCFG_TEST_USB && LOSCFG_DRIVERS_USB_ETH_SER_GADGET && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_DFU_GADGET - bool "Enable Drivers DFU Testsuit" - default n - depends on LOSCFG_TEST_USB && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_MUTILDEVICE_GADGET - bool "Enable Drivers Multidevices Testsuit" - default n - depends on LOSCFG_TEST_USB && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_HOST_ETH - bool "Enable Host Eth Testsuit" - default n - depends on LOSCFG_TEST_USB && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_AUTO_USB - bool "Enable Usb auto Testsuit" - default n - depends on LOSCFG_TEST_USB && LOSCFG_TESTSUIT_SHELL - -config LOSCFG_TEST_MMC - bool "Enable MMC Testsuit" - default n - depends on LOSCFG_TESTSUIT_SHELL && LOSCFG_DRIVERS_MMC - -config LOSCFG_TEST_SD - bool "Enable SD Testsuit" - default n - depends on LOSCFG_TEST_MMC && LOSCFG_DRIVERS_MMC && LOSCFG_TESTSUIT_SHELL - -config LOSCFG_TEST_SDIO - bool "Enable SDIO Testsuit" - default n - depends on LOSCFG_TEST_MMC && LOSCFG_DRIVERS_MMC && LOSCFG_TESTSUIT_SHELL - -comment "Only one platform can be selected" - depends on LOSCFG_TEST_SDIO && LOSCFG_TEST_MMC && LOSCFG_DRIVERS_MMC && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_SDIO_1131S - depends on LOSCFG_TEST_SDIO && LOSCFG_TEST_MMC && LOSCFG_DRIVERS_MMC && LOSCFG_TESTSUIT_SHELL - bool "1131s" -config LOSCFG_TEST_SDIO_RTL8189 - depends on LOSCFG_TEST_SDIO && LOSCFG_TEST_MMC && LOSCFG_DRIVERS_MMC && LOSCFG_TESTSUIT_SHELL - bool "RTL8189" - -config LOSCFG_TEST_PERFORMANCE - bool "Enable Performance Testsuit" - default n - depends on LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_PERFORMANCE_CORE - bool "Enable Performance CORE Testsuit" - default n - depends on LOSCFG_TEST_PERFORMANCE && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_PERFORMANCE_MEM - bool "Enable Performance MEM Testsuit" - default n - depends on LOSCFG_TEST_PERFORMANCE && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_PERFORMANCE_FS - bool "Enable Performance FS Testsuit" - default n - depends on LOSCFG_TEST_PERFORMANCE && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_PERFORMANCE_USB - bool "Enable Performance USB Testsuit" - default n - depends on LOSCFG_TEST_PERFORMANCE && LOSCFG_TESTSUIT_SHELL -config LOSCFG_TEST_PERFORMANCE_NET - bool "Enable Performance NET Testsuit" - default n - depends on LOSCFG_TEST_PERFORMANCE && LOSCFG_TESTSUIT_SHELL - -config LOSCFG_TEST_PLATFORM - bool "Enable Platform Testsuit" - default n - depends on LOSCFG_TESTSUIT_SHELL - -config LOSCFG_TEST_NET - bool "Enable NET Test" - default n - depends on LOSCFG_TESTSUIT_SHELL - help - Attention: if this option turns on, other test suits will be ignored. - -config LOSCFG_TEST_LWIP - bool "Enable LWIP Testsuit" - default n - depends on LOSCFG_TEST_NET && LOSCFG_TESTSUIT_SHELL -config AR6K3_WIFI_TEST - bool "Enable AR6K3_WIFI Test" - default n - depends on LOSCFG_TESTSUIT_SHELL && LOSCFG_DRIVERS_WIFI_QRD - help - Attention: if this option turns on, other test suits will be ignored. -config BCM_WIFI_TEST - bool "Enable BCM_WIFI Test" - default n - depends on LOSCFG_TESTSUIT_SHELL && LOSCFG_DRIVERS_WIFI_BCM - help - Attention: if this option turns on, other test suits will be ignored. - -config LOSCFG_3RDPARTY_TEST - bool "Enable 3rdParty Test" - default n - depends on LOSCFG_TESTSUIT_SHELL && LOSCFG_3RDPARTY - help - Attention: 3rdParty tools and libs test -config LOSCFG_TEST_MANUAL_SHELL - bool "Enable Manual Test" - default n - depends on LOSCFG_TESTSUIT_SHELL - From 044f2c7c17c68e10aeccc3af0c222cfc722d194c Mon Sep 17 00:00:00 2001 From: Guangyao Ma Date: Tue, 11 May 2021 20:42:37 +0800 Subject: [PATCH 27/36] fix: do not build toybox temporarily Change-Id: I5fc289f6f657fe8dfad0131df51571892749d172 --- apps/module.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/module.mk b/apps/module.mk index e2d014d6..e669b4ee 100644 --- a/apps/module.mk +++ b/apps/module.mk @@ -46,5 +46,7 @@ endif #only enable for qemu now ifeq ($(LOSCFG_PLATFORM_QEMU_ARM_VIRT_CA7), y) APP_SUBDIRS += mksh +ifeq ($(WHEN_TOYBOX_IS_READY), y) APP_SUBDIRS += toybox endif +endif From 937734b1e9f5fc52e0ac727549bd2e4b4c864e3c Mon Sep 17 00:00:00 2001 From: Guangyao Ma Date: Tue, 11 May 2021 21:09:24 +0800 Subject: [PATCH 28/36] fix: modify event API description Change-Id: I131c70e52d907b6c52232596475f2dba16612fce --- kernel/base/ipc/los_event.c | 4 ++-- kernel/include/los_event.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/base/ipc/los_event.c b/kernel/base/ipc/los_event.c index 9fe6142d..028e35c9 100644 --- a/kernel/base/ipc/los_event.c +++ b/kernel/base/ipc/los_event.c @@ -296,7 +296,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_EventDestroy(PEVENT_CB_S eventCB) return LOS_OK; } -LITE_OS_SEC_TEXT_MINOR UINT32 LOS_EventClear(PEVENT_CB_S eventCB, UINT32 events) +LITE_OS_SEC_TEXT_MINOR UINT32 LOS_EventClear(PEVENT_CB_S eventCB, UINT32 eventMask) { UINT32 intSave; @@ -304,7 +304,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 LOS_EventClear(PEVENT_CB_S eventCB, UINT32 events) return LOS_ERRNO_EVENT_PTR_NULL; } SCHEDULER_LOCK(intSave); - eventCB->uwEventID &= events; + eventCB->uwEventID &= eventMask; SCHEDULER_UNLOCK(intSave); return LOS_OK; diff --git a/kernel/include/los_event.h b/kernel/include/los_event.h index f9a9a455..8a426eaa 100644 --- a/kernel/include/los_event.h +++ b/kernel/include/los_event.h @@ -287,7 +287,7 @@ extern UINT32 LOS_EventWrite(PEVENT_CB_S eventCB, UINT32 events); /** * @ingroup los_event - * @brief Clear the event occurring in a specified task. + * @brief Clear the event of the eventCB by a specified eventMask. * * @par Description: *
    @@ -300,7 +300,7 @@ extern UINT32 LOS_EventWrite(PEVENT_CB_S eventCB, UINT32 events); *
* * @param eventCB [IN/OUT] Pointer to the event control block to be cleared. - * @param events [IN] Mask of the event to be cleared. + * @param eventMask [IN] Mask of the event to be cleared. * * @retval #LOS_ERRNO_EVENT_PTR_NULL Null pointer. * @retval #LOS_OK The event is successfully cleared. @@ -308,7 +308,7 @@ extern UINT32 LOS_EventWrite(PEVENT_CB_S eventCB, UINT32 events); *
  • los_event.h: the header file that contains the API declaration.
* @see LOS_EventPoll | LOS_EventRead | LOS_EventWrite */ -extern UINT32 LOS_EventClear(PEVENT_CB_S eventCB, UINT32 events); +extern UINT32 LOS_EventClear(PEVENT_CB_S eventCB, UINT32 eventMask); /** * @ingroup los_event From bef4ab9835dec865898c74337dfb7154718b94aa Mon Sep 17 00:00:00 2001 From: SimonLi Date: Thu, 13 May 2021 19:03:43 +0800 Subject: [PATCH 29/36] fix: rebuild mksh depends on rebuild.sh script --- apps/mksh/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/mksh/Makefile b/apps/mksh/Makefile index a468a046..c6180344 100755 --- a/apps/mksh/Makefile +++ b/apps/mksh/Makefile @@ -46,7 +46,7 @@ LOCAL_CFLAGS += -DMKSH_LESS_CMDLINE_EDITING -DMKSH_LESS_BUILDINS -DMKSH_NO_INITC all:$(MKSH) $(MKSH): -ifneq ($(wildcard $(BUILD_DIR)),) +ifneq ($(wildcard $(BUILD_DIR)/Rebuild.sh),) $(HIDE)echo "not clean, rebuilding now" $(HIDE)chmod +x $(BUILD_DIR)/Rebuild.sh $(HIDE)cd $(BUILD_DIR) && ./Rebuild.sh > $(BUILD_LOG) 2>&1 From e38f9a98c9d373db8381af707c5996d1fefef64e Mon Sep 17 00:00:00 2001 From: SimonLi Date: Thu, 13 May 2021 19:20:26 +0800 Subject: [PATCH 30/36] fix: mkdir -p is more robust --- apps/mksh/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/mksh/Makefile b/apps/mksh/Makefile index c6180344..15f3c36f 100755 --- a/apps/mksh/Makefile +++ b/apps/mksh/Makefile @@ -51,7 +51,7 @@ ifneq ($(wildcard $(BUILD_DIR)/Rebuild.sh),) $(HIDE)chmod +x $(BUILD_DIR)/Rebuild.sh $(HIDE)cd $(BUILD_DIR) && ./Rebuild.sh > $(BUILD_LOG) 2>&1 else - $(HIDE)mkdir $(BUILD_DIR) + $(HIDE)mkdir -p $(BUILD_DIR) $(HIDE)$(CP) $(LITEOSTHIRDPARTY)/$(MKSH)/. $(BUILD_DIR) $(HIDE)chmod +x $(BUILD_DIR)/Build.sh $(HIDE)cd $(BUILD_DIR) && CC=$(CC) TARGET_OS=$(TARGET_OS) CFLAGS="$(LOCAL_CFLAGS)" LDFLAGS="$(LDFLAGS)" ./Build.sh -r > $(BUILD_LOG) 2>&1 From 4abd2e0247b14718bb21756fb446142140d30a88 Mon Sep 17 00:00:00 2001 From: boxi Date: Fri, 14 May 2021 08:59:52 +0800 Subject: [PATCH 31/36] fix: Optimize quickstart node implementation Adjust QuickstartListen parameters: 1.delete monitored process pid 2.add timeout waiting Close #I3R8O8 Change-Id: I89c8626c80b8d6fdaea7cd46029dd9a34b555d37 --- .../quickstart/include/los_dev_quickstart.h | 12 ++--- drivers/char/quickstart/src/quickstart.c | 46 ++++++++----------- 2 files changed, 24 insertions(+), 34 deletions(-) diff --git a/drivers/char/quickstart/include/los_dev_quickstart.h b/drivers/char/quickstart/include/los_dev_quickstart.h index de393762..8d9ff447 100644 --- a/drivers/char/quickstart/include/los_dev_quickstart.h +++ b/drivers/char/quickstart/include/los_dev_quickstart.h @@ -49,21 +49,19 @@ typedef enum { } QuickstartStage; typedef enum { - QS_UNREGISTER = QS_STAGE_LIMIT, /* quickstart dev unregister */ - QS_NOTIFY, /* quickstart notify */ - QS_LISTEN, /* quickstart listen */ + QS_NOTIFY = QS_STAGE_LIMIT, /* quickstart notify */ + QS_LISTEN, /* quickstart listen */ QS_CTL_LIMIT } QuickstartConctrl; typedef struct { - unsigned int pid; unsigned int events; -} QuickstartMask; + unsigned int wait; +} QuickstartListenArgs; #define QUICKSTART_IOC_MAGIC 'T' -#define QUICKSTART_UNREGISTER _IO(QUICKSTART_IOC_MAGIC, QS_UNREGISTER) #define QUICKSTART_NOTIFY _IO(QUICKSTART_IOC_MAGIC, QS_NOTIFY) -#define QUICKSTART_LISTEN _IOR(QUICKSTART_IOC_MAGIC, QS_LISTEN, QuickstartMask) +#define QUICKSTART_LISTEN _IOR(QUICKSTART_IOC_MAGIC, QS_LISTEN, QuickstartListenArgs) #define QUICKSTART_STAGE(x) _IO(QUICKSTART_IOC_MAGIC, (x)) #define QUICKSTART_NODE "/dev/quickstart" diff --git a/drivers/char/quickstart/src/quickstart.c b/drivers/char/quickstart/src/quickstart.c index 22451f87..84db844a 100644 --- a/drivers/char/quickstart/src/quickstart.c +++ b/drivers/char/quickstart/src/quickstart.c @@ -33,7 +33,7 @@ #include "fcntl.h" #include "linux/kernel.h" #include "los_process_pri.h" - +#include "fs/fs.h" EVENT_CB_S g_qsEvent; static SysteminitHook g_systemInitFunc[QS_STAGE_CNT] = {0}; @@ -51,10 +51,7 @@ static int QuickstartClose(struct file *filep) static int QuickstartNotify(unsigned int events) { - unsigned int pid = LOS_GetCurrProcessID(); - /* 16:low 16 bits for eventMask, high 16 bits for pid */ - unsigned int notifyEvent = (pid << 16) | events; - int ret = LOS_EventWrite((PEVENT_CB_S)&g_qsEvent, notifyEvent); + int ret = LOS_EventWrite((PEVENT_CB_S)&g_qsEvent, events); if (ret != 0) { PRINT_ERR("%s,%d:0x%x\n", __FUNCTION__, __LINE__, ret); ret = -EINVAL; @@ -62,17 +59,21 @@ static int QuickstartNotify(unsigned int events) return ret; } +#define WAITLIMIT 300000 /* 5min = 5*60*1000*1tick(1ms) */ + static int QuickstartListen(unsigned long arg) { - QuickstartMask listenMask; - if (copy_from_user(&listenMask, (struct QuickstartMask __user *)arg, sizeof(QuickstartMask)) != LOS_OK) { - PRINT_ERR("%s,%d\n", __FUNCTION__, __LINE__); + QuickstartListenArgs args; + if (copy_from_user(&args, (QuickstartListenArgs __user *)arg, sizeof(QuickstartListenArgs)) != LOS_OK) { + PRINT_ERR("%s,%d,failed!\n", __FUNCTION__, __LINE__); return -EINVAL; } - /* 16:low 16 bits for eventMask, high 16 bits for pid */ - unsigned int mask = (listenMask.pid << 16) | listenMask.events; - int ret = LOS_EventRead((PEVENT_CB_S)&g_qsEvent, mask, LOS_WAITMODE_AND | LOS_WAITMODE_CLR, LOS_WAIT_FOREVER); - if (ret != mask) { + if (args.wait > WAITLIMIT) { + args.wait = WAITLIMIT; + PRINT_ERR("%s wait arg is too longer, set to WAITLIMIT!\n", __FUNCTION__); + } + int ret = LOS_EventRead((PEVENT_CB_S)&g_qsEvent, args.events, LOS_WAITMODE_AND | LOS_WAITMODE_CLR, args.wait); + if (ret != args.events && ret != 0) { /* 0: nowait is normal case */ PRINT_ERR("%s,%d:0x%x\n", __FUNCTION__, __LINE__, ret); ret = -EINVAL; } @@ -97,8 +98,9 @@ static int QuickstartStageWorking(unsigned int level) return 0; } -static int QuickstartDevUnregister(void) +static int QuickstartDevUnlink(struct Vnode *node) { + (void)node; return unregister_driver(QUICKSTART_NODE); } @@ -114,9 +116,6 @@ static ssize_t QuickstartIoctl(struct file *filep, int cmd, unsigned long arg) return -EACCES; } switch (cmd) { - case QUICKSTART_UNREGISTER: - ret = QuickstartDevUnregister(); - break; case QUICKSTART_LISTEN: ret = QuickstartListen(arg); break; @@ -128,17 +127,10 @@ static ssize_t QuickstartIoctl(struct file *filep, int cmd, unsigned long arg) } static const struct file_operations_vfs g_quickstartDevOps = { - QuickstartOpen, /* open */ - QuickstartClose, /* close */ - NULL, /* read */ - NULL, /* write */ - NULL, /* seek */ - QuickstartIoctl, /* ioctl */ - NULL, /* mmap */ -#ifndef CONFIG_DISABLE_POLL - NULL, /* poll */ -#endif - NULL, /* unlink */ + .open = QuickstartOpen, /* open */ + .close = QuickstartClose, /* close */ + .ioctl = QuickstartIoctl, /* ioctl */ + .unlink = QuickstartDevUnlink, /* unlink */ }; int QuickstartDevRegister(void) From 967607e1c8bdab55dd07868221e34dd2e908ed58 Mon Sep 17 00:00:00 2001 From: zhuoli Date: Fri, 14 May 2021 10:42:32 +0800 Subject: [PATCH 32/36] Update search path in llvm --- tools/build/mk/los_config.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build/mk/los_config.mk b/tools/build/mk/los_config.mk index 676bc588..91cf344e 100644 --- a/tools/build/mk/los_config.mk +++ b/tools/build/mk/los_config.mk @@ -574,8 +574,8 @@ endif ifeq ($(LOSCFG_COMPILER_CLANG_LLVM), y) LITEOS_COMPILER_CXXLIB_PATH = $(LITEOS_COMPILER_PATH)/lib/$(LLVM_TARGET)/c++/a7_softfp_neon-vfpv4 -LITEOS_COMPILER_GCCLIB_PATH = $(LITEOS_COMPILER_PATH)/lib/clang/9.0.0/lib/$(LLVM_TARGET)/a7_softfp_neon-vfpv4 -LITEOS_COMPILER_GCC_INCLUDE = -I $(LITEOS_COMPILER_PATH)/lib/clang/9.0.0/include +LITEOS_COMPILER_GCCLIB_PATH = $(LITEOS_COMPILER_PATH)/lib/clang/current/lib/$(LLVM_TARGET)/a7_softfp_neon-vfpv4 +LITEOS_COMPILER_GCC_INCLUDE = -I $(LITEOS_COMPILER_PATH)/lib/clang/current/include else ifeq ($(LOSCFG_COMPILER_HIMIX_32), y) LITEOS_COMPILER_CXXLIB_PATH = $(LITEOS_COMPILER_PATH)/$(COMPILE_NAME)/lib LITEOS_COMPILER_GCCLIB_PATH = $(LITEOS_COMPILER_PATH)/lib/gcc/$(COMPILE_NAME)/$(VERSION_NUM) From a89fb57f5795236b93fd19ee2d7a059cae1b2b1b Mon Sep 17 00:00:00 2001 From: zhushengle Date: Fri, 14 May 2021 12:56:56 +0800 Subject: [PATCH 33/36] fix: Fix kernel page fault exception handling causing system exception. Close #I3RAN4 Change-Id: Ice9bc67371ad85476ec99b46b7555d41abd93e94 --- arch/arm/arm/src/los_hw_exc.S | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/arm/arm/src/los_hw_exc.S b/arch/arm/arm/src/los_hw_exc.S index 98ebba86..0ef952d2 100644 --- a/arch/arm/arm/src/los_hw_exc.S +++ b/arch/arm/arm/src/los_hw_exc.S @@ -181,6 +181,7 @@ _osExceptUndefInstrHdl: MOV R2, #0 MOV R3, #0 STMFD SP!, {R2-R3} @ far and fsr fields, are 0 under this anomaly + STMFD SP!, {R4-R11} MOV R0, #OS_EXCEPT_UNDEF_INSTR @ Set exception ID to OS_EXCEPT_UNDEF_INSTR. B _osExceptDispatch @ Branch to global exception handler. @@ -240,6 +241,7 @@ _osKernelSVCHandler: MOV R0, #0 STR R0, [SP, #0] STR R0, [SP, #4] + STMFD SP!, {R4-R11} MOV R0, #OS_EXCEPT_SWI @ Set exception ID to OS_EXCEPT_SWI. B _osExceptDispatch @ Branch to global exception handler. @@ -261,9 +263,10 @@ _osExceptPrefetchAbortHdl: MRC P15, 0, R2, C6, C0, 2 MRC P15, 0, R3, C5, C0, 1 STMFD SP!, {R2-R3} @ Save far and fsr + STMFD SP!, {R4-R11} #ifdef LOSCFG_KERNEL_VM - LDR R0, [SP, #(11 * 4)] + LDR R0, [SP, #(19 * 4)] AND R0, R0, #CPSR_MASK_MODE @ Interrupted mode CMP R0, #CPSR_USER_MODE @ User mode BNE _osKernelExceptPrefetchAbortHdl @@ -302,6 +305,7 @@ _osExceptDataAbortHdl: MRC P15, 0, R2, C6, C0, 0 MRC P15, 0, R3, C5, C0, 0 STMFD SP!, {R2-R3} @ Save far and fsr + STMFD SP!, {R4-R11} #ifdef LOSCFG_KERNEL_VM MOV R1, SP @@ -320,6 +324,7 @@ _osExceptDataAbortHdl: #ifdef LOSCFG_KERNEL_VM _osExcPageFaultReturn: + LDMFD SP!, {R4-R11} ADD SP, SP, #(2 * 4) LDMFD SP, {R13, R14}^ ADD SP, SP, #(2 * 4) @ Jump reserved fileds @@ -340,6 +345,7 @@ _osExceptAddrAbortHdl: MOV R2, #0 MOV R3, #0 STMFD SP!, {R2-R3} @ far and fsr fields, are 0 under this anomaly + STMFD SP!, {R4-R11} MOV R0, #OS_EXCEPT_ADDR_ABORT @ Set exception ID to OS_EXCEPT_ADDR_ABORT. B _osExceptDispatch @ Branch to global exception handler. @@ -357,12 +363,12 @@ _osExceptFiqHdl: MOV R2, #0 MOV R3, #0 STMFD SP!, {R2-R3} @ far and fsr fields, are 0 under this anomaly + STMFD SP!, {R4-R11} @ Description: Exception handler @ Parameter : R0 Exception Type @ Regs Hold : R3 Exception`s CPSR _osExceptDispatch: - STMFD SP!, {R4-R11} LDR R8, [SP, #(8 * 4)] @ Get far LDR R9, [SP, #(9 * 4)] @ Get fsr From 8da10b943970f6d1b06284ed39ef63e9669dd05e Mon Sep 17 00:00:00 2001 From: YOUR_NAME Date: Fri, 14 May 2021 14:42:41 +0800 Subject: [PATCH 34/36] Fix memory leak check and interity error check. Delete redundant judgments. Close #I3P10Y and #I3QNLT Change-Id: Ibaf5d4da46f12c291619bb88a41ac18af4612ca1 --- kernel/base/mem/membox/los_membox.c | 4 ---- kernel/base/mem/tlsf/los_memory.c | 8 ++------ 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/kernel/base/mem/membox/los_membox.c b/kernel/base/mem/membox/los_membox.c index fff7e794..cbc48c27 100644 --- a/kernel/base/mem/membox/los_membox.c +++ b/kernel/base/mem/membox/los_membox.c @@ -94,10 +94,6 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_MemboxInit(VOID *pool, UINT32 poolSize, UINT32 MEMBOX_LOCK(intSave); boxInfo->uwBlkSize = LOS_MEMBOX_ALLIGNED(blkSize + OS_MEMBOX_NODE_HEAD_SIZE); - if (boxInfo->uwBlkSize == 0) { - MEMBOX_UNLOCK(intSave); - return LOS_NOK; - } boxInfo->uwBlkNum = (poolSize - sizeof(LOS_MEMBOX_INFO)) / boxInfo->uwBlkSize; boxInfo->uwBlkCnt = 0; if (boxInfo->uwBlkNum == 0) { diff --git a/kernel/base/mem/tlsf/los_memory.c b/kernel/base/mem/tlsf/los_memory.c index 28e3c418..7db9db96 100644 --- a/kernel/base/mem/tlsf/los_memory.c +++ b/kernel/base/mem/tlsf/los_memory.c @@ -919,10 +919,6 @@ STATIC INLINE VOID *OsMemAlloc(struct OsMemPoolHead *pool, UINT32 size, UINT32 i #endif UINT32 allocSize = OS_MEM_ALIGN(size + OS_MEM_NODE_HEAD_SIZE, OS_MEM_ALIGN_SIZE); - if (allocSize == 0) { - return NULL; - } - #if OS_MEM_EXPAND_ENABLE retry: #endif @@ -1531,13 +1527,13 @@ STATIC INLINE VOID OsMemMagicCheckPrint(struct OsMemNodeHead **tmpNode) STATIC UINT32 OsMemAddrValidCheckPrint(const VOID *pool, struct OsMemFreeNodeHead **tmpNode) { - if (!OsMemAddrValidCheck(pool, (*tmpNode)->prev)) { + if (((*tmpNode)->prev != NULL) && !OsMemAddrValidCheck(pool, (*tmpNode)->prev)) { PRINT_ERR("[%s], %d, memory check error!\n" " freeNode.prev:%#x is out of legal mem range\n", __FUNCTION__, __LINE__, (*tmpNode)->prev); return LOS_NOK; } - if (!OsMemAddrValidCheck(pool, (*tmpNode)->next)) { + if (((*tmpNode)->next != NULL) && !OsMemAddrValidCheck(pool, (*tmpNode)->next)) { PRINT_ERR("[%s], %d, memory check error!\n" " freeNode.next:%#x is out of legal mem range\n", __FUNCTION__, __LINE__, (*tmpNode)->next); From fbe98af997299f9e384f97bea1dfa4dccc910f07 Mon Sep 17 00:00:00 2001 From: lnlan Date: Sat, 15 May 2021 16:29:50 +0800 Subject: [PATCH 35/36] fixed that LOSCFG_USER_TEST_SMP is unuseful Change-Id: Ib6bd11fbeaac88e69de663a7a3f2d01ac1fe9042 --- testsuites/unittest/BUILD.gn | 19 ++++++++++++++++--- testsuites/unittest/IO/BUILD.gn | 2 ++ testsuites/unittest/IPC/BUILD.gn | 2 ++ testsuites/unittest/config.gni | 7 ++++++- testsuites/unittest/drivers/hid/BUILD.gn | 2 ++ testsuites/unittest/drivers/storage/BUILD.gn | 2 ++ testsuites/unittest/dynload/BUILD.gn | 2 ++ testsuites/unittest/exc/BUILD.gn | 2 ++ testsuites/unittest/fs/BUILD.gn | 2 ++ testsuites/unittest/fs/proc/BUILD.gn | 2 ++ testsuites/unittest/fs/vfat2/BUILD.gn | 2 ++ testsuites/unittest/liteipc/BUILD.gn | 2 ++ testsuites/unittest/mem/shm/BUILD.gn | 2 ++ testsuites/unittest/mem/vm/BUILD.gn | 2 ++ testsuites/unittest/misc/BUILD.gn | 2 ++ testsuites/unittest/net/netdb/BUILD.gn | 2 ++ testsuites/unittest/net/resolv/BUILD.gn | 2 ++ testsuites/unittest/net/socket/BUILD.gn | 2 ++ testsuites/unittest/posix/mem/BUILD.gn | 2 ++ testsuites/unittest/posix/mqueue/BUILD.gn | 2 ++ testsuites/unittest/posix/pthread/BUILD.gn | 2 ++ testsuites/unittest/process/mutex/BUILD.gn | 2 ++ testsuites/unittest/process/process/BUILD.gn | 2 ++ testsuites/unittest/process/pthread/BUILD.gn | 2 ++ testsuites/unittest/process/rwlock/BUILD.gn | 2 ++ testsuites/unittest/process/spinlock/BUILD.gn | 2 ++ .../unittest/security/capability/BUILD.gn | 2 ++ testsuites/unittest/security/reugid/BUILD.gn | 2 ++ testsuites/unittest/security/vid/BUILD.gn | 2 ++ testsuites/unittest/signal/BUILD.gn | 2 ++ testsuites/unittest/sys/BUILD.gn | 2 ++ testsuites/unittest/time/clock/BUILD.gn | 2 ++ testsuites/unittest/time/timer/BUILD.gn | 2 ++ testsuites/unittest/util/BUILD.gn | 2 ++ 34 files changed, 86 insertions(+), 4 deletions(-) diff --git a/testsuites/unittest/BUILD.gn b/testsuites/unittest/BUILD.gn index 3768b79b..36718d8c 100644 --- a/testsuites/unittest/BUILD.gn +++ b/testsuites/unittest/BUILD.gn @@ -29,17 +29,28 @@ import("config.gni") +local_flags = [] local_flags_smoke = [] local_flags_full = [] -if (board_name == "hispark_taurus") { - local_flags_smoke += [ "-DLOSCFG_USER_TEST_SMP" ] - local_flags_full += [ "-DLOSCFG_USER_TEST_SMP" ] +if (LOSCFG_USER_TEST_SMP == "enable" || (LOSCFG_USER_TEST_SMP == "default" && board_name == "hispark_taurus")) { + local_flags = [ "-DLOSCFG_USER_TEST_SMP" ] } local_flags_smoke += [ "-DLOSCFG_USER_TEST_SMOKE" ] local_flags_full += [ "-DLOSCFG_USER_TEST_SMOKE" ] local_flags_full += [ "-DLOSCFG_USER_TEST_FULL" ] #local_flags_full += [ "-DLOSCFG_USER_TEST_PRESSURE" ] +config("local_public_config") { + cflags = [ "-fpermissive" ] + cflags += [ + "-O2", + "-fbuiltin", + "-Wno-narrowing", + ] + cflags += local_flags + cflags_cc = cflags +} + config("public_config_smk") { cflags = [ "-fpermissive" ] cflags += [ @@ -48,6 +59,7 @@ config("public_config_smk") { "-Wno-narrowing", ] cflags += local_flags_smoke + cflags += local_flags cflags_cc = cflags } @@ -59,6 +71,7 @@ config("public_config_full") { "-Wno-narrowing", ] cflags += local_flags_full + cflags += local_flags cflags_cc = cflags } diff --git a/testsuites/unittest/IO/BUILD.gn b/testsuites/unittest/IO/BUILD.gn index daf0b997..3836d24e 100644 --- a/testsuites/unittest/IO/BUILD.gn +++ b/testsuites/unittest/IO/BUILD.gn @@ -48,6 +48,7 @@ source_set("sources_smoke") { "smoke/IO_test_010.cpp", "smoke/IO_test_013.cpp", ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -89,6 +90,7 @@ source_set("sources_other") { "full/IO_test_strncasecmp_l_001.cpp", "full/IO_test_strncasecmp_l_002.cpp", ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/IPC/BUILD.gn b/testsuites/unittest/IPC/BUILD.gn index 9152c359..ce22d5b4 100644 --- a/testsuites/unittest/IPC/BUILD.gn +++ b/testsuites/unittest/IPC/BUILD.gn @@ -44,6 +44,7 @@ sources_entry = [ source_set("sources_smoke") { sources = [ ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -53,6 +54,7 @@ source_set("sources_other") { "full/IPC_test_mkfifoat_001.cpp", "full/IPC_test_mkfifoat_002.cpp", ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/config.gni b/testsuites/unittest/config.gni index 866bc5ba..e7a74e34 100644 --- a/testsuites/unittest/config.gni +++ b/testsuites/unittest/config.gni @@ -28,9 +28,14 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. LOSCFG_USER_TEST_FOR_DOOR = true -LOSCFG_USER_TEST_FOR_ALL = true +LOSCFG_USER_TEST_FOR_ALL = false LOSCFG_USER_TEST_PRESSURE = false +# "default": depend on board_name +# "enable": those testsuites testing for SMP is enable +# "disable" those testsuites is disable +LOSCFG_USER_TEST_SMP = "default" + LOSCFG_USER_TEST_MISC = true LOSCFG_USER_TEST_DRIVERS_HID = true LOSCFG_USER_TEST_DRIVERS_STORAGE = true diff --git a/testsuites/unittest/drivers/hid/BUILD.gn b/testsuites/unittest/drivers/hid/BUILD.gn index 72704e5f..797a5a47 100644 --- a/testsuites/unittest/drivers/hid/BUILD.gn +++ b/testsuites/unittest/drivers/hid/BUILD.gn @@ -45,6 +45,7 @@ source_set("sources_smoke") { sources = [ "smoke/hid_test_001.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -52,6 +53,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/drivers/storage/BUILD.gn b/testsuites/unittest/drivers/storage/BUILD.gn index c17f4608..a5c62fa8 100644 --- a/testsuites/unittest/drivers/storage/BUILD.gn +++ b/testsuites/unittest/drivers/storage/BUILD.gn @@ -45,6 +45,7 @@ source_set("sources_smoke") { sources = [ "smoke/storage_test_001.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -52,6 +53,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/dynload/BUILD.gn b/testsuites/unittest/dynload/BUILD.gn index 6cedc00a..e336a08d 100644 --- a/testsuites/unittest/dynload/BUILD.gn +++ b/testsuites/unittest/dynload/BUILD.gn @@ -46,6 +46,7 @@ source_set("sources_smoke") { "smoke/dynload_test_002.cpp", "smoke/dynload_test_004.cpp", ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -53,6 +54,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/exc/BUILD.gn b/testsuites/unittest/exc/BUILD.gn index 7a24227f..6b68ae08 100644 --- a/testsuites/unittest/exc/BUILD.gn +++ b/testsuites/unittest/exc/BUILD.gn @@ -49,6 +49,7 @@ source_set("sources_smoke") { "smoke/it_test_exc_004.cpp", "smoke/it_test_exc_005.cpp", ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -57,6 +58,7 @@ source_set("sources_other") { sources = [ "full/it_test_fexecve_001.cpp", ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/fs/BUILD.gn b/testsuites/unittest/fs/BUILD.gn index 77dd1492..a0989e8d 100644 --- a/testsuites/unittest/fs/BUILD.gn +++ b/testsuites/unittest/fs/BUILD.gn @@ -60,6 +60,7 @@ source_set("sources_smoke") { "jffs/smoke/It_vfs_jffs_535.cpp", "jffs/smoke/It_vfs_jffs_Dac_001.cpp", ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -791,6 +792,7 @@ source_set("sources_other") { "jffs/full/It_vfs_jffs_807.cpp", "jffs/full/It_vfs_jffs_808.cpp", ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/fs/proc/BUILD.gn b/testsuites/unittest/fs/proc/BUILD.gn index 32c6d9b2..19b10971 100644 --- a/testsuites/unittest/fs/proc/BUILD.gn +++ b/testsuites/unittest/fs/proc/BUILD.gn @@ -44,6 +44,7 @@ sources_entry = [ source_set("sources_smoke") { sources = [ ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -57,6 +58,7 @@ source_set("sources_other") { "full/It_vfs_proc_005.cpp", "full/It_vfs_proc_006.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/fs/vfat2/BUILD.gn b/testsuites/unittest/fs/vfat2/BUILD.gn index 763ba1f7..dcff5eb1 100644 --- a/testsuites/unittest/fs/vfat2/BUILD.gn +++ b/testsuites/unittest/fs/vfat2/BUILD.gn @@ -46,6 +46,7 @@ source_set("sources_smoke") { sources = [ "smoke/It_vfs_fat_026.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -193,6 +194,7 @@ source_set("sources_other") { "full/It_vfs_fat_904.cpp", "full/It_vfs_fat_909.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/liteipc/BUILD.gn b/testsuites/unittest/liteipc/BUILD.gn index 07daaafd..942f38a0 100644 --- a/testsuites/unittest/liteipc/BUILD.gn +++ b/testsuites/unittest/liteipc/BUILD.gn @@ -47,6 +47,7 @@ source_set("sources_smoke") { "smoke/liteipc_test_001.cpp", "smoke/liteipc_test_002.cpp", ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -54,6 +55,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/mem/shm/BUILD.gn b/testsuites/unittest/mem/shm/BUILD.gn index c54afa84..8f9c95b3 100644 --- a/testsuites/unittest/mem/shm/BUILD.gn +++ b/testsuites/unittest/mem/shm/BUILD.gn @@ -58,6 +58,7 @@ source_set("sources_smoke") { "smoke/shm_test_013.cpp", "smoke/shm_test_014.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -65,6 +66,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/mem/vm/BUILD.gn b/testsuites/unittest/mem/vm/BUILD.gn index 1d15ab9c..3e69f057 100644 --- a/testsuites/unittest/mem/vm/BUILD.gn +++ b/testsuites/unittest/mem/vm/BUILD.gn @@ -59,6 +59,7 @@ source_set("sources_smoke") { "smoke/open_wmemstream_test_001.cpp", "smoke/user_copy_test_001.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -66,6 +67,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/misc/BUILD.gn b/testsuites/unittest/misc/BUILD.gn index c0d85a52..db465f49 100644 --- a/testsuites/unittest/misc/BUILD.gn +++ b/testsuites/unittest/misc/BUILD.gn @@ -50,6 +50,7 @@ source_set("sources_other") { "full/misc_test_012.cpp", "full/misc_test_013.cpp", ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -65,6 +66,7 @@ source_set("sources_smoke") { "smoke/misc_test_009.cpp", "smoke/misc_test_014.cpp", ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/net/netdb/BUILD.gn b/testsuites/unittest/net/netdb/BUILD.gn index f214a453..994652de 100644 --- a/testsuites/unittest/net/netdb/BUILD.gn +++ b/testsuites/unittest/net/netdb/BUILD.gn @@ -53,6 +53,7 @@ source_set("sources_smoke") { "smoke/net_netdb_test_001.cpp", "smoke/net_netdb_test_013.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -80,6 +81,7 @@ source_set("sources_other") { "full/net_netdb_test_021.cpp", "full/net_netdb_test_022.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/net/resolv/BUILD.gn b/testsuites/unittest/net/resolv/BUILD.gn index 8d7a1d9e..ef29c648 100644 --- a/testsuites/unittest/net/resolv/BUILD.gn +++ b/testsuites/unittest/net/resolv/BUILD.gn @@ -56,6 +56,7 @@ source_set("sources_smoke") { "smoke/net_resolv_test_006.cpp", "smoke/net_resolv_test_007.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -66,6 +67,7 @@ source_set("sources_other") { "full/net_resolv_test_005.cpp", "full/net_resolv_test_008.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/net/socket/BUILD.gn b/testsuites/unittest/net/socket/BUILD.gn index 5cb59553..e90c8bff 100644 --- a/testsuites/unittest/net/socket/BUILD.gn +++ b/testsuites/unittest/net/socket/BUILD.gn @@ -64,6 +64,7 @@ source_set("sources_smoke") { "smoke/net_socket_test_012.cpp", "smoke/net_socket_test_013.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -71,6 +72,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/posix/mem/BUILD.gn b/testsuites/unittest/posix/mem/BUILD.gn index 6f3252b9..1c0a1c5d 100644 --- a/testsuites/unittest/posix/mem/BUILD.gn +++ b/testsuites/unittest/posix/mem/BUILD.gn @@ -46,6 +46,7 @@ source_set("sources_smoke") { "smoke/It_posix_mem_001.cpp", "smoke/It_posix_mem_003.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -53,6 +54,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/posix/mqueue/BUILD.gn b/testsuites/unittest/posix/mqueue/BUILD.gn index ec5ab14c..9eb2886b 100644 --- a/testsuites/unittest/posix/mqueue/BUILD.gn +++ b/testsuites/unittest/posix/mqueue/BUILD.gn @@ -60,6 +60,7 @@ source_set("sources_smoke") { "smoke/It_posix_queue_208.cpp", "smoke/It_posix_queue_209.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -206,6 +207,7 @@ source_set("sources_other") { "full/It_posix_queue_203.cpp", "full/It_posix_queue_204.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/posix/pthread/BUILD.gn b/testsuites/unittest/posix/pthread/BUILD.gn index 9e0dea9e..4bb68454 100644 --- a/testsuites/unittest/posix/pthread/BUILD.gn +++ b/testsuites/unittest/posix/pthread/BUILD.gn @@ -59,6 +59,7 @@ source_set("sources_smoke") { "smoke/It_posix_pthread_022.cpp", "smoke/It_posix_pthread_203.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -171,6 +172,7 @@ source_set("sources_other") { "full/It_posix_pthread_240.cpp", "full/It_posix_pthread_241.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/process/mutex/BUILD.gn b/testsuites/unittest/process/mutex/BUILD.gn index 75ed44d0..24644cf8 100644 --- a/testsuites/unittest/process/mutex/BUILD.gn +++ b/testsuites/unittest/process/mutex/BUILD.gn @@ -69,6 +69,7 @@ source_set("sources_smoke") { "smoke/pthread_mutex_test_024.cpp", "smoke/pthread_mutex_test_025.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -76,6 +77,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/process/process/BUILD.gn b/testsuites/unittest/process/process/BUILD.gn index 5a7391c1..4ac01305 100644 --- a/testsuites/unittest/process/process/BUILD.gn +++ b/testsuites/unittest/process/process/BUILD.gn @@ -118,6 +118,7 @@ source_set("sources_smoke") { "smp/process_test_smp_007.cpp", "smp/process_test_smp_008.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -125,6 +126,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/process/pthread/BUILD.gn b/testsuites/unittest/process/pthread/BUILD.gn index 90fb5f75..1786f957 100644 --- a/testsuites/unittest/process/pthread/BUILD.gn +++ b/testsuites/unittest/process/pthread/BUILD.gn @@ -68,6 +68,7 @@ source_set("sources_smoke") { "smoke/pthread_test_018.cpp", "smoke/pthread_test_019.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -75,6 +76,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/process/rwlock/BUILD.gn b/testsuites/unittest/process/rwlock/BUILD.gn index aa69d086..a72c79cc 100644 --- a/testsuites/unittest/process/rwlock/BUILD.gn +++ b/testsuites/unittest/process/rwlock/BUILD.gn @@ -46,6 +46,7 @@ source_set("sources_smoke") { "smoke/pthread_rwlock_test_001.cpp", "smoke/pthread_rwlock_test_002.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -53,6 +54,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/process/spinlock/BUILD.gn b/testsuites/unittest/process/spinlock/BUILD.gn index 4d87c87c..2baca226 100644 --- a/testsuites/unittest/process/spinlock/BUILD.gn +++ b/testsuites/unittest/process/spinlock/BUILD.gn @@ -45,6 +45,7 @@ source_set("sources_smoke") { sources = [ "smoke/pthread_spinlock_test_001.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -52,6 +53,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/security/capability/BUILD.gn b/testsuites/unittest/security/capability/BUILD.gn index f1bfffb4..0ae9bd99 100644 --- a/testsuites/unittest/security/capability/BUILD.gn +++ b/testsuites/unittest/security/capability/BUILD.gn @@ -17,6 +17,7 @@ source_set("sources_smoke") { sources = [ "smoke/cap_test_001.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -24,6 +25,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/security/reugid/BUILD.gn b/testsuites/unittest/security/reugid/BUILD.gn index c5a76673..b15e5fe1 100644 --- a/testsuites/unittest/security/reugid/BUILD.gn +++ b/testsuites/unittest/security/reugid/BUILD.gn @@ -45,6 +45,7 @@ source_set("sources_smoke") { sources = [ "smoke/reugid_test_001.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -52,6 +53,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/security/vid/BUILD.gn b/testsuites/unittest/security/vid/BUILD.gn index f30f4767..88e86fb6 100644 --- a/testsuites/unittest/security/vid/BUILD.gn +++ b/testsuites/unittest/security/vid/BUILD.gn @@ -45,6 +45,7 @@ source_set("sources_smoke") { sources = [ "smoke/vid_test_001.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -52,6 +53,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/signal/BUILD.gn b/testsuites/unittest/signal/BUILD.gn index bb601ac3..3b17627d 100644 --- a/testsuites/unittest/signal/BUILD.gn +++ b/testsuites/unittest/signal/BUILD.gn @@ -107,6 +107,7 @@ source_set("sources_smoke") { "smoke/sigset_test_001.cpp", "smoke/sigset_test_002.cpp", ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -114,6 +115,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/sys/BUILD.gn b/testsuites/unittest/sys/BUILD.gn index 60c9f87a..3bcfb9fd 100644 --- a/testsuites/unittest/sys/BUILD.gn +++ b/testsuites/unittest/sys/BUILD.gn @@ -72,6 +72,7 @@ source_set("sources_smoke") { "smoke/sys_test_030.cpp", "smoke/sys_test_031.cpp", ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -79,6 +80,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/time/clock/BUILD.gn b/testsuites/unittest/time/clock/BUILD.gn index 5895738d..dcf57513 100644 --- a/testsuites/unittest/time/clock/BUILD.gn +++ b/testsuites/unittest/time/clock/BUILD.gn @@ -54,6 +54,7 @@ source_set("sources_smoke") { "smoke/clock_test_011.cpp", "smoke/clock_test_012.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -62,6 +63,7 @@ source_set("sources_other") { sources = [ "full/clock_test_010.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/time/timer/BUILD.gn b/testsuites/unittest/time/timer/BUILD.gn index 7bf06d32..8298988e 100644 --- a/testsuites/unittest/time/timer/BUILD.gn +++ b/testsuites/unittest/time/timer/BUILD.gn @@ -50,6 +50,7 @@ source_set("sources_smoke") { "smoke/timer_test_tzset_001.cpp", "smoke/timer_test_tzset_002.cpp", ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -57,6 +58,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "../..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } diff --git a/testsuites/unittest/util/BUILD.gn b/testsuites/unittest/util/BUILD.gn index 964f0bb2..f4ec69a6 100644 --- a/testsuites/unittest/util/BUILD.gn +++ b/testsuites/unittest/util/BUILD.gn @@ -55,6 +55,7 @@ source_set("sources_smoke") { "smoke/util_test_006.cpp", "smoke/util_test_007.cpp", ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } @@ -62,6 +63,7 @@ source_set("sources_smoke") { source_set("sources_other") { sources = [ ] + configs += [ "..:local_public_config" ] include_dirs = common_include_dirs deps = [ "//third_party/bounds_checking_function:libsec_shared" ] } From 8f8c038b217d5ba2518413bfc1ba857587d47442 Mon Sep 17 00:00:00 2001 From: kenneth <459864689@qq.com> Date: Tue, 18 May 2021 09:02:48 +0800 Subject: [PATCH 36/36] fix: fix function name OsSchedSetIdleTaskSchedParam correct function name OsSchedSetIdleTaskSchedParam close https://gitee.com/openharmony/kernel_liteos_a/issues/I3RQ6J --- kernel/base/core/los_task.c | 2 +- kernel/base/include/los_sched_pri.h | 2 +- kernel/base/sched/sched_sq/los_sched.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/base/core/los_task.c b/kernel/base/core/los_task.c index 8815a3e4..965bf045 100644 --- a/kernel/base/core/los_task.c +++ b/kernel/base/core/los_task.c @@ -240,7 +240,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsIdleTaskCreate(VOID) ret = LOS_TaskCreateOnly(idleTaskID, &taskInitParam); LosTaskCB *idleTask = OS_TCB_FROM_TID(*idleTaskID); idleTask->taskStatus |= OS_TASK_FLAG_SYSTEM_TASK; - OsSchedSetIdleTaskSchedPartam(idleTask); + OsSchedSetIdleTaskSchedParam(idleTask); return ret; } diff --git a/kernel/base/include/los_sched_pri.h b/kernel/base/include/los_sched_pri.h index 23141362..e5f1ea7c 100644 --- a/kernel/base/include/los_sched_pri.h +++ b/kernel/base/include/los_sched_pri.h @@ -152,7 +152,7 @@ STATIC INLINE VOID OsCpuSchedUnlock(Percpu *cpu, UINT32 intSave) extern UINT32 OsSchedSetTickTimerType(UINT32 timerType); -extern VOID OsSchedSetIdleTaskSchedPartam(LosTaskCB *idleTask); +extern VOID OsSchedSetIdleTaskSchedParam(LosTaskCB *idleTask); extern UINT32 OsSchedSwtmrScanRegister(SchedScan func); diff --git a/kernel/base/sched/sched_sq/los_sched.c b/kernel/base/sched/sched_sq/los_sched.c index 0e36722e..5ab81c4b 100644 --- a/kernel/base/sched/sched_sq/los_sched.c +++ b/kernel/base/sched/sched_sq/los_sched.c @@ -753,7 +753,7 @@ VOID OsSchedTick(VOID) } } -VOID OsSchedSetIdleTaskSchedPartam(LosTaskCB *idleTask) +VOID OsSchedSetIdleTaskSchedParam(LosTaskCB *idleTask) { idleTask->policy = LOS_SCHED_IDLE; idleTask->initTimeSlice = OS_SCHED_FIFO_TIMEOUT;