diff mbox series

[v4,4/4] lib: add any kconfig to match the expected value function document

Message ID 20191219131855.28799-4-pengfei.xu@intel.com
State Superseded
Delegated to: Petr Vorel
Headers show
Series [v4,1/4] lib/tst_kconfig.c: Add any kconfig to match the expected value function | expand

Commit Message

Pengfei Xu Dec. 19, 2019, 1:18 p.m. UTC
Signed-off-by: Pengfei Xu <pengfei.xu@intel.com>
---
 doc/test-writing-guidelines.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Yang Xu Dec. 20, 2019, 5:37 a.m. UTC | #1
Hi Pengfei

on 2019/12/19 21:18, Pengfei Xu wrote:
> Signed-off-by: Pengfei Xu <pengfei.xu@intel.com>
> ---
>   doc/test-writing-guidelines.txt | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/test-writing-guidelines.txt b/doc/test-writing-guidelines.txt
> index 79d857fea..e64ff8716 100644
> --- a/doc/test-writing-guidelines.txt
> +++ b/doc/test-writing-guidelines.txt
> @@ -1590,7 +1590,9 @@ aborted with 'TCONF' if any of the required options were not set.
Before your patch, I know we can use the following two formats kconfigs
CONFIG_A
CONFIG_A=y/m/v
after your patch set, we can use the following three formats kconfigs
CONFIG_A
CONFIG_A=y/m/v
CONFIG_A|CONFIGB=y/m/v
As the usual extend logic,  we think  CONFIGA|CONFIGB is also ok. But in 
fact, we use "|" or "=" to delim string. So  we can't parse 
CONFIGA|CONFIGB correctly. So, if we can tell user or developer about 
this in here, it will be better.

ps: we can add configA| config B test in your third patch.

Kind Regards
Yang Xu
>   #include "tst_test.h"
>   
>   static const char *kconfigs[] = {
> -	"CONFIG_X86_INTEL_UMIP",
> +	"CONFIG_EXT4_FS=y",
> +	"CONFIG_MMU",
> +	"CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP=y",
>   	NULL
>   };
>   
>
Yang Xu Dec. 20, 2019, 6 a.m. UTC | #2
Hi Pengfei
> Hi Xu,
> 
> 
> On 2019-12-20 at 13:37:21 +0800, Yang Xu wrote:
>>
>> Hi Pengfei
>>
>> on 2019/12/19 21:18, Pengfei Xu wrote:
>>> Signed-off-by: Pengfei Xu <pengfei.xu@intel.com>
>>> ---
>>>    doc/test-writing-guidelines.txt | 4 +++-
>>>    1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/doc/test-writing-guidelines.txt b/doc/test-writing-guidelines.txt
>>> index 79d857fea..e64ff8716 100644
>>> --- a/doc/test-writing-guidelines.txt
>>> +++ b/doc/test-writing-guidelines.txt
>>> @@ -1590,7 +1590,9 @@ aborted with 'TCONF' if any of the required options were not set.
>> Before your patch, I know we can use the following two formats kconfigs
>> CONFIG_A
>> CONFIG_A=y/m/v
>> after your patch set, we can use the following three formats kconfigs
>> CONFIG_A
>> CONFIG_A=y/m/v
>> CONFIG_A|CONFIGB=y/m/v
>> As the usual extend logic,  we think  CONFIGA|CONFIGB is also ok. But in
>> fact, we use "|" or "=" to delim string. So  we can't parse CONFIGA|CONFIGB
>> correctly. So, if we can tell user or developer about this in here, it will
>> be better.
>>
>> ps: we can add configA| config B test in your third patch.
>>
>    Actually present patch could support CONFIG_A|CONFIG_B style, and it works
> well, you could change "CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP=y" to
> "CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP" in test_kconfig.c and have a try. : )
"CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP" is useful because 
CONFIG_X86_INTEL_UMIP is in our kernel configs . If you use 
"CONFIG_X86_UMIP|CONFIG_X86_INTEL_UMIP", it will report error.

Kind Regards
Yang Xu
> 
> Thanks!
>> Kind Regards
>> Yang Xu
>>>    #include "tst_test.h"
>>>    static const char *kconfigs[] = {
>>> -	"CONFIG_X86_INTEL_UMIP",
>>> +	"CONFIG_EXT4_FS=y",
>>> +	"CONFIG_MMU",
>>> +	"CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP=y",
>>>    	NULL
>>>    };
>>>
>>
>>
> 
>
Pengfei Xu Dec. 20, 2019, 6:01 a.m. UTC | #3
Hi Xu,


