Summary:
- This commit adds ASSERT in case of errors to stop the
execution of ostest
- Also, add some 'ERROR' messages
Impact:
- None
Testing:
- Run ostest with several configs
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
When application is compiled without optimisation the stack usage
is higher. 1K stack of adversary task is getting overflowed and that
leads to crash. Set stack size to CONFIG_DEFAULT_TASK_STACKSIZE for
adversary task
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
Summary:
- I noticed that getprime sometimes shows a wrong thread number
- This commit fixes this issue
Impact:
- None
Testing:
- Tested with sabre-6quad:netnsh
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
1.update prefix of sensor event structure to sensor_xxx.
2.remove activate cmd because of open will auto activate sensor.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
The following commit changed the typo of SIZEOF_MM_ALLOCNODE
from int to size_t.
```
commit 39eaeefb78f36724adbdc47400d6f60372b68344
Author: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Date: Thu Jan 27 12:17:20 2022 +0800
mm/mm_heap: remove the unnecessary check for memory node size
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
```
scanftest_main.c:1121:34: warning: ‘%s’ directive writing up to 2 bytes into a region of size between 1 and 80 [-Wformat-overflow=]
canftest_main.c: In function 'scanftest_main':
scanftest_main.c:1399:42: warning: format '%n' expects argument of type 'int *', but argument 3 has type 'unsigned int' [-Wformat=]
1399 | printf("Test #%u assigned %nou instead of %lli.\n",
| ~^
| |
| int *
| %d
1400 | t + 1, nou, type_data[t].value.u);
| ~~~
| |
| unsigned int
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Gregory Nutt has submitted the SGA
Haltian Ltd has submitted the SGA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
task is blocked by semphore1, signal handler is blocked by semphore2,
after post semphore2, the task must get -EINTR.
Signed-off-by: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com>
aio.c: In function ‘check_done’:
aio.c:158:41: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssize_t’ {aka ‘volatile long int’} [-Wformat=]
158 | printf(" list[%d]. result = %d\n", i, aiocbp->aio_result);
| ~^ ~~~~~~~~~~~~~~~~~~
| | |
| int ssize_t {aka volatile long int}
| %ld
aio.c: In function ‘remove_done’:
aio.c:222:41: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssize_t’ {aka ‘volatile long int’} [-Wformat=]
222 | printf(" list[%d]. result = %d\n", i, aiocbp->aio_result);
| ~^ ~~~~~~~~~~~~~~~~~~
| | |
| int ssize_t {aka volatile long int}
| %ld
sporadic2.c: In function ‘sporadic2_test’:
sporadic2.c:313:10: warning: format ‘%i’ expects argument of type ‘int’, but argument 4 has type ‘long int’ [-Wformat=]
313 | printf("Sporadic 1: prio high %d, low %d, repl %" PRIi32 " ns\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/xiaoxiang/backup/os/nuttx/nuttx/include/stdint.h:35,
from /home/xiaoxiang/backup/os/nuttx/nuttx/include/sys/types.h:32,
from /home/xiaoxiang/backup/os/nuttx/nuttx/include/stdio.h:30,
from sporadic2.c:27:
/home/xiaoxiang/backup/os/nuttx/nuttx/include/arch/inttypes.h:51:24: note: format string is defined here
51 | # define PRIi32 "i"
sporadic2.c:315:10: warning: format ‘%i’ expects argument of type ‘int’, but argument 4 has type ‘long int’ [-Wformat=]
315 | printf("Sporadic 2: prio high %d, low %d, repl %" PRIi32 " ns\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
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>
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>
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>
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>
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>
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>
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.
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.
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.
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.
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.
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.
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>
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>
N/A
fix __attribute__((section)) syntax issues on linux and mac
Change-Id: Ie8b5f52e552280bf3435b5bac03ffd8aed4d9e02
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
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>
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
cxxtest_main.cxx: In function ‘void test_rtti()’:
cxxtest_main.cxx:199:3: warning: deleting object of polymorphic class type ‘Base’ which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
199 | delete a;
| ^~~~~~~~
cxxtest_main.cxx:200:3: warning: deleting object of polymorphic class type ‘Base’ which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
200 | delete b;
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id80100a09f7b1d5931e7898a1a5a75ca00007c75
since the test should work with either uClibc++ or libcxx
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie6d7b1706314cbe82d4e89eb2d5c47ed36118ea4
since it is moved to the central place in nuttx side instead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I544d6110f1ca6460f7c82f970870aa9b1e7ab3dd
because user may use libcxx which just define CONFIG_LIBCXX_EXCEPTION
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I67e7e93cd994e7ad895e93f859f78e038a7a10cb
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.)
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>
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.
Where:
* Under examples and testing
* And the default value is less than 2048
Using a bit more memory for examples and tests should not
be a critical problem.
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.
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
Make stacksize as well as program name and priority configurable. The defaults are the same as the previous hardcoded values.
The default stacksize of 2048 bytes is more than enough for most target applications. However, when running on the simulator, much large stack sizes are needed.
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>
1. Check NSH_NETINIT for self network initialization
2. Check NSH_ARCHINIT for sel arch specific initialization
3. Always show help regardless of NSH_BUILTIN_APPS
4. Loop forever regardless of NSH_BUILTIN_APPS, user could:
a.change the default behavior by the command line argument
b.or ctrl+c to break out the loop
Some improvements to netutils/cjson and testing/unity
* netutils/cjson/Makefile: fix the error when creating Make.dep
* testing/unity/Makefile: fix the error when creating Make.dep
* include/.gitignore: ignore cJSON headers
* netutils/cjson/Kconfig: update default version to 1.7.12. Previous releases raise compilation warnings about redefined true/false
Approved-by: Gregory Nutt <gnutt@nuttx.org>
include/ and netutils/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
nshlib/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
system/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
testing/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
examples/: Remove references to CONFIG_DISABLE_SIGNALS. Signals can no longer be disabled.
testing: add Unity - unit testing library from ThrowTheSwitch.org
* examples/powerled: add arch initialization; examples/smps: fixes in some printf and in Kconfig
* testing: add Unity - unit testing library from ThrowTheSwitch.org
Approved-by: GregoryN <gnutt@nuttx.org>