Details:
strncmp case fails in kernel space.
static void
test_strncmp (void)
{
/* First test as strcmp with big counts, then test count code. */
it = "strncmp";
check (strncmp ("a\203", "a", 2) > 0, 8); /* Tricky if '\203' < 0 */
check (strncmp ("a\203", "a\003", 2) > 0, 9);
...
}
root:/proc/sys/kernel> insmod /lib/modules/string_test.ko
strncmp flunked test 8
strncmp flunked test 9
|
Details:
strncmp case fails in kernel space.
static void
test_strncmp (void)
{
/* First test as strcmp with big counts, then test count code. */
it = "strncmp";
check (strncmp ("a\203", "a", 2) > 0, 8); /* Tricky if '\203' < 0 */
check (strncmp ("a\203", "a\003", 2) > 0, 9);
...
}
root:/proc/sys/kernel> insmod /lib/modules/string_test.ko
strncmp flunked test 8
strncmp flunked test 9
|