Commit Graph

11395 Commits

Author SHA1 Message Date
dependabot[bot] 3d374b91ec
build(deps): bump actions/setup-python from 5 to 6
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-09 04:33:02 +00:00
v-tangmeng 79232d8233 nsh: fix nsh redirect fd double close
avoid double-close of redirection fds

Signed-off-by: zhenwei fang <fangzhenwei@bytedance.com>
2026-04-27 10:36:59 +08:00
v-tangmeng dd7c846d70 apps/system: fix the compile error
error: 'CONFIG_NSH_LINELEN' undeclared (first use in this function);
did you mean 'CONFIG_NSH_PIPELINE'?

Signed-off-by: v-tangmeng <v-tangmeng@xiaomi.com>
2026-04-27 10:33:25 +08:00
fangpeina 888690a2fe examples/memory_pressure: fix daemon loop condition
Fix inverted loop condition: while (g_exit) should be while (!g_exit),
causing the daemon to exit immediately instead of running.

Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2026-04-20 15:20:26 +08:00
huojianchao 6c4948219c cmocka:Output results in both standard and XML formats when xml_path is specified, providing additional information to help locate the failure point.
Signed-off-by: Jianchao Huo <huojianchao@xiaomi.com>
2026-04-20 15:20:26 +08:00
ouyangxiangzhen 8dd18d6bb6 apps/testing: Fix CLOCK_REALTIME definition.
This commit fixed CLOCK_REALTIME definition.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-04-20 15:20:26 +08:00
yangao1 5eb72d9fea apps/testing/clock_test_timer03.c:use CLOCK_MONOTONIC instead of CLOCK_REALTIME
Replace CLOCK_REALTIME with CLOCK_MONOTONIC to prevent NTP sync or system time changes

Signed-off-by: yangao1 <yangao1@xiaomi.com>
2026-04-20 15:20:26 +08:00
fangyibo f2defde253 Alsa-lib: fix dmix drain_lastbuffer planar wrong offset
Signed-off-by: fangyibo <fangyibo@xiaomi.com>
2026-04-20 15:20:25 +08:00
fangyibo 9f8eda138a Alsa-lib: add seperate device log
Signed-off-by: fangyibo <fangyibo@xiaomi.com>
2026-04-20 15:20:25 +08:00
anpeiyun 1a74c8b570 ostest/cancel.c: the return value of EINVAL is acceptable
when pthread_join(), TCB still exists and detached is acceptable, the return value of pthread_join is EINVAL.

Signed-off-by: anpeiyun <anpeiyun@xiaomi.com>
2026-04-20 15:20:25 +08:00
lijianjun 9e412b3960 tools/config_refs.yml: add CONFIG_FS_PROCFS_INCLUDE_PRESSURE check for
lvgl perf

Signed-off-by: lijianjun <lijianjun@xiaomi.com>
2026-04-20 15:20:25 +08:00
fangyibo a650ebfe3e Alsa-lib: fix semaphore leak, resource leak and implicit double promotion
Signed-off-by: fangyibo <fangyibo@xiaomi.com>
2026-04-20 15:20:25 +08:00
fangyibo 8d19eab8e8 Alsa-lib: prefill silence on PREPARED to DRAIN and avoid malloc in drainlastbuffer
https://mi.feishu.cn/docx/EYKpdgrbHo6N6ixZ82ecHhykn7f#share-FqdIdt7LpoBGJ2xKV5tcHTMhnqg

Signed-off-by: fangyibo <fangyibo@xiaomi.com>
2026-04-20 15:20:25 +08:00
ouyangxiangzhen 076d8b9f2d testing/testsuites: Relax the timing assertion.
In QEMU and SIM environments, if the CPU is under high load, the vCPU may not get a time slice to execute, potentially leading to arbitrarily large timer delays and test failures. We have relaxed the timer delay assertion to 1 second, referencing LTP.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-04-20 15:20:25 +08:00
buxiasen 9fc884c5c1 testing/fs/fatutf8: shorten the FOLDER&FILE for default NAME_MAX 32
When NAME_MAX use default 32, the FOLDER_NAME previous length
36 will cause errno ENAMETOOLONG, use a shorter 22 bytes
should enough for test purpose.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2026-04-20 15:20:25 +08:00
fangyibo d06fa6d1d9 Alsa-lib: fix bits/bytes unit mismatch in drain_lastbuffer
Signed-off-by: fangyibo <fangyibo@xiaomi.com>
2026-04-20 15:20:25 +08:00
liuhongchao eb555f070b getevent: fix warnings and minor improvements
1 fix warning assignment discards 'volatile' qualifier from pointer target type
    2 add errno logging
    3 malloc change to calloc

Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2026-04-20 15:20:25 +08:00
buxiasen aa54266611 testing/scanftest: change default path from /mnt to /tmp
It should be more common we have mounted /tmp from tmpfs, and less case
we have /mnt mounted.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2026-04-20 15:20:25 +08:00
wangshaoxin 1d46c28456 nsh_console: Fixed the bug where the process could not be exited using Ctrl+C after redirecting the log.
Signed-off-by: wangshaoxin <wangshaoxin@xiaomi.com>
2026-04-20 15:20:25 +08:00
ouyangxiangzhen e11fd803a6 testing/testsuites: Using clock_gettime(CLOCK_MONOTONIC)
During execution, ntpclient may attempt to synchronize the time, causing incorrect test results. Here, we use CLOCK_MONOTONIC to avoid this problem.
Once the smooth time correction has been implemented, this commit can be reverted.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-04-20 15:20:25 +08:00
shaoboan 941250bf04 Algorithm compilation adaptation
Replace specific path names with BES_DDK to enhance scalability.

