nuttx-apps/testing
chenrun1 09bb3b5853 apps:move test tools to testing.
1.memstress
2.ramtest
3.ramspeed
4.cachespeed

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-10-26 13:17:28 +02:00
..
arch_libc testing: Swith up_perf_xxx to perf_xxx 2023-10-23 11:52:07 -03:00
atomic add test atomic 2023-09-05 22:10:48 +08:00
batterydump add batterydump tool for dump the battery info 2023-08-10 20:44:03 +08:00
cachespeed apps:move test tools to testing. 2023-10-26 13:17:28 +02:00
cmocka support xml report and generate tool 2023-09-21 12:14:12 +08:00
cpuload cpuload: add cpulad test case 2023-01-26 08:11:04 +02:00
crypto testing/crypto: fix aescbc crash when update iv 2023-09-07 13:15:35 +08:00
cxxtest apps/testing/cxxtest/Makefile: fix nxstyle 2023-03-09 01:43:09 +08:00
drivertest Fix drivertest_watchdog.c:284:33: error: storage size of 'reset_cause' isn't known 2023-09-26 00:45:16 +03:00
fatutf8 solve CI compilation error problem 2023-09-06 19:21:19 +03:00
fdsantest add fdsan unit test 2023-05-16 22:42:23 -07:00
fmemopen testing: add fmemopen function test tool 2023-10-25 00:27:14 +08:00
fopencookie testing: add test application for fopencookie utility 2023-10-10 01:03:42 +08:00
fstest testing/fstest: add number of correct/incorrect tests 2023-10-18 16:52:24 -04:00
getprime Include missing headers throughout the repository 2023-03-07 09:58:13 +08:00
iozone Don't download tarballs if a local git repo found 2022-08-28 17:20:47 +08:00
irtest system/readline: correct the readline(3) prototype 2023-10-16 22:04:18 +08:00
ltp testing/ltp: add config.h file 2023-09-19 11:13:44 +08:00
memstress apps:move test tools to testing. 2023-10-26 13:17:28 +02:00
memtester memtester:Modify the misnaming in Kconfig 2023-10-23 19:25:29 -03:00
mm testing/mm: use unified name for macros 2023-09-12 22:09:43 +08:00
monkey testing/monkey: add file permission settings 2023-06-29 20:08:05 +08:00
mtd_config_fs mtd_config_fs: Default select MTD_CONFIG_NAMED config 2023-08-16 22:06:28 +08:00
nist-sts add superpi fold and nist-sts fold to gitignore 2023-09-12 10:08:35 +08:00
nxffs cmake/apps: add more applications into cmake support 2023-07-13 19:00:18 +02:00
osperf testing: Swith up_perf_xxx to perf_xxx 2023-10-23 11:52:07 -03:00
ostest ostest: Add smp function call test case 2023-10-18 22:20:48 +08:00
ramspeed apps:move test tools to testing. 2023-10-26 13:17:28 +02:00
ramtest apps:move test tools to testing. 2023-10-26 13:17:28 +02:00
scanftest testing/scanftest: add number of correct/incorrect tests 2023-10-18 16:52:24 -04:00
sd_stress testing/sd_stress: Port sdstress testing utility from PX4-Autopilot. 2023-10-25 15:41:27 +08:00
sensortest Change all sizeof(arr)/sizeof(arr[0]) to nitems 2023-08-17 22:51:51 +03:00
setest Added tools for NXP SE05x (secure element) 2023-08-22 10:12:31 +08:00
smart zmodem: Move crc16.h and crc32.h from host to host/nuttx 2022-08-13 13:28:30 +03:00
smart_test Replace all sprintf with snprintf 2023-05-08 21:35:16 +03:00
smp Typo fixes. 2022-01-06 10:30:41 +08:00
superpi add superpi fold and nist-sts fold to gitignore 2023-09-12 10:08:35 +08:00
uclibcxx_test uclibcxx_test/Make.defs Fix mistakes in comments 2023-03-09 01:43:09 +08:00
unity testing/unity: adjust unity download pack to 'Unity' 2023-08-10 03:33:12 +08:00
.gitignore Ensure all source code end with one and only one newline 2020-02-09 08:14:49 -06:00
CMakeLists.txt add initial cmake build system 2023-07-08 13:52:02 +08:00
Make.defs Makefiles: Mateusz Szafoni: update licenses to Apache 2021-06-07 21:35:33 -05:00
Makefile Makefiles: Mateusz Szafoni: update licenses to Apache 2021-06-07 21:35:33 -05:00
README.md Rewritten READMEs to Markdown 2020-07-25 01:01:51 -07:00

Testing

The apps/testing directory is used to build NuttX-specific tests and to include external testing frameworks.

There is overlap between what you will find in apps/examples and apps/testing in the sense that there are also tests in apps/examples as well. Those tests, however, can also be used to illustrate usage of a NuttX feature. Most of the tests in apps/testing, on the other hand, are pure tests with little value as usage examples.

cxxtest

This is a test of the C++ standard library. At present a port of the uClibc++ C++ library is available. Due to licensing issues, the uClibc++ C++ library is not included in the NuttX source tree by default, but must be installed (see the README.txt file in the uClibc++ download package for installation).

The uClibc++ test includes simple test of:

  • iostreams,
  • STL,
  • RTTI, and
  • Exceptions

