]> git.baikalelectronics.ru Git - kernel.git/commit
tools/testing/scatterlist: Test new __sg_alloc_table_from_pages
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Wed, 6 Sep 2017 14:55:06 +0000 (15:55 +0100)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 7 Sep 2017 09:54:40 +0000 (10:54 +0100)
commit18580d04b99020f3e565c3ca45c2324664c7c5b1
tree9e48f5060e1391338943230d255743fb6950719a
parent2ae9facb780b019275b750249aabdf57ea86e48d
tools/testing/scatterlist: Test new __sg_alloc_table_from_pages

Exercise the new __sg_alloc_table_from_pages API (and through
it also the old sg_alloc_table_from_pages), checking that the
created table has the expected number of segments depending on
the sequence of input pages and other conditions.

v2: Move to data driven for readability.
v3: Add some more testcases and -fsanitize=undefined. (Chris Wilson)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20170906145506.14952-1-tvrtko.ursulin@linux.intel.com
[tursulin: whitespace fixup]
tools/testing/scatterlist/Makefile [new file with mode: 0644]
tools/testing/scatterlist/linux/mm.h [new file with mode: 0644]
tools/testing/scatterlist/main.c [new file with mode: 0644]