mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-06 05:43:01 +00:00
test:add mutex socket syscall directory
some test cases have been added that cover the functionality of fs, mutex, pthread, socket, and syscall Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
This commit is contained in:
parent
53db7817d9
commit
1e199e4d4f
160 changed files with 14162 additions and 1698 deletions
|
|
@ -3,28 +3,26 @@
|
|||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
* this work for additional information regarding copyright ownership.
|
||||
*The ASF licenses this file to you under the Apache License, Version 2.0
|
||||
*(the "License"); you may not use this file except in compliance with
|
||||
*the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
*WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
*implied. See the License for the specific language governing
|
||||
*permissions and limitations under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
#ifndef PTHREAD_TEST_H
|
||||
#define PTHREAD_TEST_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef PTHREAD_TEST_H
|
||||
#define PTHREAD_TEST_H
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <errno.h>
|
||||
#include <syslog.h>
|
||||
|
|
@ -59,7 +57,10 @@ typedef unsigned long UINTPTR;
|
|||
#define THREAD_NUM 3
|
||||
#define PTHREAD_TIMEOUT (THREAD_NUM * 2)
|
||||
#define PTHREAD_INTHREAD_TEST 0 /* Control going to or is already for Thread */
|
||||
#define PTHREAD_INMAIN_TEST 1 /* Control going to or is already for Main */
|
||||
|
||||
/* Control going to or is already for Main */
|
||||
|
||||
#define PTHREAD_INMAIN_TEST 1
|
||||
#define INVALID_PSHARED_VALUE (-100)
|
||||
#define NUM_OF_CONDATTR 10
|
||||
#define RUNTIME 5
|
||||
|
|
@ -75,52 +76,63 @@ typedef unsigned long UINTPTR;
|
|||
|
||||
/* We are testing conformance to IEEE Std 1003.1, 2003 Edition */
|
||||
|
||||
#ifndef _POSIX_C_SOURCE
|
||||
#define _POSIX_C_SOURCE 200112L
|
||||
#endif
|
||||
|
||||
#define PRIORITY_OTHER (-1)
|
||||
#define PRIORITY_FIFO 20
|
||||
#define PRIORITY_RR 20
|
||||
#define LOSCFG_BASE_CORE_TSK_CONFIG 1024
|
||||
|
||||
extern UINT32 g_test_pthread_count;
|
||||
extern UINT32 g_test_pthread_task_max_num;
|
||||
extern UINT32 g_testpthreadcount;
|
||||
extern UINT32 g_testpthreadtaskmaxnum;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
pthread_t test_pthread_self(void);
|
||||
pthread_t testpthreadself(void);
|
||||
|
||||
/* test case function */
|
||||
|
||||
/* cases/posix_pthread_test_003.c *******************************************/
|
||||
/* cases/posix_pthread_test_003.c
|
||||
* ************************************************/
|
||||
|
||||
void test_nuttx_pthread_test03(FAR void **state);
|
||||
|
||||
/* cases/posix_pthread_test_004.c *******************************************/
|
||||
/* cases/posix_pthread_test_004.c
|
||||
* ************************************************/
|
||||
|
||||
void test_nuttx_pthread_test04(FAR void **state);
|
||||
|
||||
/* cases/posix_pthread_test_005.c *******************************************/
|
||||
/* cases/posix_pthread_test_005.c
|
||||
* ************************************************/
|
||||
|
||||
void test_nuttx_pthread_test05(FAR void **state);
|
||||
|
||||
/* cases/posix_pthread_test_006.c *******************************************/
|
||||
/* cases/posix_pthread_test_006.c
|
||||
* ************************************************/
|
||||
|
||||
void test_nuttx_pthread_test06(FAR void **state);
|
||||
|
||||
/* cases/posix_pthread_test_009.c *******************************************/
|
||||
/* cases/posix_pthread_test_009.c
|
||||
* ************************************************/
|
||||
|
||||
void test_nuttx_pthread_test09(FAR void **state);
|
||||
|
||||
/* cases/posix_pthread_test_018.c *******************************************/
|
||||
/* cases/posix_pthread_test_018.c
|
||||
* ************************************************/
|
||||
|
||||
void test_nuttx_pthread_test18(FAR void **state);
|
||||
|
||||
/* cases/posix_pthread_test_019.c *******************************************/
|
||||
/* cases/posix_pthread_test_019.c
|
||||
* ************************************************/
|
||||
|
||||
void test_nuttx_pthread_test19(FAR void **state);
|
||||
|
||||
/* cases/posix_pthread_test_021.c *******************************************/
|
||||
/* cases/posix_pthread_test_021.c
|
||||
* ************************************************/
|
||||
|
||||
void test_nuttx_pthread_test21(FAR void **state);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue