gem_partial_pwrite_pread: add progress indicator
Without optimized pread/pwrite this test takes forever.
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
diff --git a/tests/gem_partial_pwrite_pread.c b/tests/gem_partial_pwrite_pread.c
index 6280e98..5c8f6f5 100644
--- a/tests/gem_partial_pwrite_pread.c
+++ b/tests/gem_partial_pwrite_pread.c
@@ -102,6 +102,7 @@
}
#define MAX_BLT_SIZE 128
+#define ROUNDS 1000
int main(int argc, char **argv)
{
int i, j;
@@ -125,7 +126,7 @@
mappable_gtt_limit = gem_mappable_aperture_size();
printf("checking partial reads\n");
- for (i = 0; i < 1000; i++) {
+ for (i = 0; i < ROUNDS; i++) {
int start, len;
int val = i % 256;
@@ -142,10 +143,12 @@
exit(1);
}
}
+
+ drmtest_progress("partial reads test: ", i, ROUNDS);
}
printf("checking partial writes\n");
- for (i = 0; i < 1000; i++) {
+ for (i = 0; i < ROUNDS; i++) {
int start, len;
int val = i % 256;
@@ -184,10 +187,12 @@
}
}
drm_intel_gem_bo_unmap_gtt(staging_bo);
+
+ drmtest_progress("partial writes test: ", i, ROUNDS);
}
printf("checking partial writes after partial reads\n");
- for (i = 0; i < 1000; i++) {
+ for (i = 0; i < ROUNDS; i++) {
int start, len;
int val = i % 256;
@@ -245,6 +250,8 @@
}
}
drm_intel_gem_bo_unmap_gtt(staging_bo);
+
+ drmtest_progress("partial read/writes test: ", i, ROUNDS);
}
drmtest_cleanup_aperture_trashers();