Message ID | 3f437939521cea1157b6803acd312e1a04399474.1595990061.git.marcelo.schmitt1@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | kunit: tool: adjust parse regex | expand |
On Wed, Jul 29, 2020 at 10:42 AM Marcelo Schmitt <marcelo.schmitt1@gmail.com> wrote: > > kunit config subcommand terminates with error if .config has a > configuration assigned with a string, for instance: > > CONFIG_CC_VERSION_TEXT="gcc (distro package version) ..." > > This patch adjusts the parse regex to consider such string assignments. > > Signed-off-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> > --- Thanks, Marcelo. I think we've actually already got a fix for this upstream: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3f37d14b8a3152441f36b6bc74000996679f0998 Cheers, -- David
diff --git a/tools/testing/kunit/kunit_config.py b/tools/testing/kunit/kunit_config.py index e75063d603b5..8e55693fe812 100644 --- a/tools/testing/kunit/kunit_config.py +++ b/tools/testing/kunit/kunit_config.py @@ -10,7 +10,7 @@ import collections import re CONFIG_IS_NOT_SET_PATTERN = r'^# CONFIG_(\w+) is not set$' -CONFIG_PATTERN = r'^CONFIG_(\w+)=(\S+)$' +CONFIG_PATTERN = r'^CONFIG_(\w+)=((\S+)|(".*"))$' KconfigEntryBase = collections.namedtuple('KconfigEntry', ['name', 'value'])
kunit config subcommand terminates with error if .config has a configuration assigned with a string, for instance: CONFIG_CC_VERSION_TEXT="gcc (distro package version) ..." This patch adjusts the parse regex to consider such string assignments. Signed-off-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> --- tools/testing/kunit/kunit_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)