Commit Graph

133 Commits

Author SHA1 Message Date
Alin Jerpelea
0f68fb7075 testing: smp: nxstyle fixes
Fixes for errors reported by nxstyle tool

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-10 08:49:24 -05:00
Alin Jerpelea
d2db78f8bc testing: smart_test: nxstyle fixes
Fixes for errors reported by nxstyle tool

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-10 08:49:24 -05:00
Alin Jerpelea
3378b8ef54 testing: ostest: nxstyle fixes
Fixes for errors reported by nxstyle tool

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-10 08:49:24 -05:00
Alin Jerpelea
590307e957 testing: update licenses to Apache
Gregory Nutt is has submitted the SGA

Mark Schulte has submitted the ICLA

Ken Pettit has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-10 08:49:24 -05:00
Masayuki Ishikawa
068e1877b8 testing: getprime: Fix to wait for all the threads to finish
Summary:
- I noticed that sometimes getprime causes ASSERT in tls_getset.c
- This commit fixes this issue.

Impact:
- None

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-06-07 21:32:52 -06:00
Alin Jerpelea
1e88c73107 Makefile: Ken Pettit: update licenses to Apache
Gregory Nutt is has submitted the SGA

Ken Pettit has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-07 21:35:33 -05:00
Alin Jerpelea
ea1ced8ba3 Makefiles: Mateusz Szafoni: update licenses to Apache
Gregory Nutt is has submitted the SGA

Mateusz Szafoni has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-07 21:35:33 -05:00
Alin Jerpelea
ec339bc49a Makefiles: Gregory Nutt: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-07 21:35:33 -05:00
Xiang Xiao
1ee948e0c8 Include assert.h for DEBUGASSERT caller
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-24 12:34:37 +09:00
Xiang Xiao
a6ca97d733 ostest: Include errno.h in timedmutex.c
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-18 12:42:02 +01:00
Abdelatif Guettouche
739ab94d03 testing/unity: Select the latest version.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-05-05 06:05:33 -07:00
Abdelatif Guettouche
e86faa6966 testing/ostest: Fix nxstyle errors.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-04-30 09:17:14 -03:00
Abdelatif Guettouche
0e9f08e454 testing/ostest: Report "ERROR" the same way for all the test cases.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-04-30 09:17:14 -03:00
Brennan Ashton
e73d71c787 ltp: Resolve compile warnings 2021-04-11 03:43:51 -05:00
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