Commit c815f04b authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'linux-kselftest-kunit-5.15-rc1' of...

Merge tag 'linux-kselftest-kunit-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

Pull KUnit updates from Shuah Khan:
 "This KUnit update for Linux 5.15-rc1 adds new features and tests:

  Tool:

   - support for '--kernel_args' to allow setting module params

   - support for '--raw_output' option to show just the kunit output
     during make

  Tests:

   - new KUnit tests for checksums and timestamps

   - Print test statistics on failure

   - Integrates UBSAN into the KUnit testing framework. It fails KUnit
     tests whenever it reports undefined behavior"

* tag 'linux-kselftest-kunit-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  kunit: Print test statistics on failure
  kunit: tool: make --raw_output support only showing kunit output
  kunit: tool: add --kernel_args to allow setting module params
  kunit: ubsan integration
  fat: Add KUnit tests for checksums and timestamps
parents 612b23f2 acd8e840
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -114,9 +114,12 @@ results in TAP format, you can pass the ``--raw_output`` argument.

	./tools/testing/kunit/kunit.py run --raw_output

.. note::
The raw output from test runs may contain other, non-KUnit kernel log
	lines.
lines. You can see just KUnit output with ``--raw_output=kunit``:

.. code-block:: bash

	./tools/testing/kunit/kunit.py run --raw_output=kunit

If you have KUnit results in their raw TAP format, you can parse them and print
the human-readable summary with the ``parse`` command for kunit_tool. This
+10 −0
Original line number Diff line number Diff line
@@ -80,6 +80,16 @@ file ``.kunitconfig``, you can just pass in the dir, e.g.
	automagically, but tests could theoretically depend on incompatible
	options, so handling that would be tricky.

Setting kernel commandline parameters
-------------------------------------

You can use ``--kernel_args`` to pass arbitrary kernel arguments, e.g.

.. code-block:: bash

	$ ./tools/testing/kunit/kunit.py run --kernel_args=param=42 --kernel_args=param2=false


Generating code coverage reports under UML
------------------------------------------

fs/fat/.kunitconfig

0 → 100644
+5 −0
Original line number Diff line number Diff line
CONFIG_KUNIT=y
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_FAT_KUNIT_TEST=y
+13 −1
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ config VFAT_FS

config FAT_DEFAULT_CODEPAGE
	int "Default codepage for FAT"
	depends on MSDOS_FS || VFAT_FS
	depends on FAT_FS
	default 437
	help
	  This option should be set to the codepage of your FAT filesystems.
@@ -115,3 +115,15 @@ config FAT_DEFAULT_UTF8
	  Say Y if you use UTF-8 encoding for file names, N otherwise.

	  See <file:Documentation/filesystems/vfat.rst> for more information.

config FAT_KUNIT_TEST
	tristate "Unit Tests for FAT filesystems" if !KUNIT_ALL_TESTS
	depends on KUNIT && FAT_FS
	default KUNIT_ALL_TESTS
	help
	  This builds the FAT KUnit tests

	  For more information on KUnit and unit tests in general, please refer
	  to the KUnit documentation in Documentation/dev-tools/kunit

	  If unsure, say N
+2 −0
Original line number Diff line number Diff line
@@ -10,3 +10,5 @@ obj-$(CONFIG_MSDOS_FS) += msdos.o
fat-y := cache.o dir.o fatent.o file.o inode.o misc.o nfs.o
vfat-y := namei_vfat.o
msdos-y := namei_msdos.o

obj-$(CONFIG_FAT_KUNIT_TEST) += fat_test.o
Loading