Signed-off-by: shaoboan <shaoboan@bestechnic.com>
2026-04-20 15:20:25 +08:00
lijianjun 9852db1468 fix(lvgl): build error when enable lvgl builtin
Signed-off-by: lijianjun <lijianjun@xiaomi.com>
2026-04-20 15:20:25 +08:00
jinxiuxu 32f341be8c pcm_hw: check getbufferinfo return value
Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2026-04-20 15:20:25 +08:00
ligd b8056dad05 testing/ostest: fix format warning in wqueue_workthread_test
Fix format specifier mismatch where work.total_ticks is atomic_t (int)
but PRIu32 expects uint32_t on some platforms.

Add explicit cast to uint32_t and split long line for readability.

Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-20 15:20:24 +08:00
buxiasen d124bf474b ostest/atomic: fix the declare using atomic but reference not use.
When choose not use atomic toolchain, will cause try link with toolchain
atomic version

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2026-04-20 15:20:24 +08:00
v-liuchenxu3 8011a18ac2 clock_nanosleep:add retry mechanism for clock_nanosleep test
Sleep duration may vary due to scheduling overhead. Add 5-retry
loop and pass if at least 3 attempts succeed.

Signed-off-by: v-liuchenxu3 <v-liuchenxu3@xiaomi.com>
2026-04-20 15:20:24 +08:00
fangpeina 78420bc022 nshlib: Add stderr redirection support
This commit implements stderr redirection in HSN, support
Bash-like syntax for redirecting standard error output.
Support both foreground and background commands.

example:
- nsh> ls noexists 2> err.log
- nsh> ls noexists 2> err.log &
- nsh> ls noexists 2>> err.log
- nsh> sh < /dev/ttyS0 > /dev/ttyS0 2> /dev/ttyS1 &
- nsh> sh < /dev/ttyS0 > /dev/ttyS0 2>&1 &

Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2026-04-20 15:20:24 +08:00
v-liuchenxu3 1dd803e2e7 drivertest_rtc: add retry mechanism for RTC API test
RTC time may be overwritten by remote time sync service during
the test. Add 5-retry loop and pass if at least 3 attempts succeed.

Signed-off-by: v-liuchenxu3 <v-liuchenxu3@xiaomi.com>
2026-04-20 15:20:24 +08:00
zhaoxingyu1 90cc6df50f mtdconfig: modify config names for mtdconfig testcases 2
change nvs module testcase name TESTING_MTD_CONFIG_FAIL_SAFE
to TESTING_MTD_CONFIG_NVS and modify the configuration names
related to mtdconfig testing.

Signed-off-by: zhaoxingyu1 <zhaoxingyu1@xiaomi.com>
2026-04-20 15:20:24 +08:00
zhaoxingyu1 b78ebdfd0d system/cfgdata: ajust cfgdata dependency configuration
cfgdata shall depends on !MTD_CONFIG_NONE

Signed-off-by: zhaoxingyu1 <zhaoxingyu1@xiaomi.com>
2026-04-20 15:20:24 +08:00
yangao1 f64730a93f roudrobin.c:improve the priority of test cases
Signed-off-by: yangao1 <yangao1@xiaomi.com>
2026-04-20 15:20:24 +08:00
zhangyuan20 fe663ef352 Android-Vela: rename kernel_modules_headers.
Rootcause: android 15 shoud use apex.

Signed-off-by: zhangyuan20 <zhangyuan20@xiaomi.com>
2026-04-20 15:20:24 +08:00
ouyangxiangzhen 8f6b48627e testing/ltp: Using clock_gettime(CLOCK_MONOTONIC).
During execution, ntpclient may attempt to synchronize the time, causing incorrect test results. Here, we use CLOCK_MONOTONIC to avoid this problem.
Once the smooth time correction has been implemented, this commit can be reverted.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-04-20 15:20:24 +08:00
huojianchao e6a0e8e6a8 testing/syscall: refactor gettimeofday test to handle g_basetime changes
Use CLOCK_MONOTONIC as reference to compare time deltas instead of
comparing absolute gettimeofday values. This avoids false failures
when g_basetime is adjusted by NTP or other time sync services.

- Compare time deltas between gettimeofday and CLOCK_MONOTONIC
- Allow limited basetime adjustments (max 3) before failing
- Fail immediately if CLOCK_MONOTONIC goes backwards
- Fail if gettimeofday delta exceeds CLOCK_MONOTONIC delta

