Commit Graph

6771 Commits

Author SHA1 Message Date
Xiang Xiao
417b87a0a0 testing/ostest: Remove the unreal used SIG_WAITCANCEL
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-05 03:38:24 -07:00
Xiang Xiao
3ac86cc6f1 testing/ostest: Define the private used signal to SIGRTMIN
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-05 03:38:24 -07:00
Fotis Panagiotopoulos
b93aa0cb8d ostest: Fixed use of uninitialized variable. 2023-04-05 03:57:00 +03:00
zhengjunbo1
f58c87e7ed nshlib/README.md: add uptime command description
Signed-off-by: zhengjunbo1 <zhengjunbo1@xiaomi.com>
2023-04-04 12:19:15 -04:00
Xiang Xiao
49418d6de5 nshlib: Align the command table
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-04 13:53:28 +03:00
Xiang Xiao
4f7dd7be7c nshlib: Add boot command
boot [<image path> [<header size>]]

Boot a new firmware image. This command depends on hardware support
CONFIG_BOARDCTL_BOOT_IMAGE. <image path> may point to a partion or file
which contain the firmware to boot. The optional, numeric argument
<header size> may be useful for skipping metadata information preprended
to the firmware image.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-04 13:53:28 +03:00
Ville Juven
c694d8d90f system/composite_main.c: Convert fprintf -> dprintf
CONFIG_FILE_STREAMS now defaults to 'n' when DEFAULT_SMALL is enabled. This
is a good change, but this source file fails to compile when file streams
are disabled.

Fix this by using dprintf.
2023-04-03 21:33:19 +03:00
wangchen
93105568c0 examples/ftpd: Add support for choosing address family
choose the network protocol (ipv4 or ipv6) to bind network in setting ftpd

Signed-off-by: wangchen <wangchen41@xiaomi.com>
2023-04-03 16:18:15 +03:00
simbit18
75ddde9c56 apps/examples/mqttc/Makefile: Add missing Apache Foundation copyright header
Add missing Apache Foundation copyright header
2023-04-03 16:14:35 +03:00
Masayuki Ishikawa
125cf7abe2 nshlib: Fix the ps command format
Summary:
- I noticed that the ps command shows the wrong format due to
  recent changes on sigmask length from 32bits to 64bits
- This commit fixes this issue

Impact:
- None

Testing:
- Tested with sabre-6quad:smp on qemu-7.1

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-03-29 14:50:26 +03:00
Xiang Xiao
fd9c92e2e9 system/cu: Move fd_std_tty, g_tio_std and g_tio_dev to cu_globals_s
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-29 14:50:11 +03:00
Gustavo Henrique Nihei
d650d3276f luamodules: Fix implicit declaration warning for strncasecmp
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-28 14:54:16 -03:00
Gustavo Henrique Nihei
ce68d7a738 examples/popen: Fix NxStyle long line warning
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-28 14:54:16 -03:00
Gustavo Henrique Nihei
efb4e0bc91 Add another batch of missing headers throughout the repository
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-28 14:54:16 -03:00
Gregory Nutt
a1bca5070c Changes to apps needed by nutts PR 8885
ostest contains some logic that depends on internal implementation of signal sets and ostest must be updated to match those changes.

There is no particular impact from this PR.  This PR is the result of impact from nuttx 8885.

Tested with nuttx 8885
2023-03-27 16:58:52 +03:00
Petro Karashchenko
75b4720a6e industry/scpi: fix compilation of SCPI library
Expose SCPI library API to application

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-03-27 09:15:48 +02:00
Xiang Xiao
35edbf02f5 system/cu: Remove the duplicated SIGINT definition
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-26 09:12:45 -06:00
Petro Karashchenko
6833a8c0cc netutils/pppd: fix indentations in ppp.h
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-03-26 08:33:05 -06:00
Petro Karashchenko
07d229f514 canutils: fix indentation in Kconfig files
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-03-26 08:33:05 -06:00
simbit18
386e077525 apps/system/ymodem/Makefile: fix nxstyle
Remove LF first line
2023-03-24 15:04:43 -03:00
simbit18
1adc70fe43 apps/system/ymodem/Make.defs: fix nxstyle
Remove LF first line
2023-03-24 15:04:43 -03:00
simbit18
e533df52cc apps/testing/smart_test/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-24 15:04:43 -03:00
simbit18
ef7e2a8636 apps/wireless/ieee802154/libutils/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-24 15:04:43 -03:00
simbit18
6766327cde apps/wireless/wapi/src/Make.defs: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-24 15:04:43 -03:00
Stuart Ianna
0ed95bbe97 tools/mkimport: Allow additions LDELFFLAGS from exported Nuttx builds. 2023-03-24 15:03:53 -03:00
Huang Qi
95acf6c904 interpreters/wamr: New option to dump call stack
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-24 11:37:22 +08:00
Ville Juven
e20d2688ab nsh/alias: Do not expand argument lists, only the command
A resulting word that is identified to be the command name word of a
simple command shall be examined to determine whether it is an unquoted,
valid alias name.

