<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Kconfiglib.git/tests, branch v1.0.6</title>
<subtitle>Fork of https://github.com/zephyrproject-rtos/Kconfiglib.git</subtitle>
<id>https://git.mcdonnell.dev/Kconfiglib.git/atom?h=v1.0.6</id>
<link rel='self' href='https://git.mcdonnell.dev/Kconfiglib.git/atom?h=v1.0.6'/>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/'/>
<updated>2017-10-01T22:07:51Z</updated>
<entry>
<title>Make 'imply' consider direct dependencies</title>
<updated>2017-10-01T22:07:51Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-10-01T18:01:08Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=1774239986d36f4894e7f59efd953f408cbbf80a'/>
<id>urn:sha1:1774239986d36f4894e7f59efd953f408cbbf80a</id>
<content type='text'>
Bad oversight. Weak reverse dependencies (from imply) are not considered
if the direct dependencies of a symbol are not met (the
'if'/'depends on' dependencies from the symbol and its parents, taking
location into account if the symbol is defined in multiple places).

Caused a wrong value for the symbol FS_FAT in the U-Boot Kconfigs, where
'imply' is more heavily used compared to the kernel.

Add a new variable _direct_deps that corresponds to dir_dep from the C
implementation. Before 'imply', dir_dep was only used for a
'select'-related warning in the C implementation.

Add a bunch of tests to cover 'imply' semantics. Should be solid now.
</content>
</entry>
<entry>
<title>Propagate dependencies to range conditions</title>
<updated>2017-10-01T04:52:31Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-10-01T04:28:02Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=2a2fcbd404878d539683178d98c67c983b5f61c9'/>
<id>urn:sha1:2a2fcbd404878d539683178d98c67c983b5f61c9</id>
<content type='text'>
Just like for other properties, conditions on ranges get local
'depends on' and parent dependencies propagated to them. Oversight.

Did not trigger any deviations for the kernel defconfigs. Pretty
specific circumstances were required for breakage, like a symbol
depending on the particular value of a symbol with a 'range' and parent
deps 'n', or a symbol with ranges being defined in multiple locations
with different parent deps.

(There is one symbol that both has ranges and is defined in multiple
locations: BCH_CONST_M. The second definition adds a default rather than
a range though.)
</content>
</entry>
<entry>
<title>Only invalidate defined symbols</title>
<updated>2017-09-29T04:03:38Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-09-29T00:10:55Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=35e8acdb2d49f279862a99ea129a9bb260b0bc4a'/>
<id>urn:sha1:35e8acdb2d49f279862a99ea129a9bb260b0bc4a</id>
<content type='text'>
Think I had it in the back of my head somewhere that not invalidating
undefined symbols could break some obscure cases, but turns out it's
perfectly safe: Nothing can change the value of an undefined symbol.
They always get their name as their value.

There's no need to unset user values on them either, because
set_user_value() already refuses to to set one on them.

Lets us get rid of the Python 2/3 compatibility hack and instead iterate
over a plain list of defined symbols.
</content>
</entry>
<entry>
<title>Fix 'default' on non-visible choice symbols</title>
<updated>2017-09-25T18:42:44Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-09-25T18:24:11Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=5f3d307155f4db035b652738e9fc49ad8be0c792'/>
<id>urn:sha1:5f3d307155f4db035b652738e9fc49ad8be0c792</id>
<content type='text'>
Previously, 'default CHOICE_SYM [if &lt;cond&gt;]' in a choice would skip any
following 'default' properties if &lt;cond&gt; was non-'n'. However, those
other defaults should still be considered if CHOICE_SYM has visibility
'n'. Previously, we'd immediately fall back to selecting the first
visible symbol in the choice in that case.

get_selection_from_defaults() now exactly mirrors sym_choice_default()
from the C implementation, and got less convoluted too.

Nothing in the kernel defconfigs triggered this.

Add a new test case too.
</content>
</entry>
<entry>
<title>Don't set defaults that will always be overwritten</title>
<updated>2017-09-25T16:21:34Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-09-25T15:19:09Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=fe17f546b5cd5fd8b9df7d53856efd7b207faa0e'/>
<id>urn:sha1:fe17f546b5cd5fd8b9df7d53856efd7b207faa0e</id>
<content type='text'>
The constructors previously defaulted all properties. This is dead code
for properties that are always set on items from outside during parsing,
and obfuscates the code flow and wastes time. Instead, just mention
other properties that exist in comments in the constructors.

