Files
linux/lib/tests
Christian A. Ehrhardt 0913b75547 lib: kunit_iov_iter: add tests for extract_iter_to_sg
Add test cases that test extract_iter_to_sg.

For each iterator type an iterator is loaded with a suitable buffer.  The
iterator is then extracted to a scatterlist with multiple calls to
extract_iter_to_sg.  The final scatterlist is copied into a scratch
buffer.

The test passes if the scratch buffer contains the same data as the
original buffer.

The new tests demonstrate bugs in extract_iter_to_sg for kvec and user
iterators that are fixed by the previous commits.

Link: https://lkml.kernel.org/r/20260326214905.818170-6-lk@c--e.de
Signed-off-by: Christian A. Ehrhardt <lk@c--e.de>
Cc: David Howells <dhowells@redhat.com>
Cc: David Gow <davidgow@google.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Petr Mladek <pmladek@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-04-02 23:36:23 -07:00
..
2025-03-10 11:54:13 +01:00
2025-07-19 23:03:24 -07:00
2025-11-17 10:15:32 +01:00