diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2015-12-13 06:54:06 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-01-08 19:57:33 +0200 |
commit | 21022f076d4047348f377a1938079c046de13f42 (patch) | |
tree | 60611910cfcaeda659211a2455babbe065a1ac30 /tests | |
parent | 86382de3fb17582470b32bd955ad31be201b7304 (diff) |
tests/gem_mmap_gtt: Add progress indicators
Some of the copy tests take a while, so let the user know how
far along we are via a progress indicator.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gem_mmap_gtt.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/gem_mmap_gtt.c b/tests/gem_mmap_gtt.c index 3cd37427..57492d8b 100644 --- a/tests/gem_mmap_gtt.c +++ b/tests/gem_mmap_gtt.c @@ -453,8 +453,10 @@ test_huge_copy(int fd, int huge, int tiling_a, int tiling_b) igt_require(a); gem_close(fd, bo); - for (i = 0; i < huge_object_size / PAGE_SIZE; i++) + for (i = 0; i < huge_object_size / PAGE_SIZE; i++) { memcpy(a + PAGE_SIZE*i, pattern_a, PAGE_SIZE); + igt_progress("Writing a ", i, huge_object_size / PAGE_SIZE); + } bo = gem_create(fd, huge_object_size); if (tiling_b) @@ -463,14 +465,17 @@ test_huge_copy(int fd, int huge, int tiling_a, int tiling_b) igt_require(b); gem_close(fd, bo); - for (i = 0; i < huge_object_size / PAGE_SIZE; i++) + for (i = 0; i < huge_object_size / PAGE_SIZE; i++) { memcpy(b + PAGE_SIZE*i, pattern_b, PAGE_SIZE); + igt_progress("Writing b ", i, huge_object_size / PAGE_SIZE); + } for (i = 0; i < huge_object_size / PAGE_SIZE; i++) { if (i & 1) memcpy(a + i *PAGE_SIZE, b + i*PAGE_SIZE, PAGE_SIZE); else memcpy(b + i *PAGE_SIZE, a + i*PAGE_SIZE, PAGE_SIZE); + igt_progress("Copying a<->b ", i, huge_object_size / PAGE_SIZE); } for (i = 0; i < huge_object_size / PAGE_SIZE; i++) { @@ -478,6 +483,7 @@ test_huge_copy(int fd, int huge, int tiling_a, int tiling_b) igt_assert(memcmp(pattern_b, a + PAGE_SIZE*i, PAGE_SIZE) == 0); else igt_assert(memcmp(pattern_a, a + PAGE_SIZE*i, PAGE_SIZE) == 0); + igt_progress("Checking a ", i, huge_object_size / PAGE_SIZE); } munmap(a, huge_object_size); @@ -486,6 +492,7 @@ test_huge_copy(int fd, int huge, int tiling_a, int tiling_b) igt_assert(memcmp(pattern_b, b + PAGE_SIZE*i, PAGE_SIZE) == 0); else igt_assert(memcmp(pattern_a, b + PAGE_SIZE*i, PAGE_SIZE) == 0); + igt_progress("Checking b ", i, huge_object_size / PAGE_SIZE); } munmap(b, huge_object_size); |