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