Lines Matching +full:no +full:- +full:pbl +full:- +full:x8
1 // SPDX-License-Identifier: GPL-2.0-only
79 written = min(bufsize-1, elen); in do_test()
81 pr_warn("vsnprintf(buf, %d, \"%s\", ...) did not nul-terminate buffer\n", in do_test()
86 if (memchr_inv(test_buffer + written + 1, FILL_CHAR, bufsize - (written + 1))) { in do_test()
87 pr_warn("vsnprintf(buf, %d, \"%s\", ...) wrote beyond the nul-terminator\n", in do_test()
92 if (memchr_inv(test_buffer + bufsize, FILL_CHAR, BUF_SIZE + PAD_SIZE - bufsize)) { in do_test()
152 /* Work around annoying "warning: zero-length gnu_printf format string". */ in test_basic()
164 test("0x1234abcd ", "%#-12x", 0x1234abcd); in test_number()
166 …test("0|001| 12|+123| 1234|-123|-1234", "%d|%03d|%3d|%+d|% d|%+d|% d", 0, 1, 12, 123, 1234, -123, … in test_number()
167 NOWARN(-Wformat, "Intentionally test narrowing conversion specifiers.", { in test_number()
168 test("0|1|1|128|255", "%hhu|%hhu|%hhu|%hhu|%hhu", 0, 1, 257, 128, -1); in test_number()
169 test("0|1|1|-128|-1", "%hhd|%hhd|%hhd|%hhd|%hhd", 0, 1, 257, 128, -1); in test_number()
170 test("2015122420151225", "%ho%ho%#ho", 1037, 5282, -11627); in test_number()
174 * precision of zero shall be no characters.« Hence the output in test_number()
188 test("1 | 2|3 | 4|5 ", "%-3s|%3s|%-*s|%*s|%*s", "1", "2", 3, "3", 3, "4", -3, "5"); in test_string()
189 test("1234 ", "%-10.4s", "123456"); in test_string()
198 * precision specifier as if no precision was given. in test_string()
204 test(" ", "%4.*s", -5, "123456"); in test_string()
207 test("a | | ", "%-3.s|%-3.0s|%-3.*s", "a", "b", 0, "c"); in test_string()
230 return -1; in plain_format()
239 return -1; in plain_format()
270 return -1; in plain_hash_to_buffer()
292 return -1; in plain_hash()
333 * No need to increase failed test counter since this is assumed in test_hashed()
360 test(ONES "fffffff5", "%p", ERR_PTR(-11)); in error_pointer()
361 test(ONES "fffffff5", "%px", ERR_PTR(-11)); in error_pointer()
362 test("(efault)", "%pE", ERR_PTR(-11)); in error_pointer()
406 test("c0 ff ee|c0:ff:ee|c0-ff-ee|c0ffee", in hex_string()
408 test("c0 ff ee|c0:ff:ee|c0-ff-ee|c0ffee", in hex_string()
419 test("2d-48-d6-fc-7a-05", "%pMF", addr); in mac()
455 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf}; in uuid()
457 test("00010203-0405-0607-0809-0a0b0c0d0e0f", "%pUb", uuid); in uuid()
458 test("00010203-0405-0607-0809-0A0B0C0D0E0F", "%pUB", uuid); in uuid()
459 test("03020100-0504-0706-0809-0a0b0c0d0e0f", "%pUl", uuid); in uuid()
460 test("03020100-0504-0706-0809-0A0B0C0D0E0F", "%pUL", uuid); in uuid()
495 test("bravo/alfa |bravo/alfa ", "%-12pd2|%*pd2", &test_dentry[2], -12, &test_dentry[2]); in dentry()
516 /* 2019-01-04T15:32:23 */ in time_and_date()
520 test("2018-11-26T05:35:43", "%ptR", &tm); in time_and_date()
521 test("0118-10-26T05:35:43", "%ptRr", &tm); in time_and_date()
522 test("05:35:43|2018-11-26", "%ptRt|%ptRd", &tm, &tm); in time_and_date()
523 test("05:35:43|0118-10-26", "%ptRtr|%ptRdr", &tm, &tm); in time_and_date()
524 test("05:35:43|2018-11-26", "%ptRttr|%ptRdtr", &tm, &tm); in time_and_date()
525 test("05:35:43 tr|2018-11-26 tr", "%ptRt tr|%ptRd tr", &tm, &tm); in time_and_date()
527 test("2019-01-04T15:32:23", "%ptT", &t); in time_and_date()
528 test("0119-00-04T15:32:23", "%ptTr", &t); in time_and_date()
529 test("15:32:23|2019-01-04", "%ptTt|%ptTd", &t, &t); in time_and_date()
530 test("15:32:23|0119-00-04", "%ptTtr|%ptTdr", &t, &t); in time_and_date()
532 test("2019-01-04 15:32:23", "%ptTs", &t); in time_and_date()
533 test("0119-00-04 15:32:23", "%ptTsr", &t); in time_and_date()
534 test("15:32:23|2019-01-04", "%ptTts|%ptTds", &t, &t); in time_and_date()
535 test("15:32:23|0119-00-04", "%ptTtrs|%ptTdrs", &t, &t); in time_and_date()
553 test("1-20,60000-60014", "%*pbl", nbits, bits); in large_bitmap()
566 test("|", "%20pbl|%*pbl", bits, 20, bits); in bitmap()
571 test("2-3,5,7,11,13,17,19|2-3,5,7,11,13,17,19", "%20pbl|%*pbl", bits, 20, bits); in bitmap()
575 test("0-19|0-19", "%20pbl|%*pbl", bits, 20, bits); in bitmap()
621 size += scnprintf(cmp_buf + size, BUF_SIZE - size, "%s", name); in page_flags_test()
630 size += scnprintf(cmp_buf + size, BUF_SIZE - size, "|"); in page_flags_test()
632 size += scnprintf(cmp_buf + size, BUF_SIZE - size, "%s=", in page_flags_test()
634 size += scnprintf(cmp_buf + size, BUF_SIZE - size, pft[i].fmt, in page_flags_test()
639 snprintf(cmp_buf + size, BUF_SIZE - size, ")"); in page_flags_test()
725 { 0x3231564e, "NV12 little-endian (0x3231564e)", }, in fourcc_pointer()
726 { 0xb231564e, "NV12 big-endian (0xb231564e)", }, in fourcc_pointer()
727 { 0x10111213, ".... little-endian (0x10111213)", }, in fourcc_pointer()
728 { 0x20303159, "Y10 little-endian (0x20303159)", }, in fourcc_pointer()
739 test("-1234", "%pe", ERR_PTR(-1234)); in errptr()
741 /* Check that %pe with a non-ERR_PTR gets treated as ordinary %p. */ in errptr()
746 test("(-ENOTSOCK)", "(%pe)", ERR_PTR(-ENOTSOCK)); in errptr()
747 test("(-EAGAIN)", "(%pe)", ERR_PTR(-EAGAIN)); in errptr()
749 test("(-EAGAIN)", "(%pe)", ERR_PTR(-EWOULDBLOCK)); in errptr()
750 test("[-EIO ]", "[%-8pe]", ERR_PTR(-EIO)); in errptr()
751 test("[ -EIO]", "[%8pe]", ERR_PTR(-EIO)); in errptr()
752 test("-EPROBE_DEFER", "%pe", ERR_PTR(-EPROBE_DEFER)); in errptr()