Documentation: KUnit: reword description of assertions
Daniel Latypov authored
The existing wording implies that kunit_kmalloc_array() is "the method
under test". We're actually testing the sort() function in that example.
This is because the example was changed in commit 95357439


("Documentation: KUnit: Rework writing page to focus on writing tests"),
but the wording was not.

Also add a `note` telling people they can use the KUNIT_ASSERT_EQ()
macros from any function. Some users might be coming from a framework
like gUnit where that'll compile but silently do the wrong thing.
Signed-off-by: default avatarDaniel Latypov <dlatypov@google.com>
Reviewed-by: default avatarSadiya Kazi <sadiyakazi@google.com>
Reviewed-by: default avatarDavid Gow <davidgow@google.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
ec0a42a1
Name Last commit Last update
Documentation Documentation: KUnit: reword description of assertions
LICENSES LICENSES/LGPL-2.1: Add LGPL-2.1-or-later as valid identifiers
arch Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
block Merge tag 'block-6.1-2022-10-20' of git://git.kernel.dk/linux
certs certs: make system keyring depend on built-in x509 parser
crypto treewide: use get_random_bytes() when possible
drivers kunit: Use KUNIT_EXPECT_MEMEQ macro
fs Merge tag 'efi-fixes-for-v6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi
include kunit: eliminate KUNIT_INIT_*_ASSERT_STRUCT macros
init init: Kconfig: fix spelling mistake "satify" -> "satisfy"
io_uring io_uring/net: fail zc sendmsg when unsupported by socket
ipc Merge tag 'mm-nonmm-stable-2022-10-11' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
kernel kernel/utsname_sysctl.c: Fix hostname polling
lib kunit: remove unused structure definition
mm mm/huge_memory: do not clobber swp_entry_t during THP split
net kunit: Use KUNIT_EXPECT_MEMEQ macro
rust Kbuild: add Rust support
samples Merge tag 'vfio-v6.1-rc1' of https://github.com/awilliam/linux-vfio
scripts Merge tag 'kbuild-fixes-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
security selinux: enable use of both GFP_KERNEL and GFP_ATOMIC in convert_context()
sound Merge tag 'sound-fix-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
tools kunit: tool: remove redundant file.close() call in unit test
usr usr/gen_init_cpio.c: remove unnecessary -1 values from int file
virt kvm: Add support for arch compat vm ioctls
.clang-format PCI/DOE: Add DOE mailbox support functions
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.