Lines Matching refs:i

124   size_t i, align_n;  in do_test_limit()  local
154 for (i = 0; i < n; i++) in do_test_limit()
155 s1[i] = s2[i] = 1 + 23 * i % max_char; in do_test_limit()
175 size_t i, buf_bound; in do_test_n() local
203 for (i = 0; i < buf_bound; i++) in do_test_n()
204 s1[i] = s2[i] = 1 + (23 << ((CHARBYTES - 1) * 8)) * i % max_char; in do_test_n()
258 size_t i, j, n, align1, align2, pos, len1, len2, size; in do_random_tests() local
288 for (i = 0; i < j; ++i) in do_random_tests()
290 p1[i] = random () & 255; in do_random_tests()
291 if (i < len1 + align1 && !p1[i]) in do_random_tests()
293 p1[i] = random () & 255; in do_random_tests()
294 if (!p1[i]) in do_random_tests()
295 p1[i] = 1 + (random () & 127); in do_random_tests()
298 for (i = 0; i < j; ++i) in do_random_tests()
300 p2[i] = random () & 255; in do_random_tests()
301 if (i < len2 + align2 && !p2[i]) in do_random_tests()
303 p2[i] = random () & 255; in do_random_tests()
304 if (!p2[i]) in do_random_tests()
305 p2[i] = 1 + (random () & 127); in do_random_tests()
354 size_t i, offset; in check1() local
366 for (i = 0; i < 80; i++) in check1()
368 exp_result = SIMPLE_STRNCMP (s1 + offset, s2 + offset, i); in check1()
370 check_result (impl, s1 + offset, s2 + offset, i, exp_result); in check1()
378 size_t i; in check2() local
382 for (i = 0; i < (page_size / CHARBYTES) - 1; i++) in check2()
383 s1[i] = 23; in check2()
384 s1[i] = 0; in check2()
388 for (i = 0; i < 64; ++i) in check2()
389 do_page_test ((3988 / CHARBYTES) + i, (2636 / CHARBYTES), s2); in check2()
463 size_t i, j, of_mask, of_idx; in check_overflow() local
473 for (i = 1; i <= 161; i += (32 / sizeof (CHAR))) in check_overflow()
475 do_test_n (j, 0, i, of_mask, 0, 127, 0); in check_overflow()
476 do_test_n (j, 0, i, of_mask, 0, 127, 1); in check_overflow()
477 do_test_n (j, 0, i, of_mask, 0, 127, -1); in check_overflow()
479 do_test_n (j, 0, i, of_mask - j / 2, 0, 127, 0); in check_overflow()
480 do_test_n (j, 0, i, of_mask - j * 2, 0, 127, 1); in check_overflow()
481 do_test_n (j, 0, i, of_mask - j, 0, 127, -1); in check_overflow()
483 do_test_n (j / 2, j, i, of_mask, 0, 127, 0); in check_overflow()
484 do_test_n (j / 2, j, i, of_mask, 0, 127, 1); in check_overflow()
485 do_test_n (j / 2, j, i, of_mask, 0, 127, -1); in check_overflow()
487 do_test_n (j / 2, j, i, of_mask - j, 0, 127, 0); in check_overflow()
488 do_test_n (j / 2, j, i, of_mask - j / 2, 0, 127, 1); in check_overflow()
489 do_test_n (j / 2, j, i, of_mask - j * 2, 0, 127, -1); in check_overflow()
491 do_test_n (0, j, i, of_mask - j * 2, 0, 127, 0); in check_overflow()
492 do_test_n (0, j, i, of_mask - j, 0, 127, 1); in check_overflow()
493 do_test_n (0, j, i, of_mask - j / 2, 0, 127, -1); in check_overflow()
495 do_test_n (getpagesize () - j - 1, 0, i, of_mask, 0, 127, 0); in check_overflow()
496 do_test_n (getpagesize () - j - 1, 0, i, of_mask, 0, 127, 1); in check_overflow()
497 do_test_n (getpagesize () - j - 1, 0, i, of_mask, 0, 127, -1); in check_overflow()
499 do_test_n (getpagesize () - j - 1, 0, i, of_mask - j / 2, 0, 127, in check_overflow()
501 do_test_n (getpagesize () - j - 1, 0, i, of_mask - j * 2, 0, 127, in check_overflow()
503 do_test_n (getpagesize () - j - 1, 0, i, of_mask - j, 0, 127, in check_overflow()
506 do_test_n (getpagesize () - j - 1, getpagesize () - 2 * j - 1, i, in check_overflow()
508 do_test_n (getpagesize () - j - 1, getpagesize () - 2 * j - 1, i, in check_overflow()
510 do_test_n (getpagesize () - j - 1, getpagesize () - 2 * j - 1, i, in check_overflow()
513 do_test_n (getpagesize () - j - 1, getpagesize () - 2 * j - 1, i, in check_overflow()
515 do_test_n (getpagesize () - j - 1, getpagesize () - 2 * j - 1, i, in check_overflow()
517 do_test_n (getpagesize () - j - 1, getpagesize () - 2 * j - 1, i, in check_overflow()
521 for (i = 1; i < test_len; i += i) in check_overflow()
523 do_test_n (j, 0, i - 1, of_mask, 0, 127, 0); in check_overflow()
524 do_test_n (j, 0, i - 1, of_mask, 0, 127, 1); in check_overflow()
525 do_test_n (j, 0, i - 1, of_mask, 0, 127, -1); in check_overflow()
527 do_test_n (j, 0, i - 1, of_mask - j / 2, 0, 127, 0); in check_overflow()
528 do_test_n (j, 0, i - 1, of_mask - j * 2, 0, 127, 1); in check_overflow()
529 do_test_n (j, 0, i - 1, of_mask - j, 0, 127, -1); in check_overflow()
531 do_test_n (j / 2, j, i - 1, of_mask, 0, 127, 0); in check_overflow()
532 do_test_n (j / 2, j, i - 1, of_mask, 0, 127, 1); in check_overflow()
533 do_test_n (j / 2, j, i - 1, of_mask, 0, 127, -1); in check_overflow()
535 do_test_n (j / 2, j, i - 1, of_mask - j, 0, 127, 0); in check_overflow()
536 do_test_n (j / 2, j, i - 1, of_mask - j / 2, 0, 127, 1); in check_overflow()
537 do_test_n (j / 2, j, i - 1, of_mask - j * 2, 0, 127, -1); in check_overflow()
539 do_test_n (0, j, i - 1, of_mask - j * 2, 0, 127, 0); in check_overflow()
540 do_test_n (0, j, i - 1, of_mask - j, 0, 127, 1); in check_overflow()
541 do_test_n (0, j, i - 1, of_mask - j / 2, 0, 127, -1); in check_overflow()
543 do_test_n (getpagesize () - j - 1, 0, i - 1, of_mask, 0, 127, 0); in check_overflow()
544 do_test_n (getpagesize () - j - 1, 0, i - 1, of_mask, 0, 127, 1); in check_overflow()
545 do_test_n (getpagesize () - j - 1, 0, i - 1, of_mask, 0, 127, in check_overflow()
548 do_test_n (getpagesize () - j - 1, 0, i - 1, of_mask - j / 2, 0, in check_overflow()
550 do_test_n (getpagesize () - j - 1, 0, i - 1, of_mask - j * 2, 0, in check_overflow()
552 do_test_n (getpagesize () - j - 1, 0, i - 1, of_mask - j, 0, 127, in check_overflow()
556 i - 1, of_mask, 0, 127, 0); in check_overflow()
558 i - 1, of_mask, 0, 127, 1); in check_overflow()
560 i - 1, of_mask, 0, 127, -1); in check_overflow()
563 i - 1, of_mask - j, 0, 127, 0); in check_overflow()
565 i - 1, of_mask - j / 2, 0, 127, 1); in check_overflow()
567 i - 1, of_mask - j * 2, 0, 127, -1); in check_overflow()
576 size_t i, j, k; in test_main() local
591 for (i =0; i < 16; ++i) in test_main()
593 do_test (0, 0, 8, i, 127, 0); in test_main()
594 do_test (0, 0, 8, i, 127, -1); in test_main()
595 do_test (0, 0, 8, i, 127, 1); in test_main()
596 do_test (i, i, 8, i, 127, 0); in test_main()
597 do_test (i, i, 8, i, 127, 1); in test_main()
598 do_test (i, i, 8, i, 127, -1); in test_main()
599 do_test (i, 2 * i, 8, i, 127, 0); in test_main()
600 do_test (2 * i, i, 8, i, 127, 1); in test_main()
601 do_test (i, 3 * i, 8, i, 127, -1); in test_main()
602 do_test (0, 0, 8, i, 255, 0); in test_main()
603 do_test (0, 0, 8, i, 255, -1); in test_main()
604 do_test (0, 0, 8, i, 255, 1); in test_main()
605 do_test (i, i, 8, i, 255, 0); in test_main()
606 do_test (i, i, 8, i, 255, 1); in test_main()
607 do_test (i, i, 8, i, 255, -1); in test_main()
608 do_test (i, 2 * i, 8, i, 255, 0); in test_main()
609 do_test (2 * i, i, 8, i, 255, 1); in test_main()
610 do_test (i, 3 * i, 8, i, 255, -1); in test_main()
613 for (i = 1; i < 8; ++i) in test_main()
615 do_test (0, 0, 8 << i, 16 << i, 127, 0); in test_main()
616 do_test (0, 0, 8 << i, 16 << i, 127, 1); in test_main()
617 do_test (0, 0, 8 << i, 16 << i, 127, -1); in test_main()
618 do_test (0, 0, 8 << i, 16 << i, 255, 0); in test_main()
619 do_test (0, 0, 8 << i, 16 << i, 255, 1); in test_main()
620 do_test (0, 0, 8 << i, 16 << i, 255, -1); in test_main()
621 do_test (8 - i, 2 * i, 8 << i, 16 << i, 127, 0); in test_main()
622 do_test (8 - i, 2 * i, 8 << i, 16 << i, 127, 1); in test_main()
623 do_test (2 * i, i, 8 << i, 16 << i, 255, 0); in test_main()
624 do_test (2 * i, i, 8 << i, 16 << i, 255, 1); in test_main()
633 for (i = 0; i < 8; ++i) in test_main()
635 do_test_limit (0, 0, 17 - i, 16 - i, 127, 0); in test_main()
636 do_test_limit (0, 0, 17 - i, 16 - i, 255, 0); in test_main()
637 do_test_limit (0, 0, 15 - i, 16 - i, 127, 0); in test_main()
638 do_test_limit (0, 0, 15 - i, 16 - i, 127, 1); in test_main()
639 do_test_limit (0, 0, 15 - i, 16 - i, 127, -1); in test_main()
640 do_test_limit (0, 0, 15 - i, 16 - i, 255, 0); in test_main()
641 do_test_limit (0, 0, 15 - i, 16 - i, 255, 1); in test_main()
642 do_test_limit (0, 0, 15 - i, 16 - i, 255, -1); in test_main()
647 for (i = 0; i < test_len;) in test_main()
649 do_test_n (getpagesize () - j - 1, 0, i, i + 1, 0, 127, 0); in test_main()
650 do_test_n (getpagesize () - j - 1, 0, i, i + 1, 0, 127, 1); in test_main()
651 do_test_n (getpagesize () - j - 1, 0, i, i + 1, 0, 127, -1); in test_main()
653 do_test_n (getpagesize () - j - 1, 0, i, i, 0, 127, 0); in test_main()
654 do_test_n (getpagesize () - j - 1, 0, i, i - 1, 0, 127, 0); in test_main()
656 do_test_n (getpagesize () - j - 1, 0, i, ULONG_MAX, 0, 127, 0); in test_main()
657 do_test_n (getpagesize () - j - 1, 0, i, ULONG_MAX, 0, 127, 1); in test_main()
658 do_test_n (getpagesize () - j - 1, 0, i, ULONG_MAX, 0, 127, -1); in test_main()
660 do_test_n (getpagesize () - j - 1, 0, i, ULONG_MAX - i, 0, 127, 0); in test_main()
661 do_test_n (getpagesize () - j - 1, 0, i, ULONG_MAX - i, 0, 127, 1); in test_main()
662 do_test_n (getpagesize () - j - 1, 0, i, ULONG_MAX - i, 0, 127, -1); in test_main()
664 do_test_n (getpagesize () - j - 1, j, i, i + 1, 0, 127, 0); in test_main()
665 do_test_n (getpagesize () - j - 1, j, i, i + 1, 0, 127, 1); in test_main()
666 do_test_n (getpagesize () - j - 1, j, i, i + 1, 0, 127, -1); in test_main()
668 do_test_n (getpagesize () - j - 1, j, i, i, 0, 127, 0); in test_main()
669 do_test_n (getpagesize () - j - 1, j, i, i - 1, 0, 127, 0); in test_main()
671 do_test_n (getpagesize () - j - 1, j, i, ULONG_MAX, 0, 127, 0); in test_main()
672 do_test_n (getpagesize () - j - 1, j, i, ULONG_MAX, 0, 127, 1); in test_main()
673 do_test_n (getpagesize () - j - 1, j, i, ULONG_MAX, 0, 127, -1); in test_main()
675 do_test_n (getpagesize () - j - 1, j, i, ULONG_MAX - i, 0, 127, 0); in test_main()
676 do_test_n (getpagesize () - j - 1, j, i, ULONG_MAX - i, 0, 127, 1); in test_main()
677 do_test_n (getpagesize () - j - 1, j, i, ULONG_MAX - i, 0, 127, -1); in test_main()
679 do_test_n (0, getpagesize () - j - 1, i, i + 1, 0, 127, 0); in test_main()
680 do_test_n (0, getpagesize () - j - 1, i, i + 1, 0, 127, 1); in test_main()
681 do_test_n (0, getpagesize () - j - 1, i, i + 1, 0, 127, -1); in test_main()
683 do_test_n (0, getpagesize () - j - 1, i, i, 0, 127, 0); in test_main()
684 do_test_n (0, getpagesize () - j - 1, i, i - 1, 0, 127, 0); in test_main()
686 do_test_n (0, getpagesize () - j - 1, i, ULONG_MAX, 0, 127, 0); in test_main()
687 do_test_n (0, getpagesize () - j - 1, i, ULONG_MAX, 0, 127, 1); in test_main()
688 do_test_n (0, getpagesize () - j - 1, i, ULONG_MAX, 0, 127, -1); in test_main()
690 do_test_n (0, getpagesize () - j - 1, i, ULONG_MAX - i, 0, 127, 0); in test_main()
691 do_test_n (0, getpagesize () - j - 1, i, ULONG_MAX - i, 0, 127, 1); in test_main()
692 do_test_n (0, getpagesize () - j - 1, i, ULONG_MAX - i, 0, 127, -1); in test_main()
694 do_test_n (j, getpagesize () - j - 1, i, i + 1, 0, 127, 0); in test_main()
695 do_test_n (j, getpagesize () - j - 1, i, i + 1, 0, 127, 1); in test_main()
696 do_test_n (j, getpagesize () - j - 1, i, i + 1, 0, 127, -1); in test_main()
698 do_test_n (j, getpagesize () - j - 1, i, i, 0, 127, 0); in test_main()
699 do_test_n (j, getpagesize () - j - 1, i, i - 1, 0, 127, 0); in test_main()
701 do_test_n (j, getpagesize () - j - 1, i, ULONG_MAX, 0, 127, 0); in test_main()
702 do_test_n (j, getpagesize () - j - 1, i, ULONG_MAX, 0, 127, 1); in test_main()
703 do_test_n (j, getpagesize () - j - 1, i, ULONG_MAX, 0, 127, -1); in test_main()
705 do_test_n (j, getpagesize () - j - 1, i, ULONG_MAX - i, 0, 127, 0); in test_main()
706 do_test_n (j, getpagesize () - j - 1, i, ULONG_MAX - i, 0, 127, 1); in test_main()
707 do_test_n (j, getpagesize () - j - 1, i, ULONG_MAX - i, 0, 127, -1); in test_main()
711 do_test (getpagesize () - k, getpagesize () - j - 1, i - 1, i, in test_main()
713 do_test (getpagesize () - k - 1, getpagesize () - j - 1, i - 1, in test_main()
714 i, 127, 0); in test_main()
715 do_test (getpagesize () - k, getpagesize () - j - 1, i + 1, i, in test_main()
717 do_test (getpagesize () - k - 1, getpagesize () - j - 1, i + 1, in test_main()
718 i, 127, 0); in test_main()
719 do_test (getpagesize () - k, getpagesize () - j - 1, i, i, 127, in test_main()
721 do_test (getpagesize () - k - 1, getpagesize () - j - 1, i, i, in test_main()
723 do_test (getpagesize () - k, getpagesize () - j - 1, i + 1, i, in test_main()
725 do_test (getpagesize () - k - 1, getpagesize () - j - 1, i + 1, in test_main()
726 i, 127, -1); in test_main()
727 do_test (getpagesize () - k, getpagesize () - j - 1, i + 1, i, in test_main()
729 do_test (getpagesize () - k - 1, getpagesize () - j - 1, i + 1, in test_main()
730 i, 127, 1); in test_main()
733 if (i < 32) in test_main()
735 i += 1; in test_main()
737 else if (i < 161) in test_main()
739 i += 7; in test_main()
741 else if (i + 161 < test_len) in test_main()
743 i += 31; in test_main()
744 i *= 17; in test_main()
745 i /= 16; in test_main()
746 if (i + 161 > test_len) in test_main()
748 i = test_len - 160; in test_main()
751 else if (i + 32 < test_len) in test_main()
753 i += 7; in test_main()
757 i += 1; in test_main()