Commit Graph

438 Commits

Author SHA1 Message Date
Zhe Weng
87838bb62c ostest/wqueue: Check return value for pthread ops.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-08-22 13:55:03 +08:00
Andre Heinemans
8757c6934c Added tools for NXP SE05x (secure element) 2023-08-22 10:12:31 +08:00
Xiang Xiao
6716f15d7b testing: Check CONFIG_TLS_NELEM is defined before using it
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-21 15:08:17 +03:00
Xiang Xiao
7251645685 Fix some coding style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-17 22:51:51 +03:00
Xiang Xiao
856416540c Remove the definition of MIN/MAX
use the macro in sys/params.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-17 22:51:51 +03:00
Xiang Xiao
054cf3b1cb Change all sizeof(arr)/sizeof(arr[0]) to nitems
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-17 22:51:51 +03:00
makejian
c25f5e1955 crypto: fix formatting issues in commit #1932
(1) add 'FAR' in mbedtls_hardware_poll
(2) fix indentation issues in hash testcase
Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-17 14:31:41 +08:00
Shoukui Zhang
9cf473c88c mtd_config_fs: Default select MTD_CONFIG_NAMED config
Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2023-08-16 22:06:28 +08:00
yangjiao
37ac7f923a Update cmocka_main.c to support following functions:
1. list all the testcases with "--list";
2. run some testcases with "--test";
3. show cmocka help message;
4. skip some testcases with "--skip";

Signed-off-by: yangjiao <yangjiao@xiaomi.com>
2023-08-16 01:00:36 +08:00
yangjiao
4b521051d3 cmocka/Kconfig: add the depends on item "LIBC_REGEX".
The "regex" library will be used in cmocka test, so add the dependency relationship for this config.

Signed-off-by: yangjiao <yangjiao@xiaomi.com>
2023-08-16 01:00:36 +08:00
yangjiao
f0f94a1235 testing/cmocka:add a patch.
cmocka modification upload Nuttx community preparation: upload a patch with recent changes for cmocka source code.

Signed-off-by: yangjiao <yangjiao@xiaomi.com>
2023-08-16 01:00:36 +08:00
liuhongchao
75f04dd775 drivertest:Add touch panel test case.
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2023-08-14 09:05:52 +08:00
anjiahao
34f71ec25b fstest:fix build break
fstest_main.c:340:47: note: expected ‘struct fstest_ctx_s *’ but argument is of type ‘fsblkcnt_t’ {aka ‘long long unsigned int’}
  340 | static int fstest_gc(FAR struct fstest_ctx_s *ctx, size_t nbytes)
      |                          ~~~~~~~~~~~~~~~~~~~~~^~~
fstest_main.c:1168:13: error: too few arguments to function ‘fstest_gc’
 1168 |       ret = fstest_gc(buf.f_bfree);
      |             ^~~~~~~~~
fstest_main.c:340:12: note: declared here
  340 | static int fstest_gc(FAR struct fstest_ctx_s *ctx, size_t nbytes)
      |            ^~~

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-08-11 21:04:44 +08:00
xucheng5
6196e03337 testing/drivertest : fix build error
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-08-11 20:15:28 +08:00
zhangchao53
ba19e5b92b porting superPi to vela,add makefile
Signed-off-by: zhangchao53 <zhangchao53@xiaomi.com>
2023-08-11 18:25:07 +08:00
makejian
fcbf7cc1aa testing/crypto: add md5/sha1/sha256/sha512 testcases
add hash test cases to test the support for the hash algorithm in crypto device
Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-11 18:13:11 +08:00
zhangchao53
f1154b5be2 Memory leaks can be checked using cmocka
Signed-off-by: zhangchao53 <zhangchao53@xiaomi.com>
2023-08-11 18:09:40 +08:00
xucheng5
c7955e5faf drivertest/adc : support cmocka_driver_adc
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
2023-08-11 13:51:30 +08:00
Xiang Xiao
d420036cbc testing/drivertest: Fix typo error in drivertest_uart.c
Made by:
commit 5659906fdfdac0a363aecb329c39c936324dcc55
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Fri Mar 24 12:02:04 2023 -0600

    Changes to apps needed by nutts PR 8885

    needby:965551

    ostest contains some logic that depends on internal implementation of signal sets and ostest must be updated to match those changes.

    There is no particular impact from this PR.  This PR is the result of impact from nuttx 8885.

    Tested with nuttx 8885

    Change-Id: I2550888ee29aadcfcf8a98bfe5690920ee2b17d1

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-11 13:50:55 +08:00
dulibo1
3c674fb4d8 add test case for regulator
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-11 00:45:16 +08:00
dulibo1
6534f3d87c add batterydump tool for dump the battery info
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-10 20:44:03 +08:00
yangguangcai
5c6ffe1a4d drivertest:fix timer testcase
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-10 20:41:05 +08:00
yangguangcai
1dc7845c06 drivertest/timer:test interface getstatus.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-10 20:41:05 +08:00
yangguangcai
ffebcfbb9f testing/drivertest:fix variable may be negative
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-10 20:41:05 +08:00
rongyichang
9abb0a2592 apps/testing: support alignment for lcd driver test
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-08-10 20:36:36 +08:00
rongyichang
6d11e1e7e2 drivertest/lcd: fix draw area calc error in LCD rect
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-08-10 20:36:36 +08:00
rongyichang
694fbd2f77 apps/testing : correct the dependency option of fb driver test
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-08-10 20:36:36 +08:00
rongyichang
49f81d387a apps/testing/driver_test:fix warning
drivertest_lcd.c:234:12: warning: assignment to 'uint16_t *' {aka 'short unsigned int *'} from incompatible pointer type 'uint8_t *' {aka 'unsigned char *'} [-Wincompatible-pointer-types]

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-08-10 20:36:36 +08:00
rongyichang
b2d3fb726d testing/drivertest:add testcase for LCD driver
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-08-10 20:36:36 +08:00
rongyichang
7c18361faf testing/drivertest:add testcase for framebuffer driver
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-08-10 20:36:36 +08:00
yangguangcai
3717ce2094 watchdog:input watchdog deviation.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-10 20:34:47 +08:00
yangguangcai
16872c582c test/watchdog:call board_ioctl from board_reset_cause.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-10 20:34:47 +08:00
yangguangcai
d4b202ec7e test/watchdog:test interface getstatus.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-10 20:34:47 +08:00
yangguangcai
76dff2b924 watchdog:test watchdog not depend on fs.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-10 20:34:47 +08:00
xuxin19
8e71885ee5 Enhance Makefile to avoid "Argument list too long"
define a macro for split long variable and redefine variable in batch.
see details in `apps/Make.defs` `SPLITVARIABLE`.
replace the variable reference that caused the error.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-08-10 11:16:07 +08:00
jinxudong
6bea926ef2 sensor: add force sensor
A sensor of this type measures the force on it, and additionally
compares the force with one or more specified thresholds. The sensor
can output the force value directly. Moreover, it's usually applied
as a press key. In that case, when it detects a force greater than
some given threshold, a corresponding event is reported.