On 2019-12-20 at 13:37:21 +0800, Yang Xu wrote:
> 
> Hi Pengfei
> 
> on 2019/12/19 21:18, Pengfei Xu wrote:
> > Signed-off-by: Pengfei Xu <pengfei.xu@intel.com>
> > ---
> >   doc/test-writing-guidelines.txt | 4 +++-
> >   1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/doc/test-writing-guidelines.txt b/doc/test-writing-guidelines.txt
> > index 79d857fea..e64ff8716 100644
> > --- a/doc/test-writing-guidelines.txt
> > +++ b/doc/test-writing-guidelines.txt
> > @@ -1590,7 +1590,9 @@ aborted with 'TCONF' if any of the required options were not set.
> Before your patch, I know we can use the following two formats kconfigs
> CONFIG_A
> CONFIG_A=y/m/v
> after your patch set, we can use the following three formats kconfigs
> CONFIG_A
> CONFIG_A=y/m/v
> CONFIG_A|CONFIGB=y/m/v
> As the usual extend logic,  we think  CONFIGA|CONFIGB is also ok. But in
> fact, we use "|" or "=" to delim string. So  we can't parse CONFIGA|CONFIGB
> correctly. So, if we can tell user or developer about this in here, it will
> be better.
> 
> ps: we can add configA| config B test in your third patch.
> 
  Actually present patch could support CONFIG_A|CONFIG_B style, and it works
well, you could change "CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP=y" to
"CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP" in test_kconfig.c and have a try. : )

Thanks!
> Kind Regards
> Yang Xu
> >   #include "tst_test.h"
> >   static const char *kconfigs[] = {
> > -	"CONFIG_X86_INTEL_UMIP",
> > +	"CONFIG_EXT4_FS=y",
> > +	"CONFIG_MMU",
> > +	"CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP=y",
> >   	NULL
> >   };
> > 
> 
>
Pengfei Xu Dec. 20, 2019, 6:35 a.m. UTC | #4
Hi Xu,
  Thanks for your comment.
  I will try to fix it and send the patch.

  Thanks!
  BR.

On 2019-12-20 at 14:00:00 +0800, Yang Xu wrote:
> Hi Pengfei
> > Hi Xu,
> > 
> > 
> > On 2019-12-20 at 13:37:21 +0800, Yang Xu wrote:
> > > 
> > > Hi Pengfei
> > > 
> > > on 2019/12/19 21:18, Pengfei Xu wrote:
> > > > Signed-off-by: Pengfei Xu <pengfei.xu@intel.com>
> > > > ---
> > > >    doc/test-writing-guidelines.txt | 4 +++-
> > > >    1 file changed, 3 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/doc/test-writing-guidelines.txt b/doc/test-writing-guidelines.txt
> > > > index 79d857fea..e64ff8716 100644
> > > > --- a/doc/test-writing-guidelines.txt
> > > > +++ b/doc/test-writing-guidelines.txt
> > > > @@ -1590,7 +1590,9 @@ aborted with 'TCONF' if any of the required options were not set.
> > > Before your patch, I know we can use the following two formats kconfigs
> > > CONFIG_A
> > > CONFIG_A=y/m/v
> > > after your patch set, we can use the following three formats kconfigs
> > > CONFIG_A
> > > CONFIG_A=y/m/v
> > > CONFIG_A|CONFIGB=y/m/v
> > > As the usual extend logic,  we think  CONFIGA|CONFIGB is also ok. But in
> > > fact, we use "|" or "=" to delim string. So  we can't parse CONFIGA|CONFIGB
> > > correctly. So, if we can tell user or developer about this in here, it will
> > > be better.
> > > 
> > > ps: we can add configA| config B test in your third patch.
> > > 
> >    Actually present patch could support CONFIG_A|CONFIG_B style, and it works
> > well, you could change "CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP=y" to
> > "CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP" in test_kconfig.c and have a try. : )
> "CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP" is useful because
> CONFIG_X86_INTEL_UMIP is in our kernel configs . If you use
> "CONFIG_X86_UMIP|CONFIG_X86_INTEL_UMIP", it will report error.
> 
> Kind Regards
> Yang Xu
> > 
> > Thanks!
> > > Kind Regards
> > > Yang Xu
> > > >    #include "tst_test.h"
> > > >    static const char *kconfigs[] = {
> > > > -	"CONFIG_X86_INTEL_UMIP",
> > > > +	"CONFIG_EXT4_FS=y",
> > > > +	"CONFIG_MMU",
> > > > +	"CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP=y",
> > > >    	NULL
> > > >    };
> > > > 
> > > 
> > > 
> > 
> > 
> 
>
Pengfei Xu Dec. 20, 2019, 7:09 a.m. UTC | #5
Hi Xu,
  Due to memory copy, there is some bit and display issue in last string.

  So for your question, for CONFIG_A|CONFIG_B without expect value, maybe y
  or m.
  We could add it with below style:
  "CONFIG_A|CONFIG_B|NA", and add it into guidelines, NA will not be solved,
  actually you could fill with any string after last '|'.
  Is it ok?

  Thanks!

On 2019-12-20 at 14:00:00 +0800, Yang Xu wrote:
> Hi Pengfei
> > Hi Xu,
> > 
> > 
> > > Before your patch, I know we can use the following two formats kconfigs
> > > CONFIG_A
> > > CONFIG_A=y/m/v
> > > after your patch set, we can use the following three formats kconfigs
> > > CONFIG_A
> > > CONFIG_A=y/m/v
> > > CONFIG_A|CONFIGB=y/m/v
> > > As the usual extend logic,  we think  CONFIGA|CONFIGB is also ok. But in
> > > fact, we use "|" or "=" to delim string. So  we can't parse CONFIGA|CONFIGB
> > > correctly. So, if we can tell user or developer about this in here, it will
> > > be better.
> > > 
> > > ps: we can add configA| config B test in your third patch.
> > > 
> >    Actually present patch could support CONFIG_A|CONFIG_B style, and it works
> > well, you could change "CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP=y" to
> > "CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP" in test_kconfig.c and have a try. : )
> "CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP" is useful because
> CONFIG_X86_INTEL_UMIP is in our kernel configs . If you use
> "CONFIG_X86_UMIP|CONFIG_X86_INTEL_UMIP", it will report error.
> 
> Kind Regards
> Yang Xu
> > 
> > Thanks!
> > > Kind Regards
> > > Yang Xu
> > > >    #include "tst_test.h"
> > > >    static const char *kconfigs[] = {
> > > > -	"CONFIG_X86_INTEL_UMIP",
> > > > +	"CONFIG_EXT4_FS=y",
> > > > +	"CONFIG_MMU",
> > > > +	"CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP=y",
> > > >    	NULL
> > > >    };
> > > > 
> > > 
> > > 
> > 
> > 
> 
>
Yang Xu Dec. 20, 2019, 7:19 a.m. UTC | #6
Hi Pengfei
> Hi Xu,
>    Due to memory copy, there is some bit and display issue in last string.
> 
>    So for your question, for CONFIG_A|CONFIG_B without expect value, maybe y
>    or m.
>    We could add it with below style:
>    "CONFIG_A|CONFIG_B|NA", and add it into guidelines, NA will not be solved,
>    actually you could fill with any string after last '|'.
>    Is it ok?
It sounds reasonable. I think it is ok.

Kind Regards
Yang Xu
> 
>    Thanks!
> 
> On 2019-12-20 at 14:00:00 +0800, Yang Xu wrote:
>> Hi Pengfei
>>> Hi Xu,
>>>
>>>
>>>> Before your patch, I know we can use the following two formats kconfigs
>>>> CONFIG_A
>>>> CONFIG_A=y/m/v
>>>> after your patch set, we can use the following three formats kconfigs
>>>> CONFIG_A
>>>> CONFIG_A=y/m/v
>>>> CONFIG_A|CONFIGB=y/m/v
>>>> As the usual extend logic,  we think  CONFIGA|CONFIGB is also ok. But in
>>>> fact, we use "|" or "=" to delim string. So  we can't parse CONFIGA|CONFIGB
>>>> correctly. So, if we can tell user or developer about this in here, it will
>>>> be better.
>>>>
>>>> ps: we can add configA| config B test in your third patch.
>>>>
>>>     Actually present patch could support CONFIG_A|CONFIG_B style, and it works
>>> well, you could change "CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP=y" to
>>> "CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP" in test_kconfig.c and have a try. : )
>> "CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP" is useful because
>> CONFIG_X86_INTEL_UMIP is in our kernel configs . If you use
>> "CONFIG_X86_UMIP|CONFIG_X86_INTEL_UMIP", it will report error.
>>
>> Kind Regards
>> Yang Xu
>>>
>>> Thanks!
>>>> Kind Regards
>>>> Yang Xu
>>>>>     #include "tst_test.h"
>>>>>     static const char *kconfigs[] = {
>>>>> -	"CONFIG_X86_INTEL_UMIP",
>>>>> +	"CONFIG_EXT4_FS=y",
>>>>> +	"CONFIG_MMU",
>>>>> +	"CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP=y",
>>>>>     	NULL
>>>>>     };
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
> 
>
Pengfei Xu Dec. 21, 2019, 2:14 a.m. UTC | #7
Thanks Xu! :)

BR.
> 在 2019年12月20日,15:20,Yang Xu <xuyang2018.jy@cn.fujitsu.com> 写道:
> 
> Hi Pengfei
>> Hi Xu,
>>   Due to memory copy, there is some bit and display issue in last string.
>>   So for your question, for CONFIG_A|CONFIG_B without expect value, maybe y
>>   or m.
>>   We could add it with below style:
>>   "CONFIG_A|CONFIG_B|NA", and add it into guidelines, NA will not be solved,
>>   actually you could fill with any string after last '|'.
>>   Is it ok?
> It sounds reasonable. I think it is ok.
> 
> Kind Regards
> Yang Xu
>>   Thanks!
>>> On 2019-12-20 at 14:00:00 +0800, Yang Xu wrote:
>>> Hi Pengfei
>>>> Hi Xu,
>>>> 
>>>> 
>>>>> Before your patch, I know we can use the following two formats kconfigs
>>>>> CONFIG_A
>>>>> CONFIG_A=y/m/v
>>>>> after your patch set, we can use the following three formats kconfigs
>>>>> CONFIG_A
>>>>> CONFIG_A=y/m/v
>>>>> CONFIG_A|CONFIGB=y/m/v
>>>>> As the usual extend logic,  we think  CONFIGA|CONFIGB is also ok. But in
>>>>> fact, we use "|" or "=" to delim string. So  we can't parse CONFIGA|CONFIGB
>>>>> correctly. So, if we can tell user or developer about this in here, it will
>>>>> be better.
>>>>> 
>>>>> ps: we can add configA| config B test in your third patch.
>>>>> 
>>>>    Actually present patch could support CONFIG_A|CONFIG_B style, and it works
>>>> well, you could change "CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP=y" to
>>>> "CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP" in test_kconfig.c and have a try. : )
>>> "CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP" is useful because
>>> CONFIG_X86_INTEL_UMIP is in our kernel configs . If you use
>>> "CONFIG_X86_UMIP|CONFIG_X86_INTEL_UMIP", it will report error.
>>> 
>>> Kind Regards
>>> Yang Xu
>>>> 
>>>> Thanks!
>>>>> Kind Regards
>>>>> Yang Xu
>>>>>>    #include "tst_test.h"
>>>>>>    static const char *kconfigs[] = {
>>>>>> -    "CONFIG_X86_INTEL_UMIP",
>>>>>> +    "CONFIG_EXT4_FS=y",
>>>>>> +    "CONFIG_MMU",
>>>>>> +    "CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP=y",
>>>>>>        NULL
>>>>>>    };
>>>>>> 
>>>>> 
>>>>> 
>>>> 
>>>> 
>>> 
>>> 
> 
>
diff mbox series

Patch

diff --git a/doc/test-writing-guidelines.txt b/doc/test-writing-guidelines.txt
index 79d857fea..e64ff8716 100644
--- a/doc/test-writing-guidelines.txt
+++ b/doc/test-writing-guidelines.txt
@@ -1590,7 +1590,9 @@  aborted with 'TCONF' if any of the required options were not set.
 #include "tst_test.h"
 
 static const char *kconfigs[] = {
-	"CONFIG_X86_INTEL_UMIP",
+	"CONFIG_EXT4_FS=y",
+	"CONFIG_MMU",
+	"CONFIG_X86_INTEL_UMIP|CONFIG_X86_UMIP=y",
 	NULL
 };