summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.rst11
-rw-r--r--kconfiglib.py16
2 files changed, 21 insertions, 6 deletions
diff --git a/README.rst b/README.rst
index c11d45c..59f86bf 100644
--- a/README.rst
+++ b/README.rst
@@ -395,11 +395,12 @@ up a bit.
The `tests/reltest <https://github.com/ulfalizer/Kconfiglib/blob/master/tests/reltest>`_ script runs the test suite
and all the example scripts for both Python 2 and Python 3, verifying that everything works.
-The test suite might fail for a few configurations for kernels older than April 2016,
-when a fix was added to Kconfig that's also mirrored in Kconfiglib
-(see `this commit <https://github.com/ulfalizer/Kconfiglib/commit/35ea8d5f1d63bdc9f8642f5ce4445e8f7c914385>`_).
-This is harmless, and only counts as a fail since the test suite compares literal
-output from the kconfig version that's bundled with the kernel.
+Rarely, the output from the C tools is changed slightly (most recently due to a
+`change <https://www.spinics.net/lists/linux-kbuild/msg17074.html>`_ I added).
+If you get test suite failures, try running the test suite again against the
+`linux-next tree <https://www.kernel.org/doc/man-pages/linux-next.html>`_,
+which has all the latest changes. I will make it clear if any
+non-backwards-compatible changes appear.
A lot of time is spent waiting around for ``make`` and the C utilities (which need to reparse all the
Kconfig files for each defconfig test). Adding some multiprocessing to the test suite would make sense
diff --git a/kconfiglib.py b/kconfiglib.py
index 97b99ff..e01866c 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -190,6 +190,19 @@ that this includes all symbols that would accept user values). Kconfiglib
matches the .config format produced by the C implementations down to the
character. This eases testing.
+For a visible bool/tristate symbol FOO with value n, this line is written to
+.config:
+
+ # CONFIG_FOO is not set
+
+The point is to remember the user n selection (which might differ from the
+default value the symbol would get), while at the same sticking to the rule
+that undefined corresponds to n (.config uses Makefile format, making the line
+above a comment). When the .config file is read back in, this line will be
+treated the same as the following assignment:
+
+ CONFIG_FOO=n
+
In Kconfiglib, the set of (currently) assignable values for a bool/tristate
symbol appear in Symbol.assignable. For other symbol types, just check if
sym.visibility is non-0 (non-n) to see whether the user value will have an
@@ -2803,7 +2816,8 @@ class Symbol(object):
cond_val = expr_value(cond)
if cond_val:
val = min(expr_value(default), cond_val)
- self._write_to_conf = True
+ if val:
+ self._write_to_conf = True
break
# Weak reverse dependencies are only considered if our