Also add test cases for missing and empty 'choice' help texts. Removing
the default 'self._help = None' assignment in Choice.__init__() wasn't
caught by the selftests.
</content>
</entry>
<entry>
<title>Fix defconfig srctree absolute/relative mixup bug</title>
<updated>2017-09-24T12:03:41Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-09-24T11:47:04Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=b9509c0fbc13679393389611a5c4b88b0324306a'/>
<id>urn:sha1:b9509c0fbc13679393389611a5c4b88b0324306a</id>
<content type='text'>
This code in zconf.l says !=, not ==. Thought the behavior seemed weird.

	if (!f &amp;&amp; name != NULL &amp;&amp; name[0] != '/') {
		env = getenv(SRCTREE);
		if (env) {
			sprintf(fullname, "%s/%s", env, name);
			f = fopen(fullname, "r");
		}
	}
	return f;

Thankfully only broken for a short while. Also gives much simpler code.
</content>
</entry>
<entry>
<title>Fix get_defconfig_filename() $srctree search order</title>
<updated>2017-09-24T09:37:42Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-09-24T07:49:20Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=799e6d4e1a4e4a4f59e58298bbb9c01d286159dc'/>
<id>urn:sha1:799e6d4e1a4e4a4f59e58298bbb9c01d286159dc</id>
<content type='text'>
Previously, $srctree/path/to/defconfig would be looked up before
/path/to/defconfig, and the code wouldn't check if /path/to/defconfig
was an absolute path ($srctree is ignored otherwise). Sloppy old
oversights. The behavior now fully matches the C implementation.

Also fix some related things:

 - An 'if m' suffices to select a defconfig. We previously required 'y'.

 - Make the code less hacky and possibly more Windows-friendly by using
   os.path.relpath() to de-absolutize paths, and stop using
   os.path.normpath() as it could change the meaning of paths that
   contain symbolic links.

 - Explain what happens if 'option defconfig_list' is set on multiple
   symbols and print a warning in that case.

 - Fix get_srctree(). It would previously return "." instead of None if
   $srctree was unset at parse time. Somehow forgot to to test this. The
   code is now much more straightforward.
</content>
</entry>
<entry>
<title>Simplify _expr_to_str()</title>
<updated>2017-09-22T05:02:05Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-09-22T03:59:08Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=8f81cbdcc1d35eeb419c96968d4eedbfeee42e55'/>
<id>urn:sha1:8f81cbdcc1d35eeb419c96968d4eedbfeee42e55</id>
<content type='text'>
 - Get rid of _sym_str_string(), which was only used here.

 - Remove 'if expr is None' case that could never trigger

 - Add a test for printing string symbols, as they are a bit tricky:
   Default values should not be evaluated to tristate values.
</content>
</entry>
<entry>
<title>Add support for less/greater than comparisons</title>
<updated>2017-09-20T03:38:19Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-09-19T21:03:22Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=c8df7316d1ed151b93566a61ed9d95da67e17974'/>
<id>urn:sha1:c8df7316d1ed151b93566a61ed9d95da67e17974</id>
<content type='text'>
Was added upstream in 31847b67 (kconfig: allow use of relations other
than (in)equality). Completely unused (and undocumented) in the kernel
except for in DEBUG_UART_8250_WORD in arch/arm/Kconfig.debug:

   depends on DEBUG_UART_8250_SHIFT &gt;= 2

(That line was added before lt/gt support by the way, and assumed a
feature that wasn't there.)

This change (and the upstream one) also slightly changes how
(in)equality comparisons work, making e.g.

  MY_HEX = 0x00037

evaluate to 'y' if MY_HEX is 0x37. Prior to this change, the strings
needed to match exactly.
</content>
</entry>
<entry>
<title>Include 'if' deps. in _determine_actual_symbols()</title>
<updated>2017-09-19T05:29:33Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-09-19T05:06:17Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=4fce6c53e1bdac803c77f0be8bedece22d73c30c'/>
<id>urn:sha1:4fce6c53e1bdac803c77f0be8bedece22d73c30c</id>
<content type='text'>
Previously, only WEIRD_1 and not WEIRD_2 would be considered not a
choice symbol in the following fragment. This lead to a weird warning in
U-Boot.

  choice

  config FOO

  config WEIRD_1
      depends on FOO

  if FOO
  config WEIRD_2
  endif

  endchoice

Also add some testcases for weird choice symbols.
</content>
</entry>
</feed>