Signed-off-by: jinxudong <jinxudong@xiaomi.com>
2023-08-10 03:33:22 +08:00
haopengxiang
aa38c44b3b testing/unity: adjust unity download pack to 'Unity'
Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-08-10 03:33:12 +08:00
jinxiuxu
4f7abe0231 apps/testing/drivertest:add audio drivertest
Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2023-08-10 00:51:07 +08:00
yangguangcai
41388daf74 rtc test:add delay after set time.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-09 23:47:09 +08:00
yangguangcai
768ce91296 drivertest/rtc:input rtc alarm deviation.
Some vendor hardware precision cannot meet the requirements,
and the deviation needs to be input at this time.

Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-09 23:47:09 +08:00
yangguangcai
0c8579151f drivertest/rtc:fix rtc testcase.
deviation from (-10,0) to (-10,10)

Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-09 23:47:09 +08:00
yangguangcai
cd802f6a8f drivertest/rtc:add test case.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-09 23:47:09 +08:00
yangguangcai
89ad9c6527 test/drivertest:fix rtc settime incorrect.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-09 23:47:09 +08:00
makejian
6cd890e843 testing/crypto: add configs of crypto testing cases
crypto testing cases managed by respective config

Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-09 21:37:36 +08:00
yangguangcai
902a1d7ece test/oneshot:fix oneshot testcase.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-09 18:21:55 +08:00
yangguangcai
667d03f184 test/oneshot:fix compile warning.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-09 18:21:55 +08:00
yangguangcai
ed87aa242d drivertest:fix compile error.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-09 18:21:55 +08:00
yangguangcai
2782ed0721 test/drivertest:add oneshot test and posix timer test.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2023-08-09 18:21:55 +08:00
cuiziwei
4d6527ec8c testing/drivertest: add watch dog irq test
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-08-09 17:55:36 +08:00
cuiziwei
6c3e2f0aa0 drivertest_rtc:fix RTC_HAVE_SET_TIME is false.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-08-09 17:11:13 +08:00
hujun5
79a111fc1a ostest/mutex: mut need to be destroyed
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-08-09 15:07:25 +08:00
yinshengkai
d0f790e166 testing: add os performance measurement
Measure the performance of core system functions
such as thread switching and the time required for semaphore execution

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-09 14:59:41 +08:00
Petro Karashchenko
3648c0cc5c testing/ostest: call up_idle() only in case of CONFIG_SIM_WALLTIME_SLEEP=y
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-08-07 18:58:46 -07:00
Petro Karashchenko
6acf345296 testing/ostest: add test case for task priority change with locked scheduler
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-08-07 18:58:46 -07:00
Petro Karashchenko
e30a0602a0 testing/ostest: add missing section comments
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-08-07 18:58:46 -07:00
makejian
ff6df40e3c fix -Wmaybe-uninitialized compile warning in nist-sts
fix compile warning as following:
nist-sts/sts/src/cusum.c:15:23: warning: 'zerv' may be used uninitialized in this function[-Werror=maybe-uninitialized]

Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-03 22:43:59 -07:00
yanghuatao
89a1255dc2 ltp: follow linux on pthread_rwlock_unlock
Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2023-08-03 22:43:50 -07:00
yanghuatao
1309990d6c ltp/makefile: nuttx on github download ltp code failed fix
Fix github download ltp code error:
Cloning into 'ltp'...
*** Please tell me who you are.
Run
  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'root@33ba2a4a6fc5.(none)')

Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2023-08-03 10:54:44 -07:00
makejian
e109319a2e fix memory leak in aesctr test case
Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-03 10:54:25 -07:00
guoshichao
bc3fada2ce apps/testing/ltp: conditional build the testcases based on defconfig
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-08-03 07:30:28 -07:00
guoshichao
bc8d77fdbd apps/testing/ltp: filter the testcases based on config
control the testcases build rules based on the config that current
enabled

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-08-03 07:30:28 -07:00
makejian
4b0a3d92ff Porting NIST-Statistical-Test-Suite in nuttx to test quality of rng
(1)add nist-sts init nuttx
(2)Fix possible memory bug
(3)Fix double free memory
Signed-off-by: makejian <makejian@xiaomi.com>
2023-08-01 10:06:45 -07:00
guanyi
f50d2cdbe3 fix ostest sigprocmask testcase
problem: ostest may fail at procmask test, because signals:sigkill/sigstop should not be added in signal mask
solution: skip checking whether sigkill/sigstop are in signal mask

Signed-off-by: guanyi <guanyi@xiaomi.com>
2023-08-01 21:02:52 +09:00
hujun5
13d3b3d26c ostest/rmutex: mutex need to be destroyed
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-07-26 08:33:26 -07:00
hujun5
7daeca62b0 testing/mm: add maxsize parameter
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-07-26 08:33:09 -07:00
Xiang Xiao
d46dce5819 testing/ostest: Remove the unnecessary defined(CONFIG_PTHREAD_CLEANUP_STACKSIZE)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-25 09:51:09 +08:00
chenrun1
4bc06d9a4b drivertest_block:New test items about cache and memory alignment
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-17 23:15:32 +08:00
chenrun1
9768cfab79 drivertest_block:Give redundant space for bad blocks in nand flash
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-17 23:15:32 +08:00
chenrun1
3cb5d475ae drivertest_block:Test the availability of each sector of the block.
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-17 23:15:32 +08:00
Xiang Xiao
ff276e422f ostest: Skip test_dev_null when CONFIG_DEV_NULL isn't enabled
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-17 16:28:02 +09:00
chao an
b18cf9aab3 testing/ostest: fix Compiler Warning (level 1) C4716: 'function' must return a value
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4716?view=msvc-170
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-14 01:28:25 +08:00
chao an
7cfcb49213 cmake/apps: add more applications into cmake support
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-13 19:00:18 +02:00
chao an
4d79a5cbaf add initial cmake build system
Co-authored-by: Daniel Agar <daniel@agar.ca>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:52:02 +08:00
pengyiqiang
cb9cba8d3f testing/monkey: add file permission settings
Add missing file permission setting, fix file read failure.

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-06-29 20:08:05 +08:00
Gregory Nutt
6d9259f334 Add small test of pthread_exit()/pthread_self() on main thread. 2023-06-29 13:53:02 +08:00
simbit18
83bddd86c5 Fix Kconfig style
Remove TABs from Kconfig files
Add comments
2023-06-21 00:36:52 +08:00
Xiang Xiao
e89409cfe6 Remove the unnecessary cast from pid_t to int
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-06-19 09:05:54 +02:00
yanghuatao
cb179e4ed2 testing/ostest: adjust PTHREAD_CLEANUP_STACKSIZE with nuttx project
in project nuttx "remove PTHREAD_CLEANUP, and use PTHREAD_CLEANUP_STACKSIZE to enable or disable interfaces pthread_cleanup_push() and pthread_cleanup_pop()", project apps also needes adjust code.

Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
2023-06-14 08:49:13 +02:00
Petro Karashchenko
aed0e2873e apps: fix style issues in code
Add missing FAR and CODE to pointers
Remove FAR for non-pointer variables
Remove extra spaces and align the parameters
Add do {} while(0) wrapper in macro
Use nitems to calculate number of elements in arrays

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-06-11 18:47:50 +08:00
Lucas Saavedra Vaz
9cc710e954 testing/nxdiag: Move to "system" and improve info generated
Move the application to the "System" category. Improve host OS info by using platform.uname() and get current config file using CONFIG_BASE_DEFCONFIG
2023-05-27 13:48:32 +08:00
Lucas Saavedra Vaz
eb36c15171 testing: Add application to gather debug information (nxdiag)
This commit aims to add an application to gather debug information about the host and target systems. It can also perform some diagnostic checks on the host and target systems.
This will facilitate the process of users seeking assistance for solving some problem.

