<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/kunit, branch v5.8</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.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-06-26T20:29:31Z</updated>
<entry>
<title>kunit: kunit_tool: Fix invalid result when build fails</title>
<updated>2020-06-26T20:29:31Z</updated>
<author>
<name>David Gow</name>
<email>davidgow@google.com</email>
</author>
<published>2020-06-16T06:47:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ee61492ab92b108b7db66acfd2c5f794244466b9'/>
<id>urn:sha1:ee61492ab92b108b7db66acfd2c5f794244466b9</id>
<content type='text'>
When separating out different phases of running tests[1]
(build/exec/parse/etc), the format of the KunitResult tuple changed
(adding an elapsed_time variable). This is not populated during a build
failure, causing kunit.py to crash.

This fixes [1] to probably populate the result variable, causing a
failing build to be reported properly.

[1]:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=45ba7a893ad89114e773b3dc32f6431354c465d6

Signed-off-by: David Gow &lt;davidgow@google.com&gt;
Reviewed-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Tested-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kunit: show error if kunit results are not present</title>
<updated>2020-06-26T20:29:10Z</updated>
<author>
<name>Uriel Guajardo</name>
<email>urielguajardo@google.com</email>
</author>
<published>2020-06-11T21:05:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e173b8b8c419897eabe0e337a0125c6d87ef1644'/>
<id>urn:sha1:e173b8b8c419897eabe0e337a0125c6d87ef1644</id>
<content type='text'>
Currently, if the kernel is configured incorrectly or if it crashes before any
kunit tests are run, kunit finishes without error, reporting
that 0 test cases were run.

To fix this, an error is shown when the tap header is not found, which
indicates that kunit was not able to run at all.

