Commit Graph

119 Commits

Author SHA1 Message Date
Gregory Nutt
dd7c3bfa53 apps/testing/ostest: Add test for required argument format
The Linux man page requires that the getopt_long() and getopt_long_only() functions accept arguments to options in a form like:

    --option=argument

This PR adds a test that missing functionality that was recently added to NuttX.

This change also fixes an error in string comparison that was working before only because of the way that strings are stored by in linker ELF.  The address of the strings were being compared, not the value of the string.

This change effects only the getopt() tests of the OS test.

Tested on a simulator NSH configuration and used to verify the NuttX change.
2021-04-04 14:14:21 -05:00
Gregory Nutt
6a679043e6 testing/ostest: More improvements to getopt() testing/ostest
Fix optind range checking.  optind may index through argc (to the NULL argv entry) on the last option since optind is required to always point to the next command line argument.

Add two more test cases were the final thing on the command line is an invalid long option.

Fix a check that used an older, obsoleted hard-coded value that was not updated.

This should have no impact other than to the getopt() test cases of the OS test.

Tested on the simulator using a modified NSH configuration.
2021-04-04 11:45:24 -05:00
Gregory Nutt
02ef45980b OS Test: Minor improvement to the getopt() test
Add logic to assure that the getopt() functions parse exactly the correct number of parameters.  Previously if the test terminated early, the error would be undetected.  Also, prevents indexing past the end of the results array.

Fixes a coding error that was not causing a test failure.

Add some minimal level of testing for invalid options (this found a good bug in getopt_long()).

Affects only the getopt() test cases of the OS test.

Verified using an NSH simulator configuration set up to add apps/testing/ostest as a built-in command.
2021-04-04 07:15:35 -05:00
Gregory Nutt
99138f6b39 testing/ostest: Add a test of the getopt() family of interfaces.
This new test was used to verify the new implementations of getopt_long() and getopt_long_only() and to verify that there are no regressions to the existing getopts().

Only the OS test is affect by this change.

Verified with the getopt() modifications on a modified version of the sim:nsh configuration.
2021-04-03 01:07:34 -05:00
Dong Heng
d3c7508372 testing/fstest: Add hash checking of file's name to avoid creating same-name file 2021-03-30 00:59:16 -05:00
Alan Carvalho de Assis
f3828ccbca fstest: Force the minimum filename to 4 to avoid collisions 2021-03-25 19:45:48 -07:00
Alan C. Assis
640fd2e860 fstest: Fix printf format error 2021-03-24 23:21:23 +01:00
Gregory Nutt
9f65362dd4 OS test: Improve reporting from the dual thread sporadic test
Results were difficult to interpret because the counts during the high priority, budget interval were included with other counts during the low priority interval.  This corrects that reporting by using two counts:  One for the low and one for the high priority interval.  This makes the results much easier to interpret.

There should be no impact to anything other that the sporadic scheduler case of the OS test.

Tested using the the stm32f4discovery:sporadic configration.  That configuration has no yet been merged but is available from incubator-apps PR 3097.
2021-03-19 23:11:35 -07:00
Gregory Nutt
1d3dda49a8 Extend Testing of Sporadic Schedule in OS test
This commit adds the test developed by Jan Staschulat with Issue #incubator_nuttx/2935

It is expected to cause the OS test to fail for the time being since that issue reports a bug.

Tested using the (new) stm32f4discovery:sporadic configuratioin.
2021-03-18 19:57:58 -07:00
Xiang Xiao
2f1ecbaf74 Change all .cpp suffix to .cxx suffix
follow the coding standard requirement

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-16 13:57:48 -07:00
Masayuki Ishikawa
faaec6513c testing: getprime: Introduce configurable thread priority
Summary:
- This commit introduces configurable thread priority
- Also, thread policy is set based on RR_INTERVAL

Impact:
- getprime only

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-01-25 23:20:16 -08:00
nietingting
c98330fed9 [ltp] fix build failure with Argument too long issue
Signed-off-by: nietingting <nietingting@xiaomi.com>
2021-01-05 07:12:46 -06:00
nietingting
ccf5bd28fd ltp: fix build fail issue
Signed-off-by: nietingting <nietingting@xiaomi.com>
2021-01-05 07:12:46 -06:00
ligd
ef0c6b30c4 apps: update mqueue_open usage
As the mqd_t change to int

Change-Id: I16a9c137b6308eeec0badd241a101359e5f751b4
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-03 21:23:34 -06:00
ligd
135c5f61e1 testing/ostest/timedmqueue.c: fix nx_style
Change-Id: Ic7ba4f9008164932d3d94da1d09096a0f3e9534b
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-01-03 21:23:34 -06:00
dongjiuzhu
89bceba6b0 testing/sensortest: fix bug because getopt and add debug log
Change-Id: Id9c3499dd56690c60b2f6579d128850ce7522a6e
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2020-12-31 23:53:08 +01:00
dongjiuzhu
89376af38d testing/sensortest: fix bug because of adding custom type
Change-Id: I69fc7881e3fa7f94b549b1a342339fe5a9ec13ab
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2020-12-31 23:53:08 +01:00
Xiang Xiao
eff52fefcf Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-31 12:29:59 -08:00
Xiang Xiao
625832aa59 ostest: Don't assign NULL to mq_t varaibles
change to 0 instead since mq_t mayn't be a pointer

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-31 12:29:59 -08:00
YAMAMOTO Takashi
961fface44 testing/irtest: Remove an unused function 2020-12-22 03:07:29 -06:00
Huang Qi
3040c59ae9 Replace all wget with curl
wget is missing from some system (like macOS and Windows native),
it's better to use curl to simplify build environment.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-12-21 22:45:46 -06:00
nietingting
384d423415 ltp: fix build fail issue
Signed-off-by: nietingting <nietingting@xiaomi.com>
2020-12-18 08:57:02 -06:00
nietingting
c335c13578 add .gitignore for ltp
Signed-off-by: nietingting <nietingting@xiaomi.com>
2020-12-15 16:16:02 +01:00
nietingting
ef1845e215 Add LTP support
Signed-off-by: nietingting <nietingting@xiaomi.com>
2020-12-15 00:31:49 -08:00
dongjiuzhu
b506600c5b irtest: use global arrays instead of __attributes__((section)) organization
N/A

