Commit Graph

6334 Commits

Author SHA1 Message Date
zhanghongyu
6e8ea78d70 usrsock_server: combine response and events when socket setup case
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-10-14 11:39:41 +09:00
zhanghongyu
8a2f29c9b5 usrsock_server: fix unblock socket connect error
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-10-14 11:39:41 +09:00
Fotis Panagiotopoulos
bcbf3ae89d Fixes in DHCPc. 2022-10-13 22:59:54 +02:00
nietingting
6e3b402cf4 examples: clean warning of pipe
transfer_test.c:66:12: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
   int fd = (int)pvarg;
            ^
transfer_test.c: In function 'transfer_writer':
transfer_test.c:122:12: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
   int fd = (int)pvarg;
            ^
transfer_test.c: In function 'transfer_test':
transfer_test.c:169:58: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
   ret = pthread_create(&readerid, NULL, transfer_reader, (pthread_addr_t)fdin);
                                                          ^
transfer_test.c:179:58: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
   ret = pthread_create(&writerid, NULL, transfer_writer, (pthread_addr_t)fdout);
                                                          ^
transfer_test.c:202:13: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       ret = (int)value;
             ^
transfer_test.c:216:13: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
       tmp = (int)value;
             ^

Signed-off-by: nietingting <nietingting@xiaomi.com>
2022-10-11 19:49:45 +08:00
zhangyuan21
7fcba8a119 ostest: add semaphore wait case for task restart 2022-10-11 15:29:45 +08:00
Alan Carvalho de Assis
abbe022894 wapi: Verify if password size if valid 2022-10-11 14:35:43 +08:00
Fotis Panagiotopoulos
ab7cb90f88 ftpd: Fixed compiler warnings. 2022-10-06 23:54:31 +08:00
Xiang Xiao
9291d07a87 Fix the coding style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-06 12:20:32 +02:00
Xiang Xiao
a86790c367 poll: Don't need monitor POLLERR or POLLHUP explicitly
since spec require the implementation always report POLLERR/POLLHUP:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/poll.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-05 05:58:02 +02:00
Ville Juven
8c1c0efabc make export: Fix make export for CONFIG_BUILD_KERNEL=y
The condition:
[ -f "$${f}" ] && cp -f "$${f}" "${EXPORTDIR}"$(DELIM)registry ;

