Lines Matching defs:buf
32 char buf[6];
39 memset(buf, POISON, sizeof(buf));
41 max_count = sizeof(buf) - 2; /* Space for null and to verify overflow */
50 written = strscpy_pad(buf, src, count);
54 KUNIT_ASSERT_EQ_MSG(test, 0, strncmp(buf, src, count - 1),
56 KUNIT_ASSERT_EQ_MSG(test, buf[count - 1], '\0',
61 KUNIT_ASSERT_EQ_MSG(test, buf[i], src[i],
62 "buf[i]==%c != src[i]==%c", buf[i], src[i]);
65 KUNIT_ASSERT_EQ_MSG(test, buf[count - 1], '\0',
70 KUNIT_ASSERT_EQ_MSG(test, buf[index], '\0',
74 nr_bytes_poison = sizeof(buf) - chars - terminator - pad;
76 index = sizeof(buf) - 1 - i; /* Check from the end back */
77 KUNIT_ASSERT_EQ_MSG(test, buf[index], POISON,