kgdb: allow static kgdbts boot configuration
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 21 lines · On Fri, 18 Apr 2008 19:00:57 GMT Linux Kernel Mailing List…
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=974460c5bfd9f6c38aa3dda189a63f9fc351035f Commit: 974460c5bfd9f6c38aa3dda189a63f9fc351035f Parent: e3e2aaf7dc0d82a055e084cfd48b9257c0c66b68 Author: Jason Wessel <[email protected]> AuthorDate: Thu Mar 20 13:43:44 2008 -0500 Committer: Ingo Molnar <[email protected]> CommitDate: Thu Apr 17 20:05:43 2008 +0200kgdb: allow static kgdbts boot configuration
This patch adds in the ability to compile the kgdb internal test string into the kernel so as to run the tests at boot without changing the kernel boot arguments. This patch also changes all the error paths to invoke
WARN_ON(1)which will emit the line number of the file and dump the kernel stack when an error occurs.You can disable the tests in a kernel that is built this way using "kgdbts="
...
Review
Quoted 5 lines
(quoted diff) +4
-0+#ifdef CONFIG_KGDB_TESTS_BOOT_STRING +static char config[MAX_CONFIG_LEN] = CONFIG_KGDB_TESTS_BOOT_STRING; +#else static char config[MAX_CONFIG_LEN]; +#endif
I expect that CONFIG_KGDB_TESTS_BOOT_STRING is always defined here. Or if not, that it is possible to arrange for that with sufficient Kconfig cleverness. If so, the ifdef shouldn't be needed.
Quoted 7 lines
(quoted diff) +7
-0+config KGDB_TESTS_ON_BOOT + bool "KGDB: Run tests on boot" + depends on KGDB_TESTS + default n + help + Run the kgdb tests on boot up automatically without the need + to pass in a kernel parameter
Review
Quoted 10 lines
(quoted diff) +10
-0+ +config KGDB_TESTS_BOOT_STRING + string "KGDB: which internal kgdb tests to run" + depends on KGDB_TESTS_ON_BOOT + default "V1F100" + help + This is the command string to send the kgdb test suite on + boot. See the drivers/misc/kgdbts.c for detailed + information about other strings you could use beyond the + default of V1F100.
I dunno. Do we *really* need this feature? I mean, if you want to run the tests, you provide the boot parameter and that's it. Adding this Kconfig-time stuff on top seems excessive.
Quoted 13 lines · Andrew Morton
Quoted 13 lines
(quoted diff) +13
-0+config KGDB_TESTS_ON_BOOT + bool "KGDB: Run tests on boot" + depends on KGDB_TESTS + default n + help + Run the kgdb tests on boot up automatically without the need + to pass in a kernel parameter + +config KGDB_TESTS_BOOT_STRING + string "KGDB: which internal kgdb tests to run" + depends on KGDB_TESTS_ON_BOOT + default "V1F100" + help
Quoted 8 lines
Review
Quoted 4 lines
(quoted diff) +4
-0+ This is the command string to send the kgdb test suite on + boot. See the drivers/misc/kgdbts.c for detailed + information about other strings you could use beyond the + default of V1F100.I dunno. Do we *really* need this feature? I mean, if you want to run the tests, you provide the boot parameter and that's it. Adding this Kconfig-time stuff on top seems excessive.
yes, i believe we really need this - this is what caught the recent regression in kgdb. It should all be default-off.
Ingo