Kconfig 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. menu "Network"
  2. config RT_UTEST_TC_USING_SAL
  3. select RT_USING_SAL
  4. bool "SAL Unit Testcase"
  5. default n
  6. menuconfig RT_UTEST_TC_USING_NETDEV
  7. select RT_USING_NETDEV
  8. bool "Netdev API Test"
  9. help
  10. Enable netdev network device framework unit tests.
  11. Test coverage includes:
  12. * Network connectivity (ping operations)
  13. * DHCP functionality (enable/disable/restore)
  14. * DNS configuration and hostname resolution
  15. * Interface configuration (IP/gateway/netmask)
  16. * IP address conversion functions
  17. * Device retrieval and management
  18. * Status control and callback mechanisms
  19. if RT_UTEST_TC_USING_NETDEV
  20. config RT_UTEST_DEFAULT_NETDEV_NAME
  21. string "Default Netdev Name"
  22. default "e0"
  23. help
  24. Network interface name for tests. Common values:
  25. "e0" (Ethernet), "w0" (Wireless).
  26. Ensure the device exists in your environment.
  27. endif
  28. menuconfig RT_UTEST_TC_USING_LWIP
  29. select RT_USING_LWIP
  30. select RT_LWIP_NETIF_LOOPBACK
  31. bool "lwIP Unit Testcase"
  32. default n
  33. help
  34. Enable lwIP network stack unit tests including DNS resolution,
  35. TCP/UDP socket operations, and network interface tests
  36. if RT_UTEST_TC_USING_LWIP
  37. config RT_UTEST_LWIP_DNS_TEST
  38. bool "DNS Resolution Test"
  39. default y
  40. help
  41. Enable DNS resolution unit tests including gethostbyname()
  42. and gethostbyname_r() functions for hostname to IP resolution,
  43. as well as getaddrinfo() and freeaddrinfo() for address info
  44. retrieval and release. Tests verify successful resolution
  45. without hardcoded IP comparisons.
  46. config RT_UTEST_LWIP_TCP_TEST
  47. bool "TCP Socket Test"
  48. default y
  49. help
  50. Enable TCP socket unit tests including client-server communication
  51. with echo functionality, socket creation, binding, listening,
  52. accepting connections, data transmission with varying buffer sizes,
  53. socket options (TCP_NODELAY, SO_REUSEADDR, SO_REUSEPORT),
  54. and connection management (shutdown, close).
  55. config RT_UTEST_LWIP_UDP_TEST
  56. bool "UDP Socket Test"
  57. default y
  58. help
  59. Enable UDP socket unit tests including datagram transmission
  60. and reception, client-server echo communication, socket binding
  61. to any port, select() operations with timeout, recvfrom/sendto
  62. functions, and timeout handling for receive operations.
  63. config RT_UTEST_LWIP_ICMP_TEST
  64. bool "ICMP Ping Test"
  65. default y
  66. help
  67. Enable ICMP ping unit tests using raw sockets to send
  68. ICMP echo requests and receive echo replies. Tests verify
  69. basic ICMP functionality with loopback address (127.0.0.1).
  70. config RT_UTEST_LWIP_SOCKET_OPT_TEST
  71. bool "Socket Options Test"
  72. default y
  73. help
  74. Enable socket options unit tests including setsockopt()
  75. and getsockopt() functions. Tests verify setting and
  76. retrieving socket options such as SO_REUSEADDR.
  77. config RT_UTEST_LWIP_ADDR_CONV_TEST
  78. bool "Address Conversion Test"
  79. default y
  80. help
  81. Enable address conversion unit tests including inet_addr()
  82. for converting string IP addresses to binary format and
  83. inet_ntoa() for converting binary addresses back to strings.
  84. Tests verify proper conversion functionality.
  85. config RT_UTEST_LWIP_NETIF_TEST
  86. bool "Network Interface Management Test"
  87. default y
  88. help
  89. Enable network interface management unit tests including
  90. netif_set_up(), netif_set_down(), and netif_set_default()
  91. functions. Tests verify interface state changes and
  92. default interface configuration.
  93. config RT_UTEST_LWIP_TCP_PORT
  94. int "TCP Test Port"
  95. default 1234
  96. range 1024 65535
  97. help
  98. Configure the TCP port number for unit test communication.
  99. Must be in the range 1024-65535 to avoid system ports
  100. config RT_UTEST_LWIP_UDP_PORT
  101. int "UDP Test Port"
  102. default 1235
  103. range 1024 65535
  104. help
  105. Configure the UDP port number for unit test communication.
  106. Must be in the range 1024-65535 to avoid system ports
  107. config RT_UTEST_LWIP_TEST_URL
  108. string "Test Domain Name"
  109. default "www.rt-thread.org"
  110. help
  111. Configure the domain name for DNS resolution tests.
  112. This domain will be resolved to verify DNS functionality
  113. config RT_UTEST_LWIP_TEST_ADDR
  114. string "Expected IP Address"
  115. default "180.163.146.111"
  116. help
  117. Configure the expected IP address for DNS resolution verification.
  118. This should match the actual IP of the test domain
  119. endif
  120. endmenu