Linux-kselftest Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] kunit: tool: adjust parse regex
@ 2020-07-29  2:42 Marcelo Schmitt
  2020-07-29  2:55 ` David Gow
  0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Schmitt @ 2020-07-29  2:42 UTC (permalink / raw)
  To: brendanhiggins, felixguoxiuping; +Cc: linux-kselftest, kunit-dev, linux-kernel

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(-)

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'])
 
-- 
2.27.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] kunit: tool: adjust parse regex
  2020-07-29  2:42 [PATCH] kunit: tool: adjust parse regex Marcelo Schmitt
@ 2020-07-29  2:55 ` David Gow
  0 siblings, 0 replies; 2+ messages in thread
From: David Gow @ 2020-07-29  2:55 UTC (permalink / raw)
  To: Marcelo Schmitt
  Cc: Brendan Higgins, felixguoxiuping,
	open list:KERNEL SELFTEST FRAMEWORK, KUnit Development,
	Linux Kernel Mailing List

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29  2:42 [PATCH] kunit: tool: adjust parse regex Marcelo Schmitt
2020-07-29  2:55 ` David Gow

Linux-kselftest Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-kselftest/0 linux-kselftest/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-kselftest linux-kselftest/ https://lore.kernel.org/linux-kselftest \
		linux-kselftest@vger.kernel.org
	public-inbox-index linux-kselftest

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kselftest


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git