Commit e624fa8a authored by Daniel Vetter's avatar Daniel Vetter

tests: sprinkle igt logging

All the cases that simply dump some debug information and couldn't be
converted to some of the fancier macros.

Some information output removed when it's redundant with the subtest
status.
Signed-off-by: Daniel Vetter's avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 351e7d39
......@@ -82,11 +82,11 @@ test_fence_restore(int fd, bool tiled2untiled)
igt_system_suspend_autoresume();
printf("checking the first canary object\n");
igt_info("checking the first canary object\n");
for (i = 0; i < OBJECT_SIZE/sizeof(uint32_t); i++)
igt_assert(ptr1[i] == i);
printf("checking the second canary object\n");
igt_info("checking the second canary object\n");
for (i = 0; i < OBJECT_SIZE/sizeof(uint32_t); i++)
igt_assert(ptr2[i] == i);
......
......@@ -70,7 +70,7 @@ static int gem_exec(int fd, struct drm_i915_gem_execbuffer2 *execbuf)
static void create0(int fd)
{
int retval = 0;
printf("trying to create a zero-length gem object\n");
igt_info("trying to create a zero-length gem object\n");
do_gem_create(fd, 0, &retval);
igt_assert(retval == EINVAL);
}
......@@ -109,7 +109,7 @@ static void exec0(int fd)
i915_execbuffer2_set_context_id(execbuf, 0);
execbuf.rsvd2 = 0;
printf("trying to run an empty batchbuffer\n");
igt_info("trying to run an empty batchbuffer\n");
gem_exec(fd, &execbuf);
gem_close(fd, exec[0].handle);
......
......@@ -44,7 +44,7 @@ test_bad_close(int fd)
struct drm_gem_close close_bo;
int ret;
printf("Testing error return on bad close ioctl.\n");
igt_info("Testing error return on bad close ioctl.\n");
close_bo.handle = 0x10101010;
ret = ioctl(fd, DRM_IOCTL_GEM_CLOSE, &close_bo);
......@@ -57,7 +57,7 @@ test_create_close(int fd)
{
uint32_t handle;
printf("Testing creating and closing an object.\n");
igt_info("Testing creating and closing an object.\n");
handle = gem_create(fd, 16*1024);
......@@ -67,7 +67,7 @@ test_create_close(int fd)
static void
test_create_fd_close(int fd)
{
printf("Testing closing with an object allocated.\n");
igt_info("Testing closing with an object allocated.\n");
gem_create(fd, 16*1024);
/* leak it */
......
......@@ -127,7 +127,7 @@ igt_main
flags &= ~TEST_READ;
if (IS_BROADWATER(devid) || IS_CRESTLINE(devid)) {
/* chipset is completely fubar */
printf("coherency broken on i965g/gm\n");
igt_info("coherency broken on i965g/gm\n");
flags = 0;
}
......@@ -147,7 +147,7 @@ igt_main
igt_subtest("reads") {
igt_require(flags & TEST_READ);
printf("checking partial reads\n");
igt_info("checking partial reads\n");
for (i = 0; i < ROUNDS; i++) {
uint8_t val0 = i;
......@@ -174,7 +174,7 @@ igt_main
igt_subtest("writes") {
igt_require(flags & TEST_WRITE);
printf("checking partial writes\n");
igt_info("checking partial writes\n");
for (i = 0; i < ROUNDS; i++) {
uint8_t val0 = i, val1;
......@@ -219,7 +219,7 @@ igt_main
igt_subtest("read-writes") {
igt_require((flags & TEST_BOTH) == TEST_BOTH);
printf("checking partial writes after partial reads\n");
igt_info("checking partial writes after partial reads\n");
for (i = 0; i < ROUNDS; i++) {
uint8_t val0 = i, val1, val2;
......
......@@ -390,7 +390,7 @@ igt_main
if (num_buffers > max)
num_buffers = max;
num_buffers /= 2;
printf("using 2x%d buffers, each 1MiB\n", num_buffers);
igt_info("using 2x%d buffers, each 1MiB\n", num_buffers);
}
for (i = 0; i < ARRAY_SIZE(access_modes); i++)
......
......@@ -242,6 +242,6 @@ igt_simple_main
igt_progress("gem_cpu_reloc: ", 2*count+i, 3*count);
}
printf("Test suceeded, cleanup up - this might take a while.\n");
igt_info("Test suceeded, cleanup up - this might take a while.\n");
close(fd);
}
......@@ -162,7 +162,7 @@ igt_simple_main
igt_progress("gem_cs_prefetch: ", i, count);
}
printf("Test suceeded, cleanup up - this might take a while.\n");
igt_info("Test suceeded, cleanup up - this might take a while.\n");
drm_intel_bufmgr_destroy(bufmgr);
close(fd);
......
......@@ -150,10 +150,10 @@ static void big_exec(int fd, uint32_t handle, int ring)
gem_close(fd, gem_exec[i].handle);
gem_exec[i].handle = handle;
execbuf.buffer_count--;
printf("trying buffer count %i\n", i - 1);
igt_info("trying buffer count %i\n", i - 1);
}
printf("reduced buffer count to %i from %i\n",
igt_info("reduced buffer count to %i from %i\n",
i - 1, num_buffers);
/* double check that it works */
......
......@@ -206,7 +206,7 @@ igt_main
unsigned int target_flink;
char buffer_name[32];
if (dri_bo_flink(target_buffer, &target_flink)) {
printf("fail to get flink for target buffer\n");
igt_info("fail to get flink for target buffer\n");
igt_assert_f(0, "fail to create global "
"gem_handle for target buffer\n");
}
......@@ -237,52 +237,52 @@ igt_main
}
igt_subtest("render") {
printf("running dummy loop on render\n");
igt_info("running dummy loop on render\n");
dummy_reloc_loop(I915_EXEC_RENDER);
printf("dummy loop run on render completed\n");
igt_info("dummy loop run on render completed\n");
}
igt_subtest("bsd") {
gem_require_ring(fd, I915_EXEC_BSD);
sleep(2);
printf("running dummy loop on bsd\n");
igt_info("running dummy loop on bsd\n");
dummy_reloc_loop(I915_EXEC_BSD);
printf("dummy loop run on bsd completed\n");
igt_info("dummy loop run on bsd completed\n");
}
igt_subtest("blt") {
gem_require_ring(fd, I915_EXEC_BLT);
sleep(2);
printf("running dummy loop on blt\n");
igt_info("running dummy loop on blt\n");
dummy_reloc_loop(I915_EXEC_BLT);
printf("dummy loop run on blt completed\n");
igt_info("dummy loop run on blt completed\n");
}
#ifdef I915_EXEC_VEBOX
igt_subtest("vebox") {
gem_require_ring(fd, I915_EXEC_VEBOX);
sleep(2);
printf("running dummy loop on vebox\n");
igt_info("running dummy loop on vebox\n");
dummy_reloc_loop(LOCAL_I915_EXEC_VEBOX);
printf("dummy loop run on vebox completed\n");
igt_info("dummy loop run on vebox completed\n");
}
#endif
igt_subtest("mixed") {
if (num_rings > 1) {
sleep(2);
printf("running dummy loop on random rings\n");
igt_info("running dummy loop on random rings\n");
dummy_reloc_loop_random_ring(num_rings);
printf("dummy loop run on random rings completed\n");
igt_info("dummy loop run on random rings completed\n");
}
}
igt_subtest("mixed_multi_fd") {
if (num_rings > 1) {
sleep(2);
printf("running dummy loop on random rings based on "
igt_info("running dummy loop on random rings based on "
"multi drm_fd\n");
dummy_reloc_loop_random_ring_multi_fd(num_rings);
printf("dummy loop run on random rings based on "
igt_info("dummy loop run on random rings based on "
"multi drm_fd completed\n");
}
}
......
......@@ -242,10 +242,10 @@ static void run(int object_size)
gem_execbuf(fd, &execbuf);
gem_sync(fd, handle);
gettimeofday(&end, NULL);
printf("Time to blt %d bytes x %6d: %7.3fµs, %s\n",
object_size, count,
elapsed(&start, &end, count),
bytes_per_sec((char *)buf, object_size/elapsed(&start, &end, count)*1e6));
igt_info("Time to blt %d bytes x %6d: %7.3fµs, %s\n",
object_size, count,
elapsed(&start, &end, count),
bytes_per_sec((char *)buf, object_size/elapsed(&start, &end, count)*1e6));
fflush(stdout);
}
gem_close(fd, handle);
......
......@@ -170,7 +170,7 @@ igt_simple_main
elapsed[i][1] = ELAPSED(&start, &end);
}
printf("%s: buffers=%4d:", p->name, n);
igt_info("%s: buffers=%4d:", p->name, n);
s_x = s_y = s_xx = s_xy = 0;
for (j = 0; j < i; j++) {
......@@ -182,7 +182,7 @@ igt_simple_main
}
B = (s_xy - s_x * s_y / j) / (s_xx - s_x * s_x / j);
A = s_y / j - B * s_x / j;
printf(" old=%7.0f + %.1f*reloc,", A, B);
igt_info(" old=%7.0f + %.1f*reloc,", A, B);
s_x = s_y = s_xx = s_xy = 0;
for (j = 0; j < i; j++) {
......@@ -194,9 +194,9 @@ igt_simple_main
}
B = (s_xy - s_x * s_y / j) / (s_xx - s_x * s_x / j);
A = s_y / j - B * s_x / j;
printf(" lut=%7.0f + %.1f*reloc (ns)", A, B);
igt_info(" lut=%7.0f + %.1f*reloc (ns)", A, B);
printf("\n");
igt_info("\n");
}
}
}
......@@ -99,8 +99,8 @@ static void loop(int fd, uint32_t handle, unsigned ring_id, const char *ring_nam
gettimeofday(&start, NULL);
igt_assert(exec(fd, handle, count, ring_id) == 0);
gettimeofday(&end, NULL);
printf("Time to exec x %d: %7.3fµs (ring=%s)\n",
count, elapsed(&start, &end, count), ring_name);
igt_info("Time to exec x %d: %7.3fµs (ring=%s)\n",
count, elapsed(&start, &end, count), ring_name);
fflush(stdout);
}
}
......
......@@ -49,7 +49,7 @@ igt_simple_main
igt_assert(fscanf(file_max, "%u", &nofile_rlim) == 1);
fclose(file_max);
printf("System limit for open files is %u\n", nofile_rlim);
igt_info("System limit for open files is %u\n", nofile_rlim);
igt_assert(getrlimit(RLIMIT_NOFILE, &rlim) == 0);
rlim.rlim_cur = nofile_rlim;
......@@ -78,7 +78,7 @@ igt_simple_main
if (tmp_fd < 0) {
/* Ensure we actually hit the failure path ... */
igt_assert(handle == 0);
printf("fd exhaustion after %i rounds.\n", i);
igt_info("fd exhaustion after %i rounds.\n", i);
break;
}
}
......
......@@ -175,9 +175,9 @@ static int run_test(int threads_per_fence, void *f, int tiling,
num_threads = threads_per_fence * num_fences;
printf("%s: threads %d, fences %d, tiling %d, surfaces per thread %d\n",
f == bo_copy ? "copy" : "write-verify", num_threads,
num_fences, tiling, surfaces_per_thread);
igt_info("%s: threads %d, fences %d, tiling %d, surfaces per thread %d\n",
f == bo_copy ? "copy" : "write-verify", num_threads,
num_fences, tiling, surfaces_per_thread);
if (threads_per_fence) {
threads = calloc(sizeof(*threads), num_threads);
......
......@@ -45,7 +45,7 @@ test_flink(int fd)
struct drm_gem_open open_struct;
int ret;
printf("Testing flink and open.\n");
igt_info("Testing flink and open.\n");
memset(&create, 0, sizeof(create));
create.size = 16 * 1024;
......@@ -70,7 +70,7 @@ test_double_flink(int fd)
struct drm_gem_flink flink2;
int ret;
printf("Testing repeated flink.\n");
igt_info("Testing repeated flink.\n");
memset(&create, 0, sizeof(create));
create.size = 16 * 1024;
......@@ -93,7 +93,7 @@ test_bad_flink(int fd)
struct drm_gem_flink flink;
int ret;
printf("Testing error return on bad flink ioctl.\n");
igt_info("Testing error return on bad flink ioctl.\n");
flink.handle = 0x10101010;
ret = ioctl(fd, DRM_IOCTL_GEM_FLINK, &flink);
......@@ -106,7 +106,7 @@ test_bad_open(int fd)
struct drm_gem_open open_struct;
int ret;
printf("Testing error return on bad open ioctl.\n");
igt_info("Testing error return on bad open ioctl.\n");
open_struct.name = 0x10101010;
ret = ioctl(fd, DRM_IOCTL_GEM_OPEN, &open_struct);
......@@ -122,7 +122,7 @@ test_flink_lifetime(int fd)
struct drm_gem_open open_struct;
int ret, fd2;
printf("Testing flink lifetime.\n");
igt_info("Testing flink lifetime.\n");
fd2 = drm_open_any();
......
......@@ -197,7 +197,7 @@ static void test_flink_close(void)
obj_count = get_object_count() - obj_count;
printf("leaked %i objects\n", obj_count);
igt_info("leaked %i objects\n", obj_count);
close(fake);
......
......@@ -187,6 +187,6 @@ igt_simple_main
igt_assert(status == 0);
}
gettimeofday(&end, NULL);
printf("Time to execute %lu children: %7.3fms\n",
ARRAY_SIZE(children), elapsed(&start, &end) / 1000);
igt_info("Time to execute %lu children: %7.3fms\n",
ARRAY_SIZE(children), elapsed(&start, &end) / 1000);
}
......@@ -66,7 +66,7 @@ int main(int argc, char **argv)
if (argc > 1)
size = atoi(argv[1]);
if (size == 0) {
fprintf(stderr, "Invalid object size specified\n");
igt_warn("Invalid object size specified\n");
return 1;
}
......@@ -79,8 +79,8 @@ int main(int argc, char **argv)
for (tiling = I915_TILING_NONE; tiling <= I915_TILING_Y; tiling++) {
if (tiling != I915_TILING_NONE) {
printf("\nSetting tiling mode to %s\n",
tiling == I915_TILING_X ? "X" : "Y");
igt_info("\nSetting tiling mode to %s\n",
tiling == I915_TILING_X ? "X" : "Y");
gem_set_tiling(fd, handle, tiling, 512);
}
......@@ -118,8 +118,8 @@ int main(int argc, char **argv)
munmap(base, size);
}
gettimeofday(&end, NULL);
printf("Time to read %dk through a CPU map: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
igt_info("Time to read %dk through a CPU map: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
/* mmap write */
gettimeofday(&start, NULL);
......@@ -133,8 +133,8 @@ int main(int argc, char **argv)
munmap(base, size);
}
gettimeofday(&end, NULL);
printf("Time to write %dk through a CPU map: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
igt_info("Time to write %dk through a CPU map: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
gettimeofday(&start, NULL);
for (loop = 0; loop < 1000; loop++) {
......@@ -143,8 +143,8 @@ int main(int argc, char **argv)
munmap(base, size);
}
gettimeofday(&end, NULL);
printf("Time to clear %dk through a CPU map: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
igt_info("Time to clear %dk through a CPU map: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
gettimeofday(&start, NULL);
base = gem_mmap__cpu(fd, handle, size, PROT_READ | PROT_WRITE);
......@@ -152,8 +152,8 @@ int main(int argc, char **argv)
memset(base, 0, size);
munmap(base, size);
gettimeofday(&end, NULL);
printf("Time to clear %dk through a cached CPU map: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
igt_info("Time to clear %dk through a cached CPU map: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
}
/* CPU pwrite */
......@@ -161,16 +161,16 @@ int main(int argc, char **argv)
for (loop = 0; loop < 1000; loop++)
gem_write(fd, handle, 0, buf, size);
gettimeofday(&end, NULL);
printf("Time to pwrite %dk through the CPU: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
igt_info("Time to pwrite %dk through the CPU: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
/* CPU pread */
gettimeofday(&start, NULL);
for (loop = 0; loop < 1000; loop++)
gem_read(fd, handle, 0, buf, size);
gettimeofday(&end, NULL);
printf("Time to pread %dk through the CPU: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
igt_info("Time to pread %dk through the CPU: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
}
/* prefault into gtt */
......@@ -203,8 +203,8 @@ int main(int argc, char **argv)
munmap(base, size);
}
gettimeofday(&end, NULL);
printf("Time to read %dk through a GTT map: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
igt_info("Time to read %dk through a GTT map: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
/* mmap write */
gettimeofday(&start, NULL);
......@@ -218,8 +218,8 @@ int main(int argc, char **argv)
munmap(base, size);
}
gettimeofday(&end, NULL);
printf("Time to write %dk through a GTT map: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
igt_info("Time to write %dk through a GTT map: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
/* mmap clear */
gettimeofday(&start, NULL);
......@@ -229,8 +229,8 @@ int main(int argc, char **argv)
munmap(base, size);
}
gettimeofday(&end, NULL);
printf("Time to clear %dk through a GTT map: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
igt_info("Time to clear %dk through a GTT map: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
gettimeofday(&start, NULL);{
uint32_t *base = gem_mmap(fd, handle, size, PROT_READ | PROT_WRITE);
......@@ -238,8 +238,8 @@ int main(int argc, char **argv)
memset(base, 0, size);
munmap(base, size);
} gettimeofday(&end, NULL);
printf("Time to clear %dk through a cached GTT map: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
igt_info("Time to clear %dk through a cached GTT map: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
/* mmap read */
gettimeofday(&start, NULL);
......@@ -257,8 +257,8 @@ int main(int argc, char **argv)
munmap(base, size);
}
gettimeofday(&end, NULL);
printf("Time to read %dk (again) through a GTT map: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
igt_info("Time to read %dk (again) through a GTT map: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
if (tiling == I915_TILING_NONE) {
/* GTT pwrite */
......@@ -266,16 +266,16 @@ int main(int argc, char **argv)
for (loop = 0; loop < 1000; loop++)
gem_write(fd, handle, 0, buf, size);
gettimeofday(&end, NULL);
printf("Time to pwrite %dk through the GTT: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
igt_info("Time to pwrite %dk through the GTT: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
/* GTT pread */
gettimeofday(&start, NULL);
for (loop = 0; loop < 1000; loop++)
gem_read(fd, handle, 0, buf, size);
gettimeofday(&end, NULL);
printf("Time to pread %dk through the GTT: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
igt_info("Time to pread %dk through the GTT: %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
/* GTT pwrite, including clflush */
gettimeofday(&start, NULL);
......@@ -284,8 +284,8 @@ int main(int argc, char **argv)
gem_sync(fd, handle);
}
gettimeofday(&end, NULL);
printf("Time to pwrite %dk through the GTT (clflush): %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
igt_info("Time to pwrite %dk through the GTT (clflush): %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
/* GTT pread, including clflush */
gettimeofday(&start, NULL);
......@@ -294,11 +294,11 @@ int main(int argc, char **argv)
gem_read(fd, handle, 0, buf, size);
}
gettimeofday(&end, NULL);
printf("Time to pread %dk through the GTT (clflush): %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
igt_info("Time to pread %dk through the GTT (clflush): %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
/* partial writes */
printf("Now partial writes.\n");
igt_info("Now partial writes.\n");
size /= 4;
/* partial GTT pwrite, including clflush */
......@@ -308,7 +308,7 @@ int main(int argc, char **argv)
gem_sync(fd, handle);
}
gettimeofday(&end, NULL);
printf("Time to pwrite %dk through the GTT (clflush): %7.3fµs\n",
igt_info("Time to pwrite %dk through the GTT (clflush): %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
/* partial GTT pread, including clflush */
......@@ -318,7 +318,7 @@ int main(int argc, char **argv)
gem_read(fd, handle, 0, buf, size);
}
gettimeofday(&end, NULL);
printf("Time to pread %dk through the GTT (clflush): %7.3fµs\n",
igt_info("Time to pread %dk through the GTT (clflush): %7.3fµs\n",
size/1024, elapsed(&start, &end, loop));
size *= 4;
......
......@@ -77,7 +77,7 @@ igt_simple_main
batch = intel_batchbuffer_alloc(bufmgr, devid);
act_size = 2048;
printf("filling ring\n");
igt_info("filling ring\n");
drm_intel_bo_unreference(bo);
bo = drm_intel_bo_alloc_tiled(bufmgr, "tiled bo", act_size, act_size,
4, &tiling_mode, &pitch, 0);
......@@ -113,10 +113,10 @@ igt_simple_main
}
}
printf("waiting\n");
igt_info("waiting\n");
sleep(10);
printf("done waiting, check dmesg\n");
igt_info("done waiting, check dmesg\n");
drm_intel_bo_unreference(bo);
intel_batchbuffer_free(batch);
......
......@@ -60,7 +60,7 @@ test_large_object(int fd)
else
obj_size = OBJ_SIZE;
create.size = obj_size;
printf("obj size %i\n", obj_size);
igt_info("obj size %i\n", obj_size);
igt_assert(ioctl(fd, DRM_IOCTL_I915_GEM_CREATE, &create) == 0);
......
......@@ -203,11 +203,11 @@ static void run_test(int fd, int count)
start += 1024 * 1024 / 4;
}
printf("Verifying initialisation...\n");
igt_info("Verifying initialisation...\n");
for (i = 0; i < count; i++)
check_bo(fd, handle[i], start_val[i]);
printf("Cyclic blits, forward...\n");
igt_info("Cyclic blits, forward...\n");
for (i = 0; i < count * 4; i++) {
int src = i % count;
int dst = (i + 1) % count;
......@@ -218,7 +218,7 @@ static void run_test(int fd, int count)
for (i = 0; i < count; i++)
check_bo(fd, handle[i], start_val[i]);
printf("Cyclic blits, backward...\n");
igt_info("Cyclic blits, backward...\n");
for (i = 0; i < count * 4; i++) {
int src = (i + 1) % count;
int dst = i % count;
......@@ -229,7 +229,7 @@ static void run_test(int fd, int count)
for (i = 0; i < count; i++)
check_bo(fd, handle[i], start_val[i]);
printf("Random blits...\n");
igt_info("Random blits...\n");
for (i = 0; i < count * 4; i++) {
int src = random() % count;
int dst = random() % count;
......@@ -270,10 +270,10 @@ int main(int argc, char **argv)
if (count > intel_get_total_ram_mb() * 9 / 10) {
count = intel_get_total_ram_mb() * 9 / 10;
printf("not enough RAM to run test, reducing buffer count\n");
igt_info("not enough RAM to run test, reducing buffer count\n");
}
printf("Using %d 1MiB buffers\n", count);
igt_info("Using %d 1MiB buffers\n", count);
}
igt_subtest("normal")
......
......@@ -73,22 +73,22 @@ igt_main
igt_assert(ret == 0);
addr = (uint8_t *)(uintptr_t)arg.addr_ptr;
printf("Testing contents of newly created object.\n");
igt_info("Testing contents of newly created object.\n");
memset(expected, 0, sizeof(expected));
igt_assert(memcmp(addr, expected, sizeof(expected)) == 0);
printf("Testing coherency of writes and mmap reads.\n");
igt_info("Testing coherency of writes and mmap reads.\n");
memset(buf, 0, sizeof(buf));
memset(buf + 1024, 0x01, 1024);
memset(expected + 1024, 0x01, 1024);
gem_write(fd, handle, 0, buf, OBJECT_SIZE);
igt_assert(memcmp(buf, addr, sizeof(buf)) == 0);
printf("Testing that mapping stays after close\n");
igt_info("Testing that mapping stays after close\n");
gem_close(fd, handle);
igt_assert(memcmp(buf, addr, sizeof(buf)) == 0);
printf("Testing unmapping\n");
igt_info("Testing unmapping\n");
munmap(addr, OBJECT_SIZE);
}
......
......@@ -92,7 +92,7 @@ int main(int argc, char **argv)
num_rings++;
printf("num rings detected: %i\n", num_rings);
igt_info("num rings detected: %i\n", num_rings);
bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
igt_assert(bufmgr);
......
......@@ -109,7 +109,7 @@ static void test_partial_reads(void)
{
int i, j;
printf("checking partial reads\n");
igt_info("checking partial reads\n");
for (i = 0; i < ROUNDS; i++) {
int start, len;
int val = i % 256;
......@@ -136,7 +136,7 @@ static void test_partial_writes(void)
int i, j;
uint8_t *gtt_ptr;
printf("checking partial writes\n");
igt_info("checking partial writes\n");
for (i = 0; i < ROUNDS; i++) {
int start, len;
int val = i % 256;
......@@ -181,7 +181,7 @@ static void test_partial_read_writes(void)
int i, j;
uint8_t *gtt_ptr;
printf("checking partial writes after partial reads\n");
igt_info("checking partial writes after partial reads\n");
for (i = 0; i < ROUNDS; i++) {
int start, len;
int val = i % 256;
......
......@@ -115,10 +115,10 @@ int main(int argc, char **argv)
gettimeofday(&start, NULL);
do_gem_read(fd, dst, src, object_size, count);
gettimeofday(&end, NULL);
printf("Time to pread %d bytes x %6d: %7.3fµs, %s\n",