Fails if the first part of the condition returns empty / false, stopping
make for no reason due to the error.
2022-10-05 03:13:39 +08:00
Alan Carvalho de Assis
ed78d25934 webserver: Help users to easily identify missing configurations
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-04 20:22:33 +02:00
crafcat
98a9d2c749 system/ramspeed: Add system interrupt switch.
system/ramspeed: Add system interrupt switch.
2022-10-03 21:07:17 +02:00
crafcat
744ecf2b01 system/ramspeed: Add system interrupt switch. 2022-10-03 21:07:17 +02:00
crafcat
0e0ac0656b system/cachespeed:Tools for testing cache-related speed.
Signed-off-by: crafcat <110923103+crafcat7@users.noreply.github.com>
2022-10-01 11:41:40 +08:00
Petro Karashchenko
8e8d461590 ostest/prioinherit: fix priority inheritance test when compiled without optimisation
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>
2022-10-01 11:41:26 +08:00
Fotis Panagiotopoulos
1975f7c485 nxstyle fixes. 2022-09-30 14:23:04 +08:00
Fotis Panagiotopoulos
2c0c02fe78 Fixed non-UTF8 characters. 2022-09-30 14:23:04 +08:00
Tiago Medicci Serrano
66f957792f examples/i2schar: Fix compile error and warning
Fix compile error due to unnecessary endif.
Fix warning of long line.
2022-09-30 10:24:17 +08:00
yinshengkai
1b99543e8d system/gcov: add show usage
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-09-27 19:39:31 +08:00
yinshengkai
d9ec9ca868 system/trace: expand dump string
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-09-27 19:39:22 +08:00
SunJ
162dc0996c netutils/dhcpc: Add dhcp client id option
Signed-off-by: SunJ <jsun@bouffalolab.com>
2022-09-27 12:20:34 +08:00
chao an
09dfbdf4c7 netutls/dhcpc: treat EINTR as normal errno
A return code of EINTR is perfectly normal, and isn't an error as such.
It's an indication that your program may need to do something because
a signal occurred, but if not, should re-call recv().

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-27 12:20:25 +08:00
chao an
a1ea7f9df7 netinit: associate wlan if DRIVERS_IEEE80211 enabled
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-27 12:20:25 +08:00
chao an
cbcfe6be28 netutils/dhcpc: Set close-on-exec by default to avoid udp_conn leak
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-27 12:20:25 +08:00
Xiang Xiao
0dc5e9f469 Replace #include <queue.h> with #include <nuttx/queue.h>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-26 08:04:51 +02:00
Junbo Zheng
79e770b0c6 apps/nshlib: add the missing FAR macro for all source files
Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2022-09-22 14:22:13 +08:00
Junbo Zheng
45ef7f948f apps/nshlib: fix CI error
Error: /home/runner/work/incubator-nuttx-apps/incubator-nuttx-apps/apps/nshlib/nsh_proccmds.c:574:40: error: Operator/assignment must be preceded with whitespace
Error: Process completed with exit code 1.

Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2022-09-21 16:37:34 +02:00
Junbo Zheng
06f39d10f1 apps/nshlib: add uptime command support
run uptime command on sim:
nsh>
nsh>
nsh> uptime
19:35:01 up  1:40, load average: 0.00, 0.00, 0.00
nsh>
nsh>
nsh> uptime -s
2022-09-16 17:54:26
nsh>
nsh>
nsh> uptime -p
up 1 hour, 40 minutes
nsh>
nsh>
nsh> uptime -h
Usage:
uptime [options]
Options:
-p, show uptime in pretty format
-h, display this help and exit
-s, system up since
nsh>
nsh>
nsh> uptime -abc
uptime: invalid option -- -abc
Usage:
uptime [options]
Options:
-p, show uptime in pretty format
-h, display this help and exit
-s, system up since
nsh>
nsh>
nsh> date
Fri, Sep 16 19:35:18 2022
nsh>
nsh>

Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2022-09-21 16:37:34 +02:00
anjiahao
ac4b42fee7 testing:support openbsd crypto test for nuttx
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-09-16 23:20:58 +08:00
anjiahao
ccd7d12bcb testing:crypto testing form openbsd
aesctr.c:
49a6e16f2c2c8e509184b1f777366d1a6f337e1c
aes_xts.c:
49a6e16f2c2c8e509184b1f777366d1a6f337e1c
des3.c:
49a6e16f2c2c8e509184b1f777366d1a6f337e1c
hmac.c
f51db96baec97348726b28106516038de1518dc5
https://github.com/openbsd/src
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-09-16 23:20:58 +08:00
田昕
799fe4e684 testing/mtd_config_fs:more test cases for garbage collection.
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-09-16 18:03:11 +08:00
Junbo Zheng
732450d42a apps/nshlib: correct commands with alphabet order in kconfig
Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
2022-09-16 15:59:30 +08:00
田昕
3d53b7e0e0 testing/nvconfig:fix compiling err after removing MTD_CONFIG_ERASEDVALUE
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-09-14 20:16:17 +08:00
Huang Qi
5d972ba6d5 Application.mk: Fix Zig build break
Correct wrong make variable name for Zig main source,
and update compile command for latest compiler.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-09-10 11:09:22 +08:00
Huang Qi
0d5804c527 examples/hello_zig: Fix unused return value
Zig don't allow unused return value, so let's discard it explicitly.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-09-10 11:09:22 +08:00
yinshengkai
75673fed70 quickjs: add qjs tool configuration item
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-09-09 17:25:12 +02:00
Nathan Hartman
c2fdd8e99d tools/README.md: Fix typo and reflow paragraph 2022-09-09 01:08:33 +08:00
田昕
21e1ef11da netutils/dhcpc:receiving unexpected packet not leading to dhcp retry.
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-09-08 14:48:56 +08:00
Masayuki Ishikawa
3837091582 wireless: gs2200m: Add SIOCGIFFLAGS support to gs2200m_main.c
Summary:
- I noticed that the latest ifconfig command shows nothing
- Finally, I found that gs2200m_main.c needs to handle SIOCGIFFLAGS
- This commit fixes this issue

Impact:
- gs2200m only

Testing:
- Tested with spresense:wifi
- NOTE: gs2200m driver needs to be updated as well

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-09-07 11:21:29 +08:00
ligd
048b79955e ostest: fix sighand_test report error
sighand_test: ERROR waiter task did not exit

