Lines Matching +full:0 +full:xa7

66 	for (; n_args > 0; n_args--, expect++) {				\
75 return 0; \
76 } while (0)
160 0x0ULL,
161 0x1ULL,
162 0x7fULL,
163 0x80ULL,
164 0x81ULL,
165 0xffULL,
166 0x100ULL,
167 0x101ULL,
168 0x7fffULL,
169 0x8000ULL,
170 0x8001ULL,
171 0xffffULL,
172 0x10000ULL,
173 0x10001ULL,
174 0x7fffffffULL,
175 0x80000000ULL,
176 0x80000001ULL,
177 0xffffffffULL,
178 0x100000000ULL,
179 0x100000001ULL,
180 0x7fffffffffffffffULL,
181 0x8000000000000000ULL,
182 0x8000000000000001ULL,
183 0xfffffffffffffffeULL,
184 0xffffffffffffffffULL,
200 } while (0)
206 for (i = 0; i < ARRAY_SIZE(numbers); i++) { \
215 } while (0)
224 simple_numbers_loop(long long, "0x%llx", "lli", check_ll); in numbers_simple()
225 simple_numbers_loop(unsigned long long, "0x%llx", "llx", check_ull); in numbers_simple()
226 simple_numbers_loop(long long, "0x%llx", "llx", check_ll); in numbers_simple()
233 simple_numbers_loop(long, "0x%lx", "li", check_long); in numbers_simple()
234 simple_numbers_loop(unsigned long, "0x%lx", "lx", check_ulong); in numbers_simple()
235 simple_numbers_loop(long, "0x%lx", "lx", check_long); in numbers_simple()
242 simple_numbers_loop(int, "0x%x", "i", check_int); in numbers_simple()
243 simple_numbers_loop(unsigned int, "0x%x", "x", check_uint); in numbers_simple()
244 simple_numbers_loop(int, "0x%x", "x", check_int); in numbers_simple()
251 simple_numbers_loop(short, "0x%hx", "hi", check_short); in numbers_simple()
252 simple_numbers_loop(unsigned short, "0x%hx", "hx", check_ushort); in numbers_simple()
253 simple_numbers_loop(short, "0x%hx", "hx", check_short); in numbers_simple()
260 simple_numbers_loop(signed char, "0x%hhx", "hhi", check_char); in numbers_simple()
261 simple_numbers_loop(unsigned char, "0x%hhx", "hhx", check_uchar); in numbers_simple()
262 simple_numbers_loop(signed char, "0x%hhx", "hhx", check_char); in numbers_simple()
274 return prandom_u32_state(&rnd_state) & GENMASK(n_bits, 0); in next_test_random()
283 return val & GENMASK_ULL(n_bits, 0); in next_test_random_ull()
295 #define NEGATIVES_PATTERN 0x3246 /* 00110010 01000110 */
302 for (i = 0; i < ARRAY_SIZE(arr); i++, neg_pattern >>= 1) { \
303 (arr)[i] = random_for_type(typeof((arr)[0])); \
304 if (is_signed_type(typeof((arr)[0])) && (neg_pattern & 1)) \
307 } while (0)
312 * On error buf_pos is not changed and return value is 0.
324 if (field_len < 0) in append_fmt()
325 field_len = 0; in append_fmt()
348 &(arr)[0], &(arr)[1], &(arr)[2], &(arr)[3], \
350 } while (0)
354 int i, pos = 0, fmt_pos = 0; \
359 for (i = 0; i < ARRAY_SIZE(expect); i++) { \
360 if (i != 0) \
370 } while (0)
378 } while (0)
382 int i, val_len, pos = 0, fmt_pos = 0; \
387 for (i = 0; i < ARRAY_SIZE(expect); i++) { \
388 if (i != 0) \
399 } while (0)
407 numbers_list_8(unsigned long long, "0x%llx", delim, "llx", check_ull); in numbers_list_ll()
408 numbers_list_8(long long, "0x%llx", delim, "lli", check_ll); in numbers_list_ll()
417 numbers_list_8(unsigned long, "0x%lx", delim, "lx", check_ulong); in numbers_list_l()
418 numbers_list_8(long, "0x%lx", delim, "li", check_long); in numbers_list_l()
427 numbers_list_8(unsigned int, "0x%x", delim, "x", check_uint); in numbers_list_d()
428 numbers_list_8(int, "0x%x", delim, "i", check_int); in numbers_list_d()
437 numbers_list_8(unsigned short, "0x%hx", delim, "hx", check_ushort); in numbers_list_h()
438 numbers_list_8(short, "0x%hx", delim, "hi", check_short); in numbers_list_h()
447 numbers_list_8(unsigned char, "0x%hhx", delim, "hhx", check_uchar); in numbers_list_hh()
448 numbers_list_8(signed char, "0x%hhx", delim, "hhi", check_char); in numbers_list_hh()
466 numbers_list_fix_width(unsigned long long, "0x%llx", delim, 18, "llx", check_ull); in numbers_list_field_width_ll()
467 numbers_list_fix_width(long long, "0x%llx", delim, 18, "lli", check_ll); in numbers_list_field_width_ll()
477 numbers_list_fix_width(unsigned long, "0x%lx", delim, 18, "lx", check_ulong); in numbers_list_field_width_l()
478 numbers_list_fix_width(long, "0x%lx", delim, 18, "li", check_long); in numbers_list_field_width_l()
484 numbers_list_fix_width(unsigned long, "0x%lx", delim, 10, "lx", check_ulong); in numbers_list_field_width_l()
485 numbers_list_fix_width(long, "0x%lx", delim, 10, "li", check_long); in numbers_list_field_width_l()
495 numbers_list_fix_width(unsigned int, "0x%x", delim, 10, "x", check_uint); in numbers_list_field_width_d()
496 numbers_list_fix_width(int, "0x%x", delim, 10, "i", check_int); in numbers_list_field_width_d()
505 numbers_list_fix_width(unsigned short, "0x%hx", delim, 6, "hx", check_ushort); in numbers_list_field_width_h()
506 numbers_list_fix_width(short, "0x%hx", delim, 6, "hi", check_short); in numbers_list_field_width_h()
515 numbers_list_fix_width(unsigned char, "0x%hhx", delim, 4, "hhx", check_uchar); in numbers_list_field_width_hh()
516 numbers_list_fix_width(signed char, "0x%hhx", delim, 4, "hhi", check_char); in numbers_list_field_width_hh()
538 numbers_list_val_width(unsigned long long, "0x%llx", delim, "llx", check_ull); in numbers_list_field_width_val_ll()
539 numbers_list_val_width(long long, "0x%llx", delim, "lli", check_ll); in numbers_list_field_width_val_ll()
548 numbers_list_val_width(unsigned long, "0x%lx", delim, "lx", check_ulong); in numbers_list_field_width_val_l()
549 numbers_list_val_width(long, "0x%lx", delim, "li", check_long); in numbers_list_field_width_val_l()
558 numbers_list_val_width(unsigned int, "0x%x", delim, "x", check_uint); in numbers_list_field_width_val_d()
559 numbers_list_val_width(int, "0x%x", delim, "i", check_int); in numbers_list_field_width_val_d()
568 numbers_list_val_width(unsigned short, "0x%hx", delim, "hx", check_ushort); in numbers_list_field_width_val_h()
569 numbers_list_val_width(short, "0x%hx", delim, "hi", check_short); in numbers_list_field_width_val_h()
578 numbers_list_val_width(unsigned char, "0x%hhx", delim, "hhx", check_uchar); in numbers_list_field_width_val_hh()
579 numbers_list_val_width(signed char, "0x%hhx", delim, "hhi", check_char); in numbers_list_field_width_val_hh()
609 T result[2] = { (T)~expect[0], (T)~expect[1] }; \
611 _test(fn, &expect, str, scan_fmt, n_args, &result[0], &result[1]); \
612 } while (0)
622 * and return 0. in numbers_prefix_overflow()
624 test_number_prefix(long long, "-1 1", "%1lld %lld", 0, 0, 0, check_ll); in numbers_prefix_overflow()
625 test_number_prefix(long, "-1 1", "%1ld %ld", 0, 0, 0, check_long); in numbers_prefix_overflow()
626 test_number_prefix(int, "-1 1", "%1d %d", 0, 0, 0, check_int); in numbers_prefix_overflow()
627 test_number_prefix(short, "-1 1", "%1hd %hd", 0, 0, 0, check_short); in numbers_prefix_overflow()
628 test_number_prefix(signed char, "-1 1", "%1hhd %hhd", 0, 0, 0, check_char); in numbers_prefix_overflow()
630 test_number_prefix(long long, "-1 1", "%1lli %lli", 0, 0, 0, check_ll); in numbers_prefix_overflow()
631 test_number_prefix(long, "-1 1", "%1li %li", 0, 0, 0, check_long); in numbers_prefix_overflow()
632 test_number_prefix(int, "-1 1", "%1i %i", 0, 0, 0, check_int); in numbers_prefix_overflow()
633 test_number_prefix(short, "-1 1", "%1hi %hi", 0, 0, 0, check_short); in numbers_prefix_overflow()
634 test_number_prefix(signed char, "-1 1", "%1hhi %hhi", 0, 0, 0, check_char); in numbers_prefix_overflow()
637 * 0x prefix in a field of width 1: 0 is a valid digit so should in numbers_prefix_overflow()
641 test_number_prefix(unsigned long long, "0xA7", "%1llx%llx", 0, 0, 1, check_ull); in numbers_prefix_overflow()
642 test_number_prefix(unsigned long, "0xA7", "%1lx%lx", 0, 0, 1, check_ulong); in numbers_prefix_overflow()
643 test_number_prefix(unsigned int, "0xA7", "%1x%x", 0, 0, 1, check_uint); in numbers_prefix_overflow()
644 test_number_prefix(unsigned short, "0xA7", "%1hx%hx", 0, 0, 1, check_ushort); in numbers_prefix_overflow()
645 test_number_prefix(unsigned char, "0xA7", "%1hhx%hhx", 0, 0, 1, check_uchar); in numbers_prefix_overflow()
646 test_number_prefix(long long, "0xA7", "%1lli%llx", 0, 0, 1, check_ll); in numbers_prefix_overflow()
647 test_number_prefix(long, "0xA7", "%1li%lx", 0, 0, 1, check_long); in numbers_prefix_overflow()
648 test_number_prefix(int, "0xA7", "%1i%x", 0, 0, 1, check_int); in numbers_prefix_overflow()
649 test_number_prefix(short, "0xA7", "%1hi%hx", 0, 0, 1, check_short); in numbers_prefix_overflow()
650 test_number_prefix(char, "0xA7", "%1hhi%hhx", 0, 0, 1, check_char); in numbers_prefix_overflow()
653 * 0x prefix in a field of width 2 using %x conversion: first field in numbers_prefix_overflow()
654 * converts to 0. Next field scan starts at the character after "0x". in numbers_prefix_overflow()
657 test_number_prefix(unsigned long long, "0xA7", "%2llx%llx", 0, 0xa7, 2, check_ull); in numbers_prefix_overflow()
658 test_number_prefix(unsigned long, "0xA7", "%2lx%lx", 0, 0xa7, 2, check_ulong); in numbers_prefix_overflow()
659 test_number_prefix(unsigned int, "0xA7", "%2x%x", 0, 0xa7, 2, check_uint); in numbers_prefix_overflow()
660 test_number_prefix(unsigned short, "0xA7", "%2hx%hx", 0, 0xa7, 2, check_ushort); in numbers_prefix_overflow()
661 test_number_prefix(unsigned char, "0xA7", "%2hhx%hhx", 0, 0xa7, 2, check_uchar); in numbers_prefix_overflow()
664 * 0x prefix in a field of width 2 using %i conversion: first field in numbers_prefix_overflow()
665 * converts to 0. Next field scan starts at the character after "0x", in numbers_prefix_overflow()
667 * if it contains any hex digits (since no 0x prefix). in numbers_prefix_overflow()
669 test_number_prefix(long long, "0x67", "%2lli%lli", 0, 67, 2, check_ll); in numbers_prefix_overflow()
670 test_number_prefix(long, "0x67", "%2li%li", 0, 67, 2, check_long); in numbers_prefix_overflow()
671 test_number_prefix(int, "0x67", "%2i%i", 0, 67, 2, check_int); in numbers_prefix_overflow()
672 test_number_prefix(short, "0x67", "%2hi%hi", 0, 67, 2, check_short); in numbers_prefix_overflow()
673 test_number_prefix(char, "0x67", "%2hhi%hhi", 0, 67, 2, check_char); in numbers_prefix_overflow()
675 test_number_prefix(long long, "0xA7", "%2lli%lli", 0, 0, 1, check_ll); in numbers_prefix_overflow()
676 test_number_prefix(long, "0xA7", "%2li%li", 0, 0, 1, check_long); in numbers_prefix_overflow()
677 test_number_prefix(int, "0xA7", "%2i%i", 0, 0, 1, check_int); in numbers_prefix_overflow()
678 test_number_prefix(short, "0xA7", "%2hi%hi", 0, 0, 1, check_short); in numbers_prefix_overflow()
679 test_number_prefix(char, "0xA7", "%2hhi%hhi", 0, 0, 1, check_char); in numbers_prefix_overflow()
699 pr_warn(#fn "(\"%s\", %d) startp=0x%px got endp=0x%px expected 0x%px\n", \
706 } while (0)
712 for (i = 0; i < ARRAY_SIZE(numbers); i++) { \
719 } while (0)
724 test_simple_strtoxx(unsigned long long, simple_strtoull, "%llu", 0); in test_simple_strtoull()
726 test_simple_strtoxx(unsigned long long, simple_strtoull, "0x%llx", 16); in test_simple_strtoull()
727 test_simple_strtoxx(unsigned long long, simple_strtoull, "0x%llx", 0); in test_simple_strtoull()
733 test_simple_strtoxx(long long, simple_strtoll, "%lld", 0); in test_simple_strtoll()
735 test_simple_strtoxx(long long, simple_strtoll, "0x%llx", 16); in test_simple_strtoll()
736 test_simple_strtoxx(long long, simple_strtoll, "0x%llx", 0); in test_simple_strtoll()
742 test_simple_strtoxx(unsigned long, simple_strtoul, "%lu", 0); in test_simple_strtoul()
744 test_simple_strtoxx(unsigned long, simple_strtoul, "0x%lx", 16); in test_simple_strtoul()
745 test_simple_strtoxx(unsigned long, simple_strtoul, "0x%lx", 0); in test_simple_strtoul()
751 test_simple_strtoxx(long, simple_strtol, "%ld", 0); in test_simple_strtol()
753 test_simple_strtoxx(long, simple_strtol, "0x%lx", 16); in test_simple_strtol()
754 test_simple_strtoxx(long, simple_strtol, "0x%lx", 0); in test_simple_strtol()
770 for (i = 0; i < ARRAY_SIZE(number_delimiters); i++) { in test_numbers()