Kconfig 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. if RT_USING_LWIP
  2. menu "LwIP Network Unit Testcase"
  3. config RT_UTEST_TC_USING_LWIP
  4. bool "lwIP API test"
  5. help
  6. Enable lwIP network stack unit tests including DNS resolution,
  7. TCP/UDP socket operations, and network interface tests
  8. if RT_UTEST_TC_USING_LWIP
  9. config RT_UTEST_LWIP_DNS_TEST
  10. bool "DNS resolution test"
  11. default y
  12. help
  13. Enable DNS resolution unit tests including gethostbyname()
  14. and gethostbyname_r() functions for hostname to IP resolution,
  15. as well as getaddrinfo() and freeaddrinfo() for address info
  16. retrieval and release. Tests verify successful resolution
  17. without hardcoded IP comparisons.
  18. config RT_UTEST_LWIP_TCP_TEST
  19. bool "TCP socket test"
  20. default y
  21. help
  22. Enable TCP socket unit tests including client-server communication
  23. with echo functionality, socket creation, binding, listening,
  24. accepting connections, data transmission with varying buffer sizes,
  25. socket options (TCP_NODELAY, SO_REUSEADDR, SO_REUSEPORT),
  26. and connection management (shutdown, close).
  27. config RT_UTEST_LWIP_UDP_TEST
  28. bool "UDP socket test"
  29. default y
  30. help
  31. Enable UDP socket unit tests including datagram transmission
  32. and reception, client-server echo communication, socket binding
  33. to any port, select() operations with timeout, recvfrom/sendto
  34. functions, and timeout handling for receive operations.
  35. config RT_UTEST_LWIP_ICMP_TEST
  36. bool "ICMP ping test"
  37. default y
  38. help
  39. Enable ICMP ping unit tests using raw sockets to send
  40. ICMP echo requests and receive echo replies. Tests verify
  41. basic ICMP functionality with loopback address (127.0.0.1).
  42. config RT_UTEST_LWIP_SOCKET_OPT_TEST
  43. bool "Socket options test"
  44. default y
  45. help
  46. Enable socket options unit tests including setsockopt()
  47. and getsockopt() functions. Tests verify setting and
  48. retrieving socket options such as SO_REUSEADDR.
  49. config RT_UTEST_LWIP_ADDR_CONV_TEST
  50. bool "Address conversion test"
  51. default y
  52. help
  53. Enable address conversion unit tests including inet_addr()
  54. for converting string IP addresses to binary format and
  55. inet_ntoa() for converting binary addresses back to strings.
  56. Tests verify proper conversion functionality.
  57. config RT_UTEST_LWIP_NETIF_TEST
  58. bool "Network interface management test"
  59. default y
  60. help
  61. Enable network interface management unit tests including
  62. netif_set_up(), netif_set_down(), and netif_set_default()
  63. functions. Tests verify interface state changes and
  64. default interface configuration.
  65. config RT_UTEST_LWIP_TCP_PORT
  66. int "TCP test port"
  67. default 1234
  68. range 1024 65535
  69. help
  70. Configure the TCP port number for unit test communication.
  71. Must be in the range 1024-65535 to avoid system ports
  72. config RT_UTEST_LWIP_UDP_PORT
  73. int "UDP test port"
  74. default 1235
  75. range 1024 65535
  76. help
  77. Configure the UDP port number for unit test communication.
  78. Must be in the range 1024-65535 to avoid system ports
  79. config RT_UTEST_LWIP_TEST_URL
  80. string "Test domain name"
  81. default "www.rt-thread.org"
  82. help
  83. Configure the domain name for DNS resolution tests.
  84. This domain will be resolved to verify DNS functionality
  85. config RT_UTEST_LWIP_TEST_ADDR
  86. string "Expected IP address"
  87. default "180.163.146.111"
  88. help
  89. Configure the expected IP address for DNS resolution verification.
  90. This should match the actual IP of the test domain
  91. endif
  92. endmenu
  93. endif