- crypto/mbedtls: Add -Wno-cpp flag to suppress warnings
- interpreters/quickjs: Add flags to suppress warnings
- lte/alt1250: Fix spelling issues in comments
- system/dd: Add missing includes for modern compilers
- system/zlib: Add -Wno-cpp flag
- testing/cxx: Include missing algorithm header
Signed-off-by: Bartosz <bartol2205@gmail.com>
Fix buffer offset calculation in ymodem_send_buffer() to correctly
handle partial writes by advancing the buffer pointer and adjusting
the remaining size on each retry.
Signed-off-by: fangpeina <fangpeina@xiaomi.com>
To replace the large lock with smaller ones and reduce the large locks related to the TCB,
in many scenarios, we only need to ensure that the TCB won't be released
instead of locking, thus reducing the possibility of lock recursion.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Fixes a bug where newfd is not properly closed when newfd[0] equals newfd[1].
This can cause file descriptor leaks in certain edge cases where the read
and write sides of the pipe are duplicated.
Signed-off-by: hongfengchen <hongfengchen@xiaomi.com>
There are three bug in fifo testcase.
1. line 211 and line 295 should be nbytes not ret.
2. coverity report error:
CID 1667262: (#4 of 11): Double close (USE_AFTER_FREE)
11. double_close: Calling close(int) will close the handle fd that has already been closed. [Note: The source code implementation of this function has been overwritten by the built-in model.]
Double close will ocurr when line 234 is true and goto line 341, close again!
Now, Using the previous code logic, Use a tid and an errout_with_null_thread to avoid uninitialized problems.
3. since line 295 is used ret not nbytes, error not expose before.
When the end of read and write are opened, end of write will write successfully even if end of read not read.
Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
This test depends on !DISABLE_POSIX_TIMERS.
arm-none-eabi/bin/ld:
apps/examples/popen/libapps_popen.a(popen_main.c.obj):
in function `popen_main':
apps/examples/popen/popen_main.c:62:(.text.popen_main+0x1c):
undefined reference to `timer_create'
Signed-off-by: yukangzhi <yukangzhi@xiaomi.com>
Skip UDP listen test when CONFIG_NET_UDP is disabled to prevent
test failures on configurations without UDP support.
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Handle fdcheck path for badfd test to prevent unexpected dumps when
fdcheck is enabled, allowing proper testing of bad file descriptor
error cases.
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Guard fdcheck-sensitive paths in setsocketopt, dup2, and fsync tests
to avoid assertion failures when fdcheck is enabled, ensuring tests
can properly verify error handling behavior.
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Drop unnecessary casts in driver_audio_test to silence compiler
warnings and improve code clarity.
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Adjust net socket test expectations for correct behavior to prevent
false test failures in network socket test cases.
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Fix timerjitter output formatting for date/time fields to match
expected format and improve test result readability.
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Correct date formatting in cache_test and arch_lib_test outputs to
ensure consistent date/time display format across test results.
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Specify architecture format in Kconfig to ensure proper configuration
handling for different architectures in testing modules.
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Remove the extra rngctx parameter from SSL_CTX_new() to match
the standard OpenSSL API signature:
SSL_CTX *SSL_CTX_new(const SSL_METHOD *method)
This improves compatibility with code written for OpenSSL.
Signed-off-by: makejian <makejian@xiaomi.com>
Map mbedtls error codes to OpenSSL standard return codes in
SSL_connect/SSL_do_handshake:
- Return 1 on success
- Return 0 on controlled shutdown
- Return -1 on fatal error (was returning mbedtls error codes)
This aligns the return values with OpenSSL specification where
SSL_get_error() should be called to get the actual error reason.
Signed-off-by: makejian <makejian@xiaomi.com>
Export SSL_CTX_load_verify_file() and SSL_CTX_load_verify_dir()
interfaces to allow loading CA certificates from file or directory.
Signed-off-by: makejian <makejian@xiaomi.com>
Change FPU benchmark timing from seconds to milliseconds for better accuracy.
This allows for more precise measurement of test cycles, especially for
shorter test runs that previously completed within a single second.
Signed-off-by: makejian <makejian@xiaomi.com>
Add the Whetstone floating-point benchmark to NuttX applications.
The Whetstone benchmark is a widely-used tool for evaluating FPU
(floating-point unit) performance.
This benchmark is ported from netlib.org whetstone.c which has a
custom permissive license requiring attribution. Therefore it
depends on ALLOW_CUSTOM_PERMISSIVE_COMPONENTS.
Usage: whetstone [loops]
Signed-off-by: makejian <makejian@xiaomi.com>
NNG depends on options that, if not enabled, makes compilation or
runtime crashes. Noting these options in help helps to find out which
are such options.
Signed-off-by: Jiri Vlasak <jvlasak@elektroline.cz>
fix:
Building NuttX...
/d/a/nuttx-apps/nuttx-apps/sources/apps/Application.mk:238: target 'signest.c.d.a.nuttx-apps.nuttx- apps.sources.apps.testing.ostest.o' given more than once in the same rule
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Merge the cu.h header file contents into cu_main.c to simplify the
code structure. The cu_globals_s structure and related definitions
are now directly in cu_main.c.
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
The sigint() function uses siginfo->si_user but was declared with
only one parameter (int sig). This causes compilation error because
siginfo is undeclared.
Fix by:
1. Rename sigint to cu_exit with proper sigaction signature
2. Use sa_sigaction instead of sa_handler to receive siginfo_t
3. Pass cu pointer via sa.sa_user for signal handler access
Signed-off-by: makejian <makejian@xiaomi.com>
standardize the implementation of ping6 to better comply with socket
permissions on certain systems.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This assertion should be removed because the POLLIN event is now only
raised when there is data pending to be received. Previously, POLLIN
was incorrectly set as soon as the connection was established, even
when no data was available, which was not consistent with the expected
behavior.
Signed-off-by: guanyi3 <guanyi3@xiaomi.com>
When we support the watchdog interrupt on the Armv7-A platform with
the TEE enabled, the watchdog interrupt needs to be configured as
a FIQ to avoid the impact of interrupt disabling in the AP.
In this case, the drivertest_watchdog_api testcase cannot pass the
test in such a scenario.
This is because the drivertest_watchdog_api itself requires
calling a specified callback after the watchdog interrupt is
triggered, instead of directly dumping the AP's context and
then asserting the system.
Therefore, when both CONFIG_ARCH_ARMV7A and CONFIG_ARCH_HAVE_TRUSTZONE
are enabled, we need to skip the current drivertest_watchdog_api
testcase.
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
Add UNIX platform flag to tinycrypto build configuration to enable access to /dev/random for secure random number generation.
Signed-off-by: makejian <makejian@xiaomi.com>