summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/tests/choice
diff options
context:
space:
mode:
authorCheng Lingfei <chenglingfei@foxmail.com>2026-08-24 20:45:46 +0800
committerTejun Heo <tj@kernel.org>2026-08-24 06:55:59 -1000
commit909a3f0e9d8b0d8001cf6e99808f88eca8e44328 (patch)
treebe05d18bd5619b55ff3b30f28a292907021768ee /scripts/kconfig/tests/choice
downloadlinux-stable-909a3f0e9d8b0d8001cf6e99808f88eca8e44328.tar.gz
linux-stable-909a3f0e9d8b0d8001cf6e99808f88eca8e44328.zip
docs: cgroup-v2: fix misc.events key format descriptiongrafted
In misc cgroup, misc.events does not output a simple "max" key. Instead, each registered misc resource outputs a separate key suffixed with ".max" (i.e., "<res>.max"). Update the documentation to clarify that the entry key is "<res>.max". Suggested-by: Michal Koutný <mkoutny@suse.com> Signed-off-by: Cheng Lingfei <chenglingfei@foxmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'scripts/kconfig/tests/choice')
-rw-r--r--scripts/kconfig/tests/choice/Kconfig13
-rw-r--r--scripts/kconfig/tests/choice/__init__.py29
-rw-r--r--scripts/kconfig/tests/choice/alldef_expected_config2
-rw-r--r--scripts/kconfig/tests/choice/allmod_expected_config2
-rw-r--r--scripts/kconfig/tests/choice/allno_expected_config2
-rw-r--r--scripts/kconfig/tests/choice/allyes_expected_config2
-rw-r--r--scripts/kconfig/tests/choice/oldask0_expected_stdout4
7 files changed, 54 insertions, 0 deletions
diff --git a/scripts/kconfig/tests/choice/Kconfig b/scripts/kconfig/tests/choice/Kconfig
new file mode 100644
index 000000000..cd252579a
--- /dev/null
+++ b/scripts/kconfig/tests/choice/Kconfig
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: GPL-2.0
+
+choice
+ prompt "boolean choice"
+ default BOOL_CHOICE1
+
+config BOOL_CHOICE0
+ bool "choice 0"
+
+config BOOL_CHOICE1
+ bool "choice 1"
+
+endchoice
diff --git a/scripts/kconfig/tests/choice/__init__.py b/scripts/kconfig/tests/choice/__init__.py
new file mode 100644
index 000000000..0fc7bf9b5
--- /dev/null
+++ b/scripts/kconfig/tests/choice/__init__.py
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: GPL-2.0
+"""
+Basic choice tests.
+"""
+
+
+def test_oldask0(conf):
+ assert conf.oldaskconfig() == 0
+ assert conf.stdout_contains('oldask0_expected_stdout')
+
+
+def test_allyes(conf):
+ assert conf.allyesconfig() == 0
+ assert conf.config_contains('allyes_expected_config')
+
+
+def test_allmod(conf):
+ assert conf.allmodconfig() == 0
+ assert conf.config_contains('allmod_expected_config')
+
+
+def test_allno(conf):
+ assert conf.allnoconfig() == 0
+ assert conf.config_contains('allno_expected_config')
+
+
+def test_alldef(conf):
+ assert conf.alldefconfig() == 0
+ assert conf.config_contains('alldef_expected_config')
diff --git a/scripts/kconfig/tests/choice/alldef_expected_config b/scripts/kconfig/tests/choice/alldef_expected_config
new file mode 100644
index 000000000..b359a2e64
--- /dev/null
+++ b/scripts/kconfig/tests/choice/alldef_expected_config
@@ -0,0 +1,2 @@
+# CONFIG_BOOL_CHOICE0 is not set
+CONFIG_BOOL_CHOICE1=y
diff --git a/scripts/kconfig/tests/choice/allmod_expected_config b/scripts/kconfig/tests/choice/allmod_expected_config
new file mode 100644
index 000000000..b359a2e64
--- /dev/null
+++ b/scripts/kconfig/tests/choice/allmod_expected_config
@@ -0,0 +1,2 @@
+# CONFIG_BOOL_CHOICE0 is not set
+CONFIG_BOOL_CHOICE1=y
diff --git a/scripts/kconfig/tests/choice/allno_expected_config b/scripts/kconfig/tests/choice/allno_expected_config
new file mode 100644
index 000000000..b359a2e64
--- /dev/null
+++ b/scripts/kconfig/tests/choice/allno_expected_config
@@ -0,0 +1,2 @@
+# CONFIG_BOOL_CHOICE0 is not set
+CONFIG_BOOL_CHOICE1=y
diff --git a/scripts/kconfig/tests/choice/allyes_expected_config b/scripts/kconfig/tests/choice/allyes_expected_config
new file mode 100644
index 000000000..b359a2e64
--- /dev/null
+++ b/scripts/kconfig/tests/choice/allyes_expected_config
@@ -0,0 +1,2 @@
+# CONFIG_BOOL_CHOICE0 is not set
+CONFIG_BOOL_CHOICE1=y
diff --git a/scripts/kconfig/tests/choice/oldask0_expected_stdout b/scripts/kconfig/tests/choice/oldask0_expected_stdout
new file mode 100644
index 000000000..80ec34c61
--- /dev/null
+++ b/scripts/kconfig/tests/choice/oldask0_expected_stdout
@@ -0,0 +1,4 @@
+boolean choice
+ 1. choice 0 (BOOL_CHOICE0) (NEW)
+> 2. choice 1 (BOOL_CHOICE1) (NEW)
+choice[1-2?]: