Kconfig 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. # SPDX-License-Identifier: GPL-2.0
  2. # Test transitional symbols for config migration with all Kconfig types
  3. # Enable module support for tristate testing
  4. config MODULES
  5. bool "Enable loadable module support"
  6. modules
  7. default y
  8. # Basic migration tests for all types
  9. config NEW_BOOL
  10. bool "New bool option"
  11. default OLD_BOOL
  12. config OLD_BOOL
  13. bool
  14. transitional
  15. config NEW_TRISTATE
  16. tristate "New tristate option"
  17. default OLD_TRISTATE
  18. config OLD_TRISTATE
  19. tristate
  20. transitional
  21. config NEW_STRING
  22. string "New string option"
  23. default OLD_STRING
  24. config OLD_STRING
  25. string
  26. transitional
  27. config NEW_HEX
  28. hex "New hex option"
  29. default OLD_HEX
  30. config OLD_HEX
  31. hex
  32. transitional
  33. config NEW_INT
  34. int "New int option"
  35. default OLD_INT
  36. config OLD_INT
  37. int
  38. transitional
  39. # Precedence tests for all types
  40. config NEW_BOOL_PRECEDENCE
  41. bool "New bool option with precedence"
  42. default OLD_BOOL_PRECEDENCE
  43. config OLD_BOOL_PRECEDENCE
  44. bool
  45. transitional
  46. config NEW_STRING_PRECEDENCE
  47. string "New string option with precedence"
  48. default OLD_STRING_PRECEDENCE
  49. config OLD_STRING_PRECEDENCE
  50. string
  51. transitional
  52. config NEW_TRISTATE_PRECEDENCE
  53. tristate "New tristate option with precedence"
  54. default OLD_TRISTATE_PRECEDENCE
  55. config OLD_TRISTATE_PRECEDENCE
  56. tristate
  57. transitional
  58. config NEW_HEX_PRECEDENCE
  59. hex "New hex option with precedence"
  60. default OLD_HEX_PRECEDENCE
  61. config OLD_HEX_PRECEDENCE
  62. hex
  63. transitional
  64. config NEW_INT_PRECEDENCE
  65. int "New int option with precedence"
  66. default OLD_INT_PRECEDENCE
  67. config OLD_INT_PRECEDENCE
  68. int
  69. transitional
  70. # Test that help sections are allowed for transitional symbols
  71. config OLD_WITH_HELP
  72. bool
  73. transitional
  74. help
  75. This transitional symbol has a help section to validate that help is allowed.
  76. # Test that we can set something to =n via transitional symbol
  77. config NEW_DISABLED
  78. tristate "Check for setting to disabled"
  79. default OLD_DISABLED
  80. config OLD_DISABLED
  81. tristate
  82. transitional
  83. # Test that a potential new value disappears if it lacks a prompt
  84. config NEW_DISABLED_UNSAVED
  85. tristate
  86. default OLD_DISABLED
  87. config OLD_DISABLED_UNSAVED
  88. tristate
  89. transitional
  90. # Test conditional default: transitional value should not prevent prompting
  91. # when default visibility makes the expression evaluate to 'no'
  92. config DEPENDENCY_TEST
  93. bool "Dependency for testing"
  94. default n
  95. config NEW_CONDITIONAL_DEFAULT
  96. bool "New option with conditional default"
  97. default OLD_CONDITIONAL_DEFAULT if DEPENDENCY_TEST
  98. config OLD_CONDITIONAL_DEFAULT
  99. bool
  100. transitional
  101. config REGULAR_OPTION
  102. bool "Regular option"