Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
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
5config MODULES
6 bool "Enable loadable module support"
7 modules
8 default y
9
10# Basic migration tests for all types
11config NEW_BOOL
12 bool "New bool option"
13 default OLD_BOOL
14
15config OLD_BOOL
16 bool
17 transitional
18
19config NEW_TRISTATE
20 tristate "New tristate option"
21 default OLD_TRISTATE
22
23config OLD_TRISTATE
24 tristate
25 transitional
26
27config NEW_STRING
28 string "New string option"
29 default OLD_STRING
30
31config OLD_STRING
32 string
33 transitional
34
35config NEW_HEX
36 hex "New hex option"
37 default OLD_HEX
38
39config OLD_HEX
40 hex
41 transitional
42
43config NEW_INT
44 int "New int option"
45 default OLD_INT
46
47config OLD_INT
48 int
49 transitional
50
51# Precedence tests for all types
52config NEW_BOOL_PRECEDENCE
53 bool "New bool option with precedence"
54 default OLD_BOOL_PRECEDENCE
55
56config OLD_BOOL_PRECEDENCE
57 bool
58 transitional
59
60config NEW_STRING_PRECEDENCE
61 string "New string option with precedence"
62 default OLD_STRING_PRECEDENCE
63
64config OLD_STRING_PRECEDENCE
65 string
66 transitional
67
68config NEW_TRISTATE_PRECEDENCE
69 tristate "New tristate option with precedence"
70 default OLD_TRISTATE_PRECEDENCE
71
72config OLD_TRISTATE_PRECEDENCE
73 tristate
74 transitional
75
76config NEW_HEX_PRECEDENCE
77 hex "New hex option with precedence"
78 default OLD_HEX_PRECEDENCE
79
80config OLD_HEX_PRECEDENCE
81 hex
82 transitional
83
84config NEW_INT_PRECEDENCE
85 int "New int option with precedence"
86 default OLD_INT_PRECEDENCE
87
88config OLD_INT_PRECEDENCE
89 int
90 transitional
91
92# Test that help sections are allowed for transitional symbols
93config 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
100config NEW_DISABLED
101 tristate "Check for setting to disabled"
102 default OLD_DISABLED
103
104config OLD_DISABLED
105 tristate
106 transitional
107
108# Test that a potential new value disappears if it lacks a prompt
109config NEW_DISABLED_UNSAVED
110 tristate
111 default OLD_DISABLED
112
113config 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'
119config DEPENDENCY_TEST
120 bool "Dependency for testing"
121 default n
122
123config NEW_CONDITIONAL_DEFAULT
124 bool "New option with conditional default"
125 default OLD_CONDITIONAL_DEFAULT if DEPENDENCY_TEST
126
127config OLD_CONDITIONAL_DEFAULT
128 bool
129 transitional
130
131config REGULAR_OPTION
132 bool "Regular option"