From 81cbc3bcaed730aa5d9e5d4ec46a0d4cb9eb6cd5 Mon Sep 17 00:00:00 2001 From: noah Date: Sat, 3 Apr 2021 04:12:16 -0400 Subject: x86: Expanding test-memmove.c, test-memcpy.c, bench-memcpy-large.c No Bug. This commit expanding the range of tests / benchmarks for memmove and memcpy. The test expansion is mostly in the vein of increasing the maximum size, increasing the number of unique alignments tested, and testing both source < destination and vice versa. The benchmark expansaion is just to increase the number of unique alignments. test-memcpy, test-memccpy, test-mempcpy, test-memmove, and tst-memmove-overflow all pass. Signed-off-by: Noah Goldstein --- benchtests/bench-memcpy-large.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'benchtests/bench-memcpy-large.c') diff --git a/benchtests/bench-memcpy-large.c b/benchtests/bench-memcpy-large.c index 3df1575514..efb9627b1e 100644 --- a/benchtests/bench-memcpy-large.c +++ b/benchtests/bench-memcpy-large.c @@ -57,11 +57,11 @@ do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len) size_t i, j; char *s1, *s2; - align1 &= 63; + align1 &= 4095; if (align1 + len >= page_size) return; - align2 &= 63; + align2 &= 4095; if (align2 + len >= page_size) return; @@ -113,6 +113,10 @@ test_main (void) do_test (&json_ctx, 0, 3, i + 15); do_test (&json_ctx, 3, 0, i + 31); do_test (&json_ctx, 3, 5, i + 63); + do_test (&json_ctx, 0, 127, i); + do_test (&json_ctx, 0, 255, i); + do_test (&json_ctx, 0, 256, i); + do_test (&json_ctx, 0, 4064, i); } json_array_end (&json_ctx); -- cgit 1.4.1