]> git.baikalelectronics.ru Git - kernel.git/commit
lib/list_sort: test: check element addresses
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 26 Oct 2010 21:23:08 +0000 (14:23 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Oct 2010 23:52:19 +0000 (16:52 -0700)
commit22c9d84188d1e3f0d67ea513396760adbe5da0b7
treeca76ca89b76360f9fbc5987519d6cf0c8c53cdda
parentfc951e63468a9b9b8d1e8672b2d7d2269ed863e3
lib/list_sort: test: check element addresses

Improve 'lib_sort()' test and check that:
 o 'cmp()' is called only for elements which were present in the original list,
   i.e., the 'a' and 'b' parameters are valid
 o the resulted (sorted) list consists onlly of the original elements
 o intdoruce "poison" fields to make sure data around 'struc list_head' field
   are not corrupted.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: Don Mullis <don.mullis@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/list_sort.c