The keyword here being "a simple command", arguments are not subject to
expansion.
2023-03-23 22:10:19 +02:00
Ville Juven
ad18a50282 nsh/nsh_parse.c: Fix variable expansion inside double quotes
This also prevents expanding anything when inside single quotes, for
full POSIX compliance.
2023-03-23 22:10:19 +02:00
Ville Juven
f9dfb51001 nsh/nshlib: Add alias support for nsh
This adds support for string aliases into nsh. There are some nuances that
are not handled correctly yet:

- Reserved words can be overloaded, which is a clear POSIX violation
2023-03-23 22:10:19 +02:00
Ville Juven
bf40833d2e nsh/nsh_parse.c: Add support for single ('') and double ("") quotes
The parser is modified to detect, handle and remove quotes from the
command string. Whatever is inside the quotes is treated as a string
literal. If no matching end quote is found, the terminal prints out
and error.
2023-03-23 22:10:19 +02:00
simbit18
800f1f4bae apps/examples/adc/adc.h: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-23 00:52:38 +02:00
simbit18
ad8478045e apps/examples/charger/Makefile: fix nxstyle
Add missing Apache Foundation copyright header
2023-03-23 00:52:38 +02:00
simbit18
d80b08d07e apps/examples/flash_test/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-23 00:52:38 +02:00
simbit18
c86b154677 apps/examples/fboverlay/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-23 00:52:38 +02:00
Huang Qi
4079f6d613 system/cu: Let remote machine handle special character except Ctrl-C
Let remote machine handle special character except Ctrl-C, make cu's behavior more close to linux/bsd system.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-22 11:51:04 -03:00
chao an
b3cfcee47d netutils/iperf: guaranteed precision before division
Iperf test on photon/wlan
Before:
   0.00-   1.08 sec      65536 Bytes    0.00 Mbits/sec
After:
   0.00-   1.04 sec      74970 Bytes    0.58 Mbits/sec

Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-22 11:47:01 -03:00
Zhe Weng
412505d286 ostest: Introduce basic work queue test
The test consists of two parts:
- A tester that tries to trigger wrong states of work queue
- A verifier that checks whether the wqueue is still working properly

The tester is trying to queue and cancel work several times with
priority lower/same/higher than the work queue.

Most wrong cases are likely to happen with high priority like:
- If `cancel` never decreases semcount, the count may keep growing
  and finally overflow
- If `cancel` is decreasing semcount too much, the `work_thread` may
  be waken up less times than expected

The lower/same priority testers are just added for covering other
unexpected situations.

The verifier is trying to queue some works and check they are called as
expected:
- Frist queue a 'sleep' worker, to let a work queue thread be in busy
  status and not waiting on sem, while other work queue thread(s) (if
  any) still waiting for sem. If sem is in wrong state, it may cause
  wrong behavior in either thread waiting/not waiting on the sem.
- Then queue a few count works, if the work queue(s) are still working
  properly, these works should finally be all called once.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-03-22 12:56:01 +02:00
Huang Qi
8ae5a1b148 Fix some hard coded buffer len of snprintf
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-21 20:57:56 -03:00
Zhe Weng
86d084fe21 netutils/ftpc: Cancel wdog on error state in ftpc_reconnect.
The timer is for connect timeout, but is not cancelled on connect error,
then it may be triggered after ftpc quit and cause heap-use-after-free.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-03-21 20:40:38 -03:00
Xu Xingliang
f32aa2df59 lua: download tarball from github release tag
The tarball from github has same file layout as git repo while the tarball from ftp doesn't.
Update Makefile to accommodate this change.

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2023-03-21 20:38:29 -03:00
simbit18
48928e1c68 apps/system/dumpstack/Makefile: fix style
fix error: Relative file path does not match actual file
2023-03-21 20:37:38 -03:00
simbit18
0e04cd75f8 apps/system/dumpstack/Make.defs: fix style
fix error: Relative file path does not match actual file
2023-03-21 20:37:38 -03:00
simbit18
d65c51b0c6 apps/platform/bin/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-21 20:37:38 -03:00
simbit18
04c31b820c apps/testing/crypto/Makefile: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-21 20:37:38 -03:00
simbit18
ab675c5b7d apps/testing/crypto/Make.defs: fix nxstyle
fix error: Relative file path does not match actual file
2023-03-21 20:37:38 -03:00
Tiago Medicci Serrano
3a1893ba7e nxplayer: read file completely until 0 bytes are returned
Previously, if the read bytes were less than the requested, the
file was closed immediately. This behavior, however, does not
consider the fact that the read operation may be blocking when
no bytes are available at the moment. That is true for a named pipe
(FIFO), for instance. Thus, reading it again lets to the underlying
file system the decision of 1) blocking until bytes become
available or 2) return 0 immediately (the case for actual files) or
3) read available bytes.
2023-03-21 07:51:18 +09:00
simbit18
d3c3a6ebe0 apps/netutils/xmlrpc/Make.defs: fix nxstyle
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
7560a5e80d apps/netutils/webserver/Make.defs: fix nxstyle
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
79b72c0302 apps/netutils/webclient/Make.defs: fix nxstyle
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
b2f1ab31c7 apps/netutils/thttpd/Make.defs: fix nxstyle
Add missing first line header
2023-03-20 14:17:07 +01:00