Skip to content

Conversation

@txy-21
Copy link
Contributor

@txy-21 txy-21 commented Jan 21, 2026

Summary

This PR contains 10 bug fixes and improvements for the NuttX testing infrastructure, focusing on:

  • Cache test error handling and formatting improvements
  • Timer jitter test signal handling and formatting fixes
  • Network socket test correctness adjustments
  • Syscall test compatibility with fdcheck feature
  • Code quality improvements (removing unnecessary casts)

These changes improve test reliability across different NuttX configurations and ensure tests properly handle optional features like fdcheck and CONFIG_NET_UDP.

Impact

Stability: Improves test reliability by fixing false failures and assertion issues when fdcheck is enabled.

Compatibility: Ensures tests work correctly with various configuration options (fdcheck, CONFIG_NET_UDP).

Code Quality: Removes unnecessary casts and improves error handling in test infrastructure.

Breaking Changes: None - all changes are internal to test infrastructure.

Testing

Test Environment

  • Host: Linux x86_64
  • Configurations: Tested with both fdcheck enabled and disabled
  • Network: Tested with and without CONFIG_NET_UDP

Test Execution

All modified test cases have been verified:

# Cache test
nsh> cachetest
Cache test PASSED

# Timer jitter test  
nsh> timerjitter
Timer jitter test PASSED

# Syscall tests (with fdcheck enabled)
nsh> ostest
Syscall tests: listen, dup2, fsync, setsocketopt01, close - ALL PASSED

# Network socket test
nsh> socktest  
Socket test PASSED

Fix flash dcache helper error handling in cache_test to properly
handle errors when flushing data cache operations fail.

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>
Fix timerjitter output formatting for date/time fields to match
expected format and improve test result readability.

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>
Drop unnecessary casts in driver_audio_test to silence compiler
warnings and improve code clarity.

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>
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>
Handle timer-delivered signals correctly to prevent assertions when
signal-related events occur during timing measurements.

Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
Fix busy-wait scheduler test expectations to avoid false failures
and ensure accurate verification of busy-wait behavior.

Signed-off-by: tengshuangshuang <tengshuangshuang@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>
@txy-21 txy-21 force-pushed the testing-fixes-batch branch from 430abba to e436f02 Compare January 21, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants