<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/scripts/kconfig/tests, branch v5.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-12-28T13:22:28Z</updated>
<entry>
<title>kconfig: convert to SPDX License Identifier</title>
<updated>2018-12-28T13:22:28Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2018-12-18T12:13:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0c874100108f03401cb3154801d2671bbad40ad4'/>
<id>urn:sha1:0c874100108f03401cb3154801d2671bbad40ad4</id>
<content type='text'>
All files in lxdialog/ are licensed under GPL-2.0+, and the rest are
under GPL-2.0. I added GPL-2.0 tags to test scripts in tests/.

Documentation/process/license-rules.rst does not suggest anything
about the flex/bison files. Because flex does not accept the C++
comment style at the very top of a file, I used the C style for
zconf.l, and so for zconf.y for consistency.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>kconfig: improve the recursive dependency report</title>
<updated>2018-08-22T14:21:39Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2018-08-15T05:59:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f498926c47aa7d4f1b6d08af2ba16f3cf8fcb151'/>
<id>urn:sha1:f498926c47aa7d4f1b6d08af2ba16f3cf8fcb151</id>
<content type='text'>
This commit improves the messages of the recursive dependency.
Currently, sym-&gt;dir_dep.expr is not checked.  Hence, any dependency
in property visibility is regarded as the dependency of the symbol.

[Test Code 1]

  config A
          bool "a"
          depends on B

  config B
          bool "b"
          depends on A

[Test Code 2]

  config A
          bool "a" if B

  config B
          bool "b"
          depends on A

For both cases above, the same message is displayed:

        symbol B depends on A
        symbol A depends on B

This commit changes the message for the latter, like this:

        symbol B depends on A
        symbol A prompt is visible depending on B

Also, 'select' and 'imply' are distinguished.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Tested-by: Dirk Gouders &lt;dirk@gouders.net&gt;
</content>
</entry>
<entry>
<title>kconfig: report recursive dependency involving 'imply'</title>
<updated>2018-08-22T14:21:39Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2018-08-15T05:59:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5e8c5299d31519e0327be1020f309fa62dc53036'/>
<id>urn:sha1:5e8c5299d31519e0327be1020f309fa62dc53036</id>
<content type='text'>
Currently, Kconfig does not complain about the recursive dependency
where 'imply' keywords are involved.

[Test Code]

  config A
          bool "a"

  config B
          bool "b"
          imply A
          depends on A

In the code above, Kconfig cannot calculate the symbol values correctly
due to the circular dependency.  For example, allyesconfig followed by
syncconfig results in an odd behavior because CONFIG_B becomes visible
in syncconfig.

  $ make allyesconfig
  scripts/kconfig/conf  --allyesconfig Kconfig
  #
  # configuration written to .config
  #
  $ cat .config
  #
  # Automatically generated file; DO NOT EDIT.
  # Main menu
  #
  CONFIG_A=y
  $ make syncconfig
  scripts/kconfig/conf  --syncconfig Kconfig
  *
  * Restart config...
  *
  *
  * Main menu
  *
  a (A) [Y/n/?] y
    b (B) [N/y/?] (NEW)

To detect this correctly, sym_check_expr_deps() should recurse to
not only sym-&gt;rev_dep.expr but also sym-&gt;implied.expr .

At this moment, sym_check_print_recursive() cannot distinguish
'select' and 'imply' since it does not know the precise context
where the recursive dependency has been hit.  This will be solved
by the next commit.

In fact, even the document and the unit-test are confused.  Using
'imply' does not solve recursive dependency since 'imply' addresses
the unmet direct dependency, which 'select' could cause.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Tested-by: Dirk Gouders &lt;dirk@gouders.net&gt;
</content>
</entry>
<entry>
<title>kconfig: error out when seeing recursive dependency</title>
<updated>2018-08-22T14:21:38Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2018-08-15T05:59:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f1575595d15657bd78c139978107deabec5a3959'/>
<id>urn:sha1:f1575595d15657bd78c139978107deabec5a3959</id>
<content type='text'>
Originally, recursive dependency was a fatal error for Kconfig
because Kconfig cannot compute symbol values in such a situation.