reason:
sleep will be interrupt by signal

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-09-07 01:18:15 +08:00
chao an
e6e4661131 nshlib/netcmd: add sanity check for netdev
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-06 23:01:18 +08:00
田昕
37b77a78fa netutils/dhcpc:Make DHCP xid random
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-09-06 19:33:38 +08:00
chao an
e031a82882 netutils/dhcp: fix build warning/break of dhcp6c
dhcp6c.c:222:3: error: unknown type name ‘pthread_t’
  222 |   pthread_t thread;
      |   ^~~~~~~~~
dhcp6c.c: In function ‘dhcp6c_get_result’:
dhcp6c.c:415:7: warning: implicit declaration of function ‘netlib_prefix2ipv6netmask’ [-Wimplicit-function-declaration]
  415 |       netlib_prefix2ipv6netmask(presult->pl, &presult->netmask);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~
dhcp6c.c: In function ‘dhcp6c_parse_ia’:
dhcp6c.c:1046:30: warning: unused variable ‘pdhcp6c’ [-Wunused-variable]
 1046 |   FAR struct dhcp6c_state_s *pdhcp6c = (FAR struct dhcp6c_state_s *)handle;
      |                              ^~~~~~~
dhcp6c.c: In function ‘dhcp6c_precise_open’:
dhcp6c.c:1702:3: warning: missing braces around initializer [-Wmissing-braces]
 1702 |   {
      |   ^
......
 1706 |     {0},
      |      -
      |      {{0}}
dhcp6c.c:1796:43: error: ‘UDP_BINDTODEVICE’ undeclared (first use in this function); did you mean ‘SO_BINDTODEVICE’?
 1796 |   setsockopt(pdhcp6c->sockfd, SOL_SOCKET, UDP_BINDTODEVICE, ifname,
      |                                           ^~~~~~~~~~~~~~~~
      |                                           SO_BINDTODEVICE
dhcp6c.c:1796:43: note: each undeclared identifier is reported only once for each function it appears in
dhcp6c.c: In function ‘dhcp6c_request_async’:
dhcp6c.c:1886:9: warning: implicit declaration of function ‘pthread_create’; did you mean ‘timer_create’? [-Wimplicit-function-declaration]
 1886 |   ret = pthread_create(&pdhcp6c->thread, NULL, dhcp6c_run, pdhcp6c);
      |         ^~~~~~~~~~~~~~
      |         timer_create

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-06 19:31:16 +08:00
Fotis Panagiotopoulos
387eba2efd ftpd: server port made configurable. 2022-09-04 11:03:28 -04:00
Fotis Panagiotopoulos
e3a9be0d05 Minor changes in ftpd. 2022-09-03 21:49:15 +08:00
chao an
3d0a49f33e examples/usrsocktest: read from the closed remote should return EOF
fix usrsock remote_disconnect fail:

nsh> usrsocktest
...
Testing group "remote_disconnect" =>
        [TEST ASSERT FAILED!]
                In function "receive":
                line 497: Assertion `(ssize_t)((ret)) == (ssize_t)((0))' failed.
                        got value: -1
                        should be: 0
        Group "remote_disconnect": [FAILED]
...

Reference:

RECV(2)

NAME
       recv, recvfrom, recvmsg - receive a message from a socket
...
RETURN VALUE
...
       When a stream socket peer has performed an orderly shutdown,
       the return value will be 0 (the traditional "end-of-file" return).

       Datagram sockets in various domains (e.g., the UNIX and Internet domains)
       permit zero-length datagrams.  When such a datagram is received, the return value is 0.

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-01 14:58:09 +08:00
chao an
6bc5196ff0 examples/usrsocktest: add some delay to wait the daemon task ready
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-01 14:58:09 +08:00
chao an
45a21aea8e examples/usrsocktest: add USRSOCK_REQUEST_IOCTL support
The test model of usrsock ioctl() has changed after file socket layer implemented from vfs,
usrsock must implement the ioctl() hook to pass this test

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-01 14:58:09 +08:00
chao an
046e83bec9 examples/usrsocktest: fix build break
usrsocktest_wake_with_signal.c: In function ‘do_wake_test’:
usrsocktest_wake_with_signal.c:553:16: error: ‘USEC_PER_MSEC’ undeclared (first use in this function)
  553 |   usleep(100 * USEC_PER_MSEC); /* Let worker thread proceed to blocking
      |                ^~~~~~~~~~~~~

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-01 14:58:09 +08:00
chao an
5b47bc24ae examples/usrsocktest: correct the check region of remote address
let us skip the sin_zero

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-01 14:58:09 +08:00