Integrate up_perf_gettime() test into ostest suite with comprehensive
test coverage including monotonicity verification, interval statistics,
and frequency validation. The test verifies performance event counter
functionality across 5 independent test cases with proper error handling.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
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>
Move NIST Statistical Test Suite (nist-sts) testing module from testing/drivers/
into testing/drivers/rng/ directory to better organize RNG (random number generator)
related tests that utilize /dev/random device.
Changes:
- Create testing/drivers/rng/ directory structure
- Move nist-sts from testing/drivers/ to testing/drivers/rng/nist-sts
- Update build configuration file paths:
- CMakeLists.txt
- Makefile
- Make.defs
- Maintain all test patches and Kconfig settings
Signed-off-by: makejian <makejian@xiaomi.com>
Reduce TEST_NUM from 1000 to 100 in fs_opendir_test.c
Reduce loop count from 100 to 30 in fs_stream_test.c
Signed-off-by: wangxingxing <wangxingxing@xiaomi.com>
Remove unnecessary usleep(1000) in the read thread of eventfd test.
The eventfd read operation will block and wait for data naturally via semaphore, no additional delay is needed.
Signed-off-by: wangxingxing <wangxingxing@xiaomi.com>
Replace sleep() with pthread_join() to properly wait for the child thread to finish, avoiding orphan threads.
Change sleep(1) to usleep(1000) to reduce test time while maintaining synchronization.
Fix loop iteration count mismatch between reader thread (6 iterations) and writer (5 iterations).
Signed-off-by: ligd <liguiding1@xiaomi.com>
Fix file descriptor leak issue where fd was stored in test_state for deferred close, but could fail when CONFIG_FDCHECK is enabled because fd cannot be closed in a different thread.
Signed-off-by: guohao15 <guohao15@xiaomi.com>
Since the kernel spinlocks can only work in flat mode, this commit
allowed spinlock_test only in flat mode.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit refactored the spinlock test for better accuracy and
minimized jitters introduced by scheduling.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
When expanding the macro VERIY, (0 == pthread_barrier_wait(¶m->pub->barrier)) < 0 always false.
Regardless of the value of its operands.
Signed-off-by: anpeiyun <anpeiyun@xiaomi.com>
On QEMU, if vcpus are preempted by other threads, the deviation of the
timer might be very large, causing assertion failure. This commit
addressed the problem.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
If we updated `callback_cnt` before the `triggered_tick` in the wdog timer callback, the `wdtest_rand` might failed randomly. This commit fixed the synchronizing bug by swapping the execution order of updating.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit increased the default interval of the timerjitter to avoid errors with large USEC_PER_TICK setting.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit fixed the wrong-test case where the time is acquired after
the timer being set, leading to the assertion failure.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
On QEMU, if vcpus are preempted by other threads, the deviation of the
timer might be very large, causing assertion failure. This commit
addressed the problem.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
On SIM and QEMU, it is inevitable that the simulating vCPU got preempted
by other threads, causing large timing delay. This commit relax the timing
constraints to reduce the CT error.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
On QEMU, if vcpus are preempted by other threads, the deviation of the
timer might be very large, causing assertion failure. This commit
addressed the problem.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
Since sim and qemu are not cycle accurate simulators, if the vCPU thread is preempted by other high priority tasks, it may cause timing issues. This is easy to happen when the test machine is busy. This commit modifies the condition of timing error and prints out the latency as a warning.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
Initialize the flags variable to 0 to fix compiler warning about
potential use of uninitialized variable. The flags variable is
conditionally assigned in wdtest_rand() based on callback count.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
remove test_state of fs test cases
Removes unnecessary test_state structure usage for tracking file descriptors
Adds missing close(newfd) call in fs_dup_test.c to prevent file descriptor leaks
Simplifies test code by eliminating redundant fd tracking that could lead to incorrect resource management
Signed-off-by: wangxingxing <wangxingxing@xiaomi.com>
Fix cast from pointer to integer of different size to ensure
proper type conversion and avoid compilation warnings.
Signed-off-by: hongfengchen <hongfengchen@xiaomi.com>
Add unistd.h header file to drivertest_touchpanel.c to fix missing
sleep/usleep function declarations in touchpanel driver tests.
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Add unistd.h and pthread.h for memorystress_main.c, unistd.h for
dhm.c and cachetest_main.c, and pthread.h for kv_test_019.c to fix
missing declarations.
Signed-off-by: hongfengchen <hongfengchen@xiaomi.com>
Add malloc.h header file to fstest.h to fix missing malloc/free
function declarations in filesystem test suites.
Signed-off-by: hongfengchen <hongfengchen@xiaomi.com>
Inline enter_critical_section function calls in performance-critical
paths to reduce function call overhead while maintaining consistent
semantics, improving overall system latency and responsiveness in
real-time scenarios.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
- 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>
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>