Specify architecture format in Kconfig to ensure proper configuration
handling for different architectures in testing modules.
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
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>
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>
Fix dependency issue when signals are partially or fully enabled
Co-authored-by: guoshichao <guoshichao@xiaomi.com>
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
BREAKING CHANGE
This commit introduces a Kconfig switch to include the cmocka binary
built from cmocka_main.c. The default behaviour is now changed so that
cmocka is built as a library only, which would be the desired behaviour
for users creating their own cmocka projects.
To restore the old behaviour (where the cmocka program is compiled), add
CONFIG_TESTING_CMOCKA_PROG=y to your legacy configuration.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Introduces a collection of unit tests for NuttX, built on top of the
cmocka framework. Tests are organized into suites/groups which can be
individually included/excluded from the build using Kconfig. Output is
easily legible and separated with headers including the test group name.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
The current code incorrectly used the CONFIG_SCHED_EVENTS
macro in ostest.h for hrtimer_test(). This has been corrected to use CONFIG_HRTIMER.
Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
Add functional tests for the newly added hrtimer APIs,
including hrtimer_init(), hrtimer_start(), and hrtimer_cancel().
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
During the discussion about the impact of adding counter to TCB
Mr anchao created a pthread mutex performance example:
https://github.com/apache/nuttx/pull/17468#issuecomment-3660925314
Because this example can exercise (not ideally) the pthread mutex
I decided to add it to apps/testing/sched, the program name will
be called "pmutexp" (because "pmp" is not a good name).
Signed-off-by: Alan C. Assis <acassis@gmail.com>
getTimeofday_test.c:68:22: error: variable 'cnt' set but not used [-Werror,-Wunused-but-set-variable]
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
If we set CONFIG_SMP_DEFAULT_CPUSET=1
This will cause the value of cpuset to be 0x1,
((1 << CONFIG_SMP_NCPUS) - 1) will result in the cpuset being 0x11,
leading to test case errors.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Before patch we never detect the roundrobin fail.
After patch use a array to detect if the calculation swapped when
processing.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
fix cmake build for cmoka:
[2/9] No update step for 'cmocka_fetch-populate'
[3/9] Performing patch step for 'cmocka_fetch-populate'
can't find file to patch at input line 16
Perhaps you used the wrong -p or --strip option?
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
https://github.com/apache/nuttx/pull/17293 fixed
wd_start bug, and this patch fixed the related ostest
accordingly
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
fix compilation error:
kernel/socket/cases/net_socket_test_010.c: In function ‘ioctltestinternal’:
kernel/socket/cases/net_socket_test_010.c:188:20: error: ‘siocgifname’ undeclared (first use in this function)
188 | ret = ioctl(sfd, siocgifname, &ifr);
Signed-off-by: raiden00pl <raiden00@railab.me>
Remove the previous guard logic and use a proper CMake
`exclude` rule to prevent `cxx-oot-build` from being
included when building projects with CMake.
* Ensures OOT test project is not pulled into normal apps.
* Keeps CI and export tests isolated from regular builds.
Signed-off-by: trns1997 <trns1997@gmail.com>
Add the source content for the out-of-tree build test
under `apps/testing/cxx-oot-build`. This supports the
new CI check in NuttX to prevent regressions in the
`make export` workflow.
The test project provides:
* Sample OOT build structure.
* Integration with exported `nuttx-export`.
* Verification of successful build and link.
Signed-off-by: trns1997 <trns1997@gmail.com>
The strlen function called by kasantest will be optimized by the compiler, and the strlen function implemented in NX will not be called. Adding -fno-builtin can solve the problem.
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>