Signed-off-by: Uriel Guajardo &lt;urielguajardo@google.com&gt;
Reviewed-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kunit: kunit_config: Fix parsing of CONFIG options with space</title>
<updated>2020-06-26T20:27:35Z</updated>
<author>
<name>Rikard Falkeborn</name>
<email>rikard.falkeborn@gmail.com</email>
</author>
<published>2020-06-07T21:57:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3f37d14b8a3152441f36b6bc74000996679f0998'/>
<id>urn:sha1:3f37d14b8a3152441f36b6bc74000996679f0998</id>
<content type='text'>
Commit 8b59cd81dc5e ("kbuild: ensure full rebuild when the compiler is
updated") introduced a new CONFIG option CONFIG_CC_VERSION_TEXT. On my
system, this is set to "gcc (GCC) 10.1.0" which breaks KUnit config
parsing which did not like the spaces in the string.

Fix this by updating the regex to allow strings containing spaces.

Fixes: 8b59cd81dc5e ("kbuild: ensure full rebuild when the compiler is updated")
Signed-off-by: Rikard Falkeborn &lt;rikard.falkeborn@gmail.com&gt;
Reviewed-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kunit: Fix TabError, remove defconfig code and handle when there is no kunitconfig</title>
<updated>2020-06-01T20:14:07Z</updated>
<author>
<name>Vitor Massaru Iha</name>
<email>vitor@massaru.org</email>
</author>
<published>2020-05-29T19:28:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=01397e822af42f8485e876ba9d1309b63646d886'/>
<id>urn:sha1:01397e822af42f8485e876ba9d1309b63646d886</id>
<content type='text'>
The identation before this code
(`if not os.path.exists(cli_args.build_dir):``)
was with spaces instead of tabs after fixed up merge conflits,
this commit revert spaces to tabs:

[iha@bbking linux]$ tools/testing/kunit/kunit.py run
  File "tools/testing/kunit/kunit.py", line 247
    if not linux:
                ^
TabError: inconsistent use of tabs and spaces in indentation

[iha@bbking linux]$ tools/testing/kunit/kunit.py run
Traceback (most recent call last):
  File "tools/testing/kunit/kunit.py", line 338, in &lt;module&gt;
    main(sys.argv[1:])
  File "tools/testing/kunit/kunit.py", line 215, in main
    add_config_opts(config_parser)

[iha@bbking linux]$ tools/testing/kunit/kunit.py run
Traceback (most recent call last):
  File "tools/testing/kunit/kunit.py", line 337, in &lt;module&gt;
    main(sys.argv[1:])
  File "tools/testing/kunit/kunit.py", line 255, in main
    result = run_tests(linux, request)
  File "tools/testing/kunit/kunit.py", line 133, in run_tests
    request.defconfig,
AttributeError: 'KunitRequest' object has no attribute 'defconfig'

Handles when there is no .kunitconfig, the error due to merge conflicts
between the following:

commit 9bdf64b35117 ("kunit: use KUnit defconfig by default")
commit 45ba7a893ad8 ("kunit: kunit_tool: Separate out
	config/build/exec/parse")

[iha@bbking linux]$ tools/testing/kunit/kunit.py run
Traceback (most recent call last):
  File "tools/testing/kunit/kunit.py", line 335, in &lt;module&gt;
    main(sys.argv[1:])
  File "tools/testing/kunit/kunit.py", line 246, in main
    linux = kunit_kernel.LinuxSourceTree()
  File "../tools/testing/kunit/kunit_kernel.py", line 109, in __init__
    self._kconfig.read_from_file(kunitconfig_path)
  File "t../ools/testing/kunit/kunit_config.py", line 88, in read_from_file
    with open(path, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '.kunit/.kunitconfig'

Signed-off-by: Vitor Massaru Iha &lt;vitor@massaru.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kunit: use KUnit defconfig by default</title>
<updated>2020-05-22T22:23:28Z</updated>
<author>
<name>Vitor Massaru Iha</name>
<email>vitor@massaru.org</email>
</author>
<published>2020-04-14T23:37:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9bdf64b35117cc10813d24e1842cd8ee40ecbf19'/>
<id>urn:sha1:9bdf64b35117cc10813d24e1842cd8ee40ecbf19</id>
<content type='text'>
To improve the usability of KUnit, defconfig is used
by default if no kunitconfig is present.

 * https://bugzilla.kernel.org/show_bug.cgi?id=205259

Fixed up minor merge conflicts - Shuah Khan &lt;skhan@linuxfoundation.org&gt;

Signed-off-by: Vitor Massaru Iha &lt;vitor@massaru.org&gt;
Reviewed-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kunit: use --build_dir=.kunit as default</title>
<updated>2020-05-22T20:52:06Z</updated>
<author>
<name>Vitor Massaru Iha</name>
<email>vitor@massaru.org</email>
</author>
<published>2020-04-14T23:09:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ddbd60c779b4ddaa87173a160ce90146933fb8f9'/>
<id>urn:sha1:ddbd60c779b4ddaa87173a160ce90146933fb8f9</id>
<content type='text'>
To make KUnit easier to use, and to avoid overwriting object and
.config files, the default KUnit build directory is set to .kunit

 * Related bug: https://bugzilla.kernel.org/show_bug.cgi?id=205221

Fixed up minor merge conflicts - Shuah Khan &lt;skhan@linuxfoundation.org&gt;

Signed-off-by: Vitor Massaru Iha &lt;vitor@massaru.org&gt;
Reviewed-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kunit: kunit_tool: Separate out config/build/exec/parse</title>
<updated>2020-05-11T22:53:40Z</updated>
<author>
<name>David Gow</name>
<email>davidgow@google.com</email>
</author>
<published>2020-05-01T04:27:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=45ba7a893ad89114e773b3dc32f6431354c465d6'/>
<id>urn:sha1:45ba7a893ad89114e773b3dc32f6431354c465d6</id>
<content type='text'>
Add new subcommands to kunit.py to allow stages of the existing 'run'
subcommand to be run independently:
- 'config': Verifies that .config is a subset of .kunitconfig
- 'build': Compiles a UML kernel for KUnit
- 'exec': Runs the kernel, and outputs the test results.
- 'parse': Parses test results from a file or stdin

The 'run' command continues to behave as before.

Signed-off-by: David Gow &lt;davidgow@google.com&gt;
Reviewed-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'spdx-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx</title>
<updated>2020-04-03T20:12:26Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2020-04-03T20:12:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ff2ae607c6f329d11a3b0528801ea7474be8c3e9'/>
<id>urn:sha1:ff2ae607c6f329d11a3b0528801ea7474be8c3e9</id>
<content type='text'>
Pull SPDX updates from Greg KH:
 "Here are three SPDX patches for 5.7-rc1.

  One fixes up the SPDX tag for a single driver, while the other two go
  through the tree and add SPDX tags for all of the .gitignore files as
  needed.

  Nothing too complex, but you will get a merge conflict with your
  current tree, that should be trivial to handle (one file modified by
  two things, one file deleted.)

  All three of these have been in linux-next for a while, with no
  reported issues other than the merge conflict"

* tag 'spdx-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx:
  ASoC: MT6660: make spdxcheck.py happy
  .gitignore: add SPDX License Identifier
  .gitignore: remove too obvious comments
</content>
</entry>
<entry>
<title>kunit: tool: add missing test data file content</title>
<updated>2020-03-26T20:11:12Z</updated>
<author>
<name>Brendan Higgins</name>
<email>brendanhiggins@google.com</email>
</author>
<published>2020-03-23T19:22:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e23349af9ee25a5760112a2f8476b94a4ec86f1c'/>
<id>urn:sha1:e23349af9ee25a5760112a2f8476b94a4ec86f1c</id>
<content type='text'>
Add a missing raw dmesg test log to test the kunit_tool's dmesg parser.
test_prefix_poundsign and test_output_with_prefix_isolated_correctly
fail without this test log.

Signed-off-by: Brendan Higgins &lt;brendanhiggins@google.com&gt;
Tested-by: David Gow &lt;davidgow@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kunit: subtests should be indented 4 spaces according to TAP</title>
<updated>2020-03-26T20:08:41Z</updated>
<author>
<name>Alan Maguire</name>
<email>alan.maguire@oracle.com</email>
</author>
<published>2020-03-26T14:25:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c3bba690a2643245f59a4d5d66e6b687459696d9'/>
<id>urn:sha1:c3bba690a2643245f59a4d5d66e6b687459696d9</id>
<content type='text'>
Introduce KUNIT_SUBTEST_INDENT macro which corresponds to 4-space
indentation and KUNIT_SUBSUBTEST_INDENT macro which corresponds to
8-space indentation in line with TAP spec (e.g. see "Subtests"
section of https://node-tap.org/tap-protocol/).

Use these macros in place of one or two tabs in strings to clarify
why we are indenting.

Suggested-by: Frank Rowand &lt;frowand.list@gmail.com&gt;
Signed-off-by: Alan Maguire &lt;alan.maguire@oracle.com&gt;
Reviewed-by: Frank Rowand &lt;frank.rowand@sony.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
</feed>