Current capabilities:
- Get host OS version;
- Get host python modules;
- Get host system packages;
- Get host PATH;
- Get host compilation flags for the target;
- Get target NuttX configuration;
- Get target OS version, hostname, build and architecture;
- Capable of adding custom, vendor specific, information. Currently gathering only Espressif related info:
  - Get the bootloader version of detected image files;
  - Get the version of different toolchains used by Espressif chips;
  - Get Esptool version.
2023-05-25 11:04:39 -03:00
hujun5
97a38b2b1f ostest/cond_test: cond and mutex need to be destroyed
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-05-23 13:11:07 +08:00
Xiang Xiao
7032c72f2f Indent the define statement by two spaces
follow the code style convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-21 07:39:53 +03:00
hujun5
db767b6f45 ostest/sighand_test: sem need to be destroyed
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-05-20 12:42:35 +08:00
simbit18
d0cb5afc2f testing/cmocka/Kconfig: Fix indentation
Remove spaces from Kconfig
2023-05-19 01:00:38 +08:00
hujun5
aea9b50dc8 add fdsan unit test
Due to the current Nuttx not supporting death test, we removed death test from the original test cases of Android

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-05-16 22:42:23 -07:00
hujun5
70a4010635 ostest: sem need to be destroyed
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-05-16 11:59:08 +08:00
hujun5
dd20ae28cb ostest: rwlock need to be destroy
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-05-12 15:32:18 -03:00
Xiang Xiao
73701cd7cd Replace all strncpy with strlcpy
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 21:35:16 +03:00
Xiang Xiao
7c37421266 Replace all sprintf with snprintf
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 21:35:16 +03:00
Xiang Xiao
134b8b538f Replace all strcat with strlcat
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 21:35:16 +03:00
hujun5
02efb15b57 ostest:fix signal test fail
If the same signal is quickly repeated multiple times, the signal may be ignored.
In SMP since we cannot control thread scheduling to ensure timely signal processing,
it is best to use semaphores to wait for signal processing to complete, which can also shorten the ostest time

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-05-06 23:37:07 +03:00
simbit18
bfd4cbc743 apps/testing/ostest/roundrobin.c: Fix nxstyle errors
error: Long line found
2023-04-29 14:54:40 +08:00
hujun5
5b2a89e174 ostest: fix smp ostest fail
In SMP we need improve thread waiting strategy

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-04-24 09:55:54 +02:00
hujun5
f0f98c3d73 ostest: fix smp ostest fail
In SMP we need improve thread waiting strategy

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-04-24 09:55:54 +02:00
Petro Karashchenko
4159fa197b testing/ostest: make sure that pthread_rwlock timeout test is executed properly
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-17 15:54:32 +02:00
Petro Karashchenko
2655f80dd7 testing/ostest: fix tasks priority assignment in nested signal test
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-17 15:54:32 +02:00
Xiang Xiao
aa99d267b7 Change the private default signal number to 32
and remove the unused private signal number macro

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-05 03:38:24 -07:00
Xiang Xiao
417b87a0a0 testing/ostest: Remove the unreal used SIG_WAITCANCEL
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-05 03:38:24 -07:00
Xiang Xiao
3ac86cc6f1 testing/ostest: Define the private used signal to SIGRTMIN
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-05 03:38:24 -07:00