Commit d595cea62403 ("kconfig: print more info when we see a recursive
dependency") changed it to a warning, which I guess was not intentional.

Get it back to an error again.

Also, rename the unit test directory "warn_recursive_dep" to
"err_recursive_dep" so that it matches to the behavior.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Tested-by: Dirk Gouders &lt;dirk@gouders.net&gt;
</content>
</entry>
<entry>
<title>kconfig: test: add Kconfig macro language tests</title>
<updated>2018-05-28T18:31:19Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2018-05-28T09:21:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2bece88f89faad8d2e5499652e2bd5f2045ec92a'/>
<id>urn:sha1:2bece88f89faad8d2e5499652e2bd5f2045ec92a</id>
<content type='text'>
Here are the test cases I used for developing the text expansion
feature.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>kconfig: make default prompt of mainmenu less specific</title>
<updated>2018-05-28T18:31:19Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2018-05-28T09:21:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=137c0118a900bc4a3d1673573e22a03fbae3e8fd'/>
<id>urn:sha1:137c0118a900bc4a3d1673573e22a03fbae3e8fd</id>
<content type='text'>
If "mainmenu" is not specified, "Linux Kernel Configuration" is used
as a default prompt.

Given that Kconfig is used in other projects than Linux, let's use
a more generic prompt, "Main menu".

Suggested-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>kconfig: remove duplicated file name and lineno of recursive inclusion</title>
<updated>2018-03-25T17:04:06Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2018-03-22T17:00:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=32a94b8b0c3e5ae575919850c5e49e936b704d45'/>
<id>urn:sha1:32a94b8b0c3e5ae575919850c5e49e936b704d45</id>
<content type='text'>
As in the unit test, the error message for the recursive inclusion
looks like this:

  Kconfig.inc1:4: recursive inclusion detected. Inclusion path:
    current file : 'Kconfig.inc1'
    included from: 'Kconfig.inc3:1'
    included from: 'Kconfig.inc2:3'
    included from: 'Kconfig.inc1:4'

The 'Kconfig.inc1:4' is duplicated in the first and last lines.
Also, the single quotes do not help readability.

Change the message like follows:

  Recursive inclusion detected.
  Inclusion path:
    current file : Kconfig.inc1
    included from: Kconfig.inc3:1
    included from: Kconfig.inc2:3
    included from: Kconfig.inc1:4

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>kconfig: tests: test if recursive inclusion is detected</title>
<updated>2018-03-25T17:04:05Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2018-03-13T09:12:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e2c75e7667c737148de6cdd522edf2163b4c61d3'/>
<id>urn:sha1:e2c75e7667c737148de6cdd522edf2163b4c61d3</id>
<content type='text'>
If recursive inclusion is detected, it should fail with error
messages.  Test this.

This also tests the line numbers in the error message, fixed by
commit 5ae6fcc4bb82 ("kconfig: fix line number in recursive inclusion
error message").

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Reviewed-by: Ulf Magnusson &lt;ulfalizer@gmail.com&gt;
</content>
</entry>
<entry>
<title>kconfig: tests: test if recursive dependencies are detected</title>
<updated>2018-03-25T17:04:04Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2018-03-13T09:12:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=29c434f367ea7b95bea7057105507c05abdc1297'/>
<id>urn:sha1:29c434f367ea7b95bea7057105507c05abdc1297</id>
<content type='text'>
Recursive dependency should be detected and warned.  Test this.

This indirectly tests the line number increments.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Reviewed-by: Ulf Magnusson &lt;ulfalizer@gmail.com&gt;
</content>
</entry>
<entry>
<title>kconfig: tests: test randconfig for choice in choice</title>
<updated>2018-03-25T17:04:04Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2018-03-13T09:12:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3e4888c2e3d77d70edb905364cd70059a52a1343'/>
<id>urn:sha1:3e4888c2e3d77d70edb905364cd70059a52a1343</id>
<content type='text'>
Commit 3b9a19e08960 ("kconfig: loop as long as we changed some symbols
in randconfig") fixed randconfig where a choice contains a sub-choice.
Prior to that commit, the sub-choice values were not set.

I am not sure whether this is an intended feature or just something
people discovered works, but it is used in the real world;
drivers/usb/gadget/legacy/Kconfig is source'd in a choice context,
then creates a sub-choice in it.

For the test case in this commit, there are 3 possible results.

Case 1:
  CONFIG_A=y
  # CONFIG_B is not set

Case 2:
  # CONFIG_A is not set
  CONFIG_B=y
  CONFIG_C=y
  # CONFIG_D is not set

Case 3:
  # CONFIG_A is not set
  CONFIG_B=y
  # CONFIG_C is not set
  CONFIG_D=y
  CONFIG_E=y

So, this test iterates several times, and checks if the result is
either of the three.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Reviewed-by: Ulf Magnusson &lt;ulfalizer@gmail.com&gt;
</content>
</entry>
</feed>