Signed-off-by: huojianchao <huojianchao@xiaomi.com>
2026-04-20 15:20:24 +08:00
fangpeina a06620345c system: Add stty utility for terminal control
This commit adds a systen utily 'stty' to NuttX, providing a standard
Unix-like interface for configuring terminal (TTY) device settings.
The command allows runtime configuration of termios attributes for
serial ports and other character devices.

Usage examples:

  # Set raw mode on ttyS0 (for binary communication)
  nsh> stty -F /dev/ttyS0 raw -echo

  # Set console mode for interactive terminal
  nsh> stty -F /dev/ttyS0 cooked

  # Display current settings
  nsh> stty -F /dev/ttyS0

  # Configure stdin (if it's a TTY)
  nsh> stty echo icanon

  # Set baudrate (if driver support)
  nsh> stty -F /dev/ttyS1 speed 115200

Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2026-04-20 15:20:24 +08:00
yangkun27 621979ddaf apps/tools/Wasm:fix wasm compile error
1.fix compile error 'Unknown CMake command "nuttx_add_dfx_event"'
2.add libgcc support for wasm compile

Signed-off-by: yangkun27 <yangkun27@xiaomi.com>
2026-04-20 15:20:24 +08:00
fangpeina 1903bf29e5 system/readline: Add software echo for normal characters
Background:
Previously, when CONFIG_READLINE_ECHO was enabled, it only handled
special cases like:
- Tab completion output
- Backspace character echo
- VT100 control sequences (e.g., erase to end of line)

Normal character echoing relied entirely on the hardware ECHO flag in
the underlying serial driver (termios).This caused issues when NSH
stdout was redirected to syslog via CONFIG_NSH_ALTSTDOUT="/dev/log":

now no more output interleaving when using syslog redirection.

Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2026-04-20 15:20:24 +08:00
fangyibo af8f9783e3 Alsa-lib: add alsa-lib dump app
Signed-off-by: fangyibo <fangyibo@xiaomi.com>
2026-04-20 15:20:24 +08:00
fangyibo c5bfb1a316 Alsa-lib: fix munmap crash when mmap fail
Signed-off-by: fangyibo <fangyibo@xiaomi.com>
2026-04-20 15:20:23 +08:00
zhangbo56 6e696499bd rexec: import kernel_module_headers for rexec
Signed-off-by: zhangbo56 <zhangbo56@xiaomi.com>
2026-04-20 15:20:23 +08:00
v-lichenxi7 021080c4d0 uorb: Increase the waiting time at the publish end so that the subscrib end has time to process.
Signed-off-by: v-lichenxi7 <v-lichenxi7@xiaomi.com>
2026-04-20 15:20:23 +08:00
anpeiyun ed027aff26 ostest/spinlock.c: donot run spinlock test in TEE SMP
in secure world, only run spinlock test on one core.

Signed-off-by: anpeiyun <anpeiyun@xiaomi.com>
2026-04-20 15:20:23 +08:00
zhengyu16 86c4344d03 system/libarchive: add config of ppmd
Add config of ppmd and default to n.
This saves flash size of about 6K when enabling libarchive.

Signed-off-by: zhengyu16 <zhengyu16@xiaomi.com>
2026-04-20 15:20:23 +08:00
zhengyu16 4c11152a79 system/libarchive: add config which enables error strings
Add a config which enables error strings, and default it to n.
This saves flash size of about 4K when enabling libarchive.

Signed-off-by: zhengyu16 <zhengyu16@xiaomi.com>
2026-04-20 15:20:23 +08:00
fangyibo d47e6dca33 Alsa-lib: close should listen pollerr
POLLIN/POLLOUT may lead to busy in close while loop

Signed-off-by: fangyibo <fangyibo@xiaomi.com>
2026-04-20 15:20:23 +08:00
fangyibo 305e58bf30 Alsa-lib: fix not subtract offset in mmap_begin
avoid over-reading into the next period when offset is non-zero and upper periods more than one

Signed-off-by: fangyibo <fangyibo@xiaomi.com>
2026-04-20 15:20:23 +08:00
zhangyu117 ba045061e9 apps: replace atomic_fetch_xxx with atomic_xxx
Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
2026-04-20 15:20:23 +08:00
ganjing 27baebe125 testing/cmocka: remove redundant argv[0] check in cmocka_main.c
The check comparing argv[0] against CONFIG_TESTING_CMOCKA_PROGNAME
is redundant because:
1. Only one executable (cmocka) is built from this source file
2. The program always has the correct name when invoked properly
3. The check fails incorrectly when using absolute paths or renamed binaries

Signed-off-by: ganjing <ganjing@xiaomi.com>
2026-04-20 15:20:23 +08:00
anpeiyun 8595cc30ff osperf: solve the issue of pthread_cond_signal_switch_performance for SMP
for SMP, the pthread_cond_signal(&perf.cond); will execute before pthread_cond_wait(&perf->cond, &perf->lock);
So the case will block at pthread_join(tid, NULL);

Signed-off-by: anpeiyun <anpeiyun@xiaomi.com>
2026-04-20 15:20:23 +08:00
ganjing dc7aafd532 testing/cmocka: add support for executing ELF test files
Signed-off-by: ganjing <ganjing@xiaomi.com>
2026-04-20 15:20:23 +08:00