fix __attribute__((section)) syntax issues on linux and mac
Change-Id: Ie8b5f52e552280bf3435b5bac03ffd8aed4d9e02
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-27 23:53:16 -06:00
Yoshinori Sugino
e1a7c2539e testing/getprime/getprime_main.c: Fix a comment 2020-11-27 05:18:04 -06:00
dongjiuzhu
85f96e379e testing/irtest: test ir by LIRC interface
N/A

Change-Id: I008d2cf3f1db18cfa24bc20a5643f4960a97be3e
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-21 18:47:29 -08:00
dongjiuzhu
a96867a65d test/sensor: fix test failed when some apis are NULL
N/A

Change-Id: Ieb40b3ce73240057a181ee0dd482564cf27f6afa
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-18 00:05:28 -08:00
YAMAMOTO Takashi
c1b11a1e35 testing/sensortest/sensortest.c: Fix a printf format warning 2020-11-16 00:38:24 -08:00
YAMAMOTO Takashi
2a74046c2d testing/sensortest/sensortest.c: Fix printf format warnings 2020-11-15 21:33:25 -08:00
YAMAMOTO Takashi
5555d0ae91 testing/ostest/fpu.c: Fix a printf format warning 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
916543213f testing/ostest/fpu.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
10a0764175 testing/ostest/posixtimer.c: Fix printf format warnings 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
361615b8b4 testing/ostest/posixtimer.c: Appease nxstyle 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
135ee16d6c testing/ostest/sighand.c: Fix printf format warnings 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
469daed335 testing/getprime/getprime_main.c: Fix a printf format warning 2020-11-13 05:51:23 -08:00
YAMAMOTO Takashi
4d00277111 testing/fstest/fstest_main.c: Fix printf format warnings 2020-11-13 05:51:23 -08:00
Subhra Sankha Sarkar
ac5cda8daa Fix for file naming issue for sim:nxffs configuration 2020-11-10 19:06:53 -08:00
YAMAMOTO Takashi
6f6c452991 testing/ostest/signest.c: Fix a printf warning
error: too many arguments for format [-Werror=format-extra-args]
2020-11-09 04:10:59 -08:00
YAMAMOTO Takashi
0a1825b384 testing/ostest/signest.c: Appease nxstyle 2020-11-09 04:10:59 -08:00
dongjiuzhu
60342ec862 testing/sensortest: add sensor driver test
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-10-23 00:43:47 +08:00
Xiang Xiao
ecae66fe59 Replace all CONFIG_NFILE_STREAMS with CONFIG_FILE_STREAM
follow up the kernel side change

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic27ad65d7cc2ea570921e0c17098dcb6bfe1893a
2020-09-11 17:57:58 +08:00
Xiang Xiao
e6c5ff9208 Remove the unnecessary touch and clean from Makefile
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-11 19:10:19 +01:00
Peter Bee
63a5ddcc7c testing/cxxtest: increase STACKSIZE to avoid crash
The previous version of cxxtest uses a fixed value(4096) for STACKSIZE,
insufficient when no optimization options are set(CONFIG_DEBUG_NOOPT).
This patch increased the STACKSIZE to CONFIG_DEFAULT_TASK_STACKSIZE for
stability and consistency.

Change-Id: I45a4806d2cda1583f60a5cf24b98b8df58f377d0
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2020-08-03 21:05:01 +01:00
Johannes Schock
6aada750d9 Testing for UTF8 support for FAT Filesystem. 2020-07-31 18:03:03 -03:00
Masayuki Ishikawa
813f834018 testing: getprime: Replace license header with Apache License 2.0
Summary:
- This commit replaces license headers under testing/getprime.

Impact:
- No impact

Testing:
- Buid check only

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-07-29 01:05:31 -05:00
Maciej Wójcik
21049ece6e Rewritten READMEs to Markdown 2020-07-25 01:01:51 -07:00
Maciej Wójcik
51e6645f71 Rename README and README.txt to README.md 2020-07-25 01:01:51 -07:00
Xiang Xiao
deaa6c5b7b build: Replace $(TOPDIR)/Make.defs with $(APPDIR)/Make.defs
and move NUTTXLIB defintion to the common place

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-09 15:17:37 -03:00
qiaowei
d07db1fa5e ostest: fix assert when open CONFIG_SIG_DEFAULT
SIGKILL was captured and call nxsig_abnormal_termination,
which kills the children when SIGCHLD was set. Solution:
change SIGKILL to SIGUSR1.

Signed-off-by: qiaowei <qiaowei@xiaomi.com>
Change-Id: I4a4b06220a28fcf9d50debfd8a3b789fdbdf1976
2020-07-08 00:20:06 +01:00