Commit Graph

60 Commits

Author SHA1 Message Date
Alin Jerpelea
6f4dccdb64 testing: fix relative path CI error
error: Path relative to repository other than nuttx must begin with the root directory
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-16 09:03:06 -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
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
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
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
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
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
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
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
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
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
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
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
YAMAMOTO Takashi
faba0249c1 Include malloc.h instead of stdlib.h for mallinfo()
Adapt to the change in the main repo.

mallinfo is meant to be API compatible with Linux,
where it's provided by malloc.h.

(I think the API actually originated with System V. I don't
remember how it was there though. Anyway, I guess the
compatibility with Linux is more important than System V
these days.)
2020-06-15 07:21:52 -06:00
Xiang Xiao
69f013e74e build: Remve the unnecessary .gitignore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 15:56:35 +01:00
Xiang Xiao
ead498a788 build: Remove the workaround for the inexistence of .config/Make.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-21 17:43:42 +01:00
Gregory Nutt
f918be8d2a Rename CONFIG_NPTHREAD_KEYS to CONFIG_TLS_NELEM
After the redesign of pthread-specific data, CONFIG_NPTHREAD_KEYS is removed and replaced with CONFIG_TLS_NELEM
2020-05-08 17:43:28 +01:00
Gregory Nutt
8a92862e03 Remove CONFIG_TLS
A first step in implementing the user-space error is force TLS to be enabled at all times. It is no longer optional
2020-05-07 17:29:02 +01:00
Brennan Ashton
ed3c1cbe2d Resolve style issues in ostest/prioinherit
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-04-30 15:18:04 +08:00
Brennan Ashton
97e487d0d4 Fix uninitialized variable warning in ostest
In lowpri_thread if sem_wait fail nwaiting will not be set even
though the rest of the function uses it.  This is a failure
so really just handling the compiler warning with this.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-04-30 15:18:04 +08:00
Gregory Nutt
3e73991857 nxstyle fixes for PR 170 2020-04-11 20:32:53 +01:00
Gregory Nutt
05f2253a33 Remove CONFIG_CAN_PASS_STRUCT
This is the companion to PR #766.  It removes the CONFIG_CAN_PASS_STRUCT option as recommended by Issue #620

NuttX PR #766 depends on PR being in place but not vice versa.  This PR should be merge-able without #766 and then PR #766 should also pass its checks.
2020-04-11 20:32:53 +01:00
YAMAMOTO Takashi
e7156be066 Change the defaults of stack size configs to DEFAULT_TASK_STACKSIZE
This commit changes only ones with the default 2048 and
leaves the others.
E.g. this leaves SYSTEM_RAMTEST_STACKSIZE, whose default is 1024.
I guess those need to be inspected one-by-one.
2020-03-27 02:43:11 -05:00
YAMAMOTO Takashi
c304624fab Replace "STACKSIZE = 2048" with CONFIG_DEFAULT_TASK_SIZE
For now, I left the following instances because it isn't
clear to me why they are using the different values.
Maybe they need one-by-one inspection.

    examples/igmp/Makefile:STACKSIZE = 1024
    examples/powerled/Makefile:STACKSIZE = 1024
    examples/powermonitor/Makefile:STACKSIZE = 768
    examples/relays/Makefile:STACKSIZE = 512
    examples/smps/Makefile:STACKSIZE = 1024
    graphics/screenshot/Makefile:STACKSIZE = 4096
    system/flash_eraseall/Makefile:STACKSIZE = 1024
    testing/cxxtest/Makefile:STACKSIZE = 4096
    testing/smart_test/Makefile:STACKSIZE = 4096
2020-03-27 02:43:11 -05:00
Xiang Xiao
1511403fdf Revert "Don't generate .depend anymore"
This reverts commit cc5ad09caa.
2020-03-22 23:09:40 -05:00
Xiang Xiao
cc5ad09caa
Don't generate .depend anymore 2020-03-22 18:15:21 +00:00
Gregory Nutt
1a9444a68b Remove support for CONFIG_FS_WRITABLE and CONFIG_FS_READABLE 2020-03-22 08:23:28 -05:00
Masayuki Ishikawa
dd9059203d testing: ostest: Fix a warning in cond.c for non-SMP configurations.
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-02-29 02:51:55 -06:00
Masayuki Ishikawa
102d7670c3 testing: ostest: Add workaround for SMP in cond.c
Signed-off-by: Masayuki Ishikawa <masayuki.ishikawa@gmail.com>
2020-02-28 07:58:14 -06:00
Xiang Xiao
41d88f06e7 Run codespell -w with the latest dictonary again 2020-02-23 07:10:14 -06:00
Xiang Xiao
d660492289 Run codespell -w against all files
and fix the wrong correction
2020-02-22 14:41:36 -06:00
Xiang Xiao
e0dcfa0c55 Remove extra whitespace from files (#43)
* Remove multiple newlines at the end of file
* Remove the white space from the end of line
2020-01-31 08:29:24 -06:00
Xiang Xiao
857158451b Unify the void cast usage
1.Remove void cast for function because many place ignore the returned value witout cast
2.Replace void cast for variable with UNUSED macro

Change-Id: Ie644129a563244a6397036789c4c3ea83c4e9b09
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-02 23:21:01 +08:00
Xiang Xiao
7808eb62d2 apps/: In all Make.def files, append to CONFIGURED_APPS patch with the absolute path. 2019-10-17 11:33:59 -06:00
Gregory Nutt
3a23523147 Makefiles: This reverts part of commit cf0365ea9. It restores 'conditional' inclusion of TOPDIR/Make.defs. Otherwise all make targets fail if the board has not been configured. That is okay most of the time, but not for things like clean and distclean which should not depend on being configured. 2019-10-15 09:25:48 +08:00
Xiang Xiao
e806097c70 Application.mk and main.c files: Change builtin's entry point from main to xxx_main by macro expansion. This change make the entry point fully compliant with POSIX/ANSI standard. 2019-10-06 06:14:56 -06:00