Example Configuration Options

  • CONFIG_TESTING_CXXTEST=y Eanbles the example

Other Required Configuration Settings

Other NuttX setting that are required include:

  • CONFIG_HAVE_CXX=y
  • CONFIG_HAVE_CXXINITIALIZE=y
  • CONFIG_UCLIBCXX=y or CONFIG_LIBCXX=y

Additional uClibc++/libcxx settings may be required in your build environment.

fstest

This is a generic file system test that derives from testing/nxffs. It was created to test the tmpfs file system, but should work with any file system provided that all initialization has already been performed prior to starting the test.

This test a a general test for any file system, but includes some specific hooks for the SPIFFS file system.

  • CONFIG_TESTING_FSTEST Enable the file system example.
  • CONFIG_TESTING_FSTEST_MAXNAME Determines the maximum size of names used in the filesystem.
  • CONFIG_TESTING_FSTEST_MAXFILE Determines the maximum size of a file.
  • CONFIG_TESTING_FSTEST_MAXIO Max I/O, default 347.
  • CONFIG_TESTING_FSTEST_MAXOPEN Max open files.
  • CONFIG_TESTING_FSTEST_MOUNTPT Path where the file system is mounted.
  • CONFIG_TESTING_FSTEST_NLOOPS Number of test loops. default 100.
  • CONFIG_TESTING_FSTEST_VERBOSE Verbose output.

mm

This is a simple test of the memory manager.

nxffs

This is a test of the NuttX NXFFS FLASH file system. This is an NXFFS stress test and beats on the file system very hard. It should only be used in a simulation environment! Putting this NXFFS test on real hardware will most likely destroy your FLASH. You have been warned.

ostest

This is the NuttX qualification suite. It attempts to exercise a broad set of OS functionality. Its coverage is not very extensive as of this writing, but it is used to qualify each NuttX release.

The behavior of the ostest can be modified with the following settings in the boards/<arch>/<chip>/<board>/configs/<config>/defconfig file:

  • CONFIG_NSH_BUILTIN_APPS Build the OS test example as an NSH built-in application.

  • CONFIG_TESTING_OSTEST_LOOPS Used to control the number of executions of the test. If undefined, the test executes one time. If defined to be zero, the test runs forever.

  • CONFIG_TESTING_OSTEST_STACKSIZE Used to create the ostest task. Default is 8192.

  • CONFIG_TESTING_OSTEST_NBARRIER_THREADS Specifies the number of threads to create in the barrier test. The default is 8 but a smaller number may be needed on systems without sufficient memory to start so many threads.

  • CONFIG_TESTING_OSTEST_RR_RANGE During round-robin scheduling test two threads are created. Each of the threads searches for prime numbers in the configurable range, doing that configurable number of times. This value specifies the end of search range and together with number of runs allows to configure the length of this test it should last at least a few tens of seconds. Allowed values [1; 32767], default 10000.

  • CONFIG_TESTING_OSTEST_RR_RUNS During round-robin scheduling test two threads are created. Each of the threads searches for prime numbers in the configurable range, doing that configurable number of times.

smart SMART File System

This is a test of the SMART file system that derives from testing/nxffs.

  • CONFIG_TESTING_SMART Enable the SMART file system example.

  • CONFIG_TESTING_SMART_ARCHINIT The default is to use the RAM MTD device at drivers/mtd/rammtd.c. But an architecture-specific MTD driver can be used instead by defining CONFIG_TESTING_SMART_ARCHINIT. In this case, the initialization logic will call smart_archinitialize() to obtain the MTD driver instance.

  • CONFIG_TESTING_SMART_NEBLOCKS When CONFIG_TESTING_SMART_ARCHINIT is not defined, this test will use the RAM MTD device at drivers/mtd/rammtd.c to simulate FLASH. In this case, this value must be provided to give the number of erase blocks in MTD RAM device. The size of the allocated RAM drive will be: CONFIG_RAMMTD_ERASESIZE * CONFIG_TESTING_SMART_NEBLOCKS.

  • CONFIG_TESTING_SMART_MAXNAME Determines the maximum size of names used in the filesystem.

  • CONFIG_TESTING_SMART_MAXFILE Determines the maximum size of a file.

  • CONFIG_TESTING_SMART_MAXIO Max I/O, default 347.

  • CONFIG_TESTING_SMART_MAXOPEN Max open files.

  • CONFIG_TESTING_SMART_MOUNTPT SMART mountpoint.

  • CONFIG_TESTING_SMART_NLOOPS Number of test loops. default 100.

  • CONFIG_TESTING_SMART_VERBOSE Verbose output.

smart_test SMART File System

Performs a file-based test on a SMART (or any) filesystem. Validates seek, append and seek-with-write operations.

  • CONFIG_TESTING_SMART_TEST=y
Author: Ken Pettit
  Date: April 24, 2013

Performs a file-based test on a SMART (or any) filesystem. Validates seek, append and seek-with-write operations.

Usage:

  flash_test mtdblock_device

Additional options:

  --force                     to replace existing installation

smp

This is a simple test for SMP functionality. It is basically just the pthread barrier test with some custom instrumentation.

unity

Unity is a unit testing framework for C developed by ThrowTheSwitch.org:

http://www.throwtheswitch.org/unity