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 <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter
2014-05-14 00:36:04 +02:00
parent 351e7d3950
commit e624fa8a2e
63 changed files with 325 additions and 336 deletions
+7 -7
View File
@@ -91,7 +91,7 @@ igt_main
}
igt_subtest("new-obj") {
printf("Testing contents of newly created object.\n");
igt_info("Testing contents of newly created object.\n");
ret = do_read(fd, handle, buf, 0, OBJECT_SIZE);
igt_assert(ret == 0);
memset(&expected, 0, sizeof(expected));
@@ -99,13 +99,13 @@ igt_main
}
igt_subtest("beyond-EOB") {
printf("Testing read beyond end of buffer.\n");
igt_info("Testing read beyond end of buffer.\n");
ret = do_read(fd, handle, buf, OBJECT_SIZE / 2, OBJECT_SIZE);
igt_assert(ret == -1 && errno == EINVAL);
}
igt_subtest("read-write") {
printf("Testing full write of buffer\n");
igt_info("Testing full write of buffer\n");
memset(buf, 0, sizeof(buf));
memset(buf + 1024, 0x01, 1024);
memset(expected + 1024, 0x01, 1024);
@@ -115,7 +115,7 @@ igt_main
igt_assert(ret == 0);
igt_assert(memcmp(buf, expected, sizeof(buf)) == 0);
printf("Testing partial write of buffer\n");
igt_info("Testing partial write of buffer\n");
memset(buf + 4096, 0x02, 1024);
memset(expected + 4096, 0x02, 1024);
ret = do_write(fd, handle, buf + 4096, 4096, 1024);
@@ -124,20 +124,20 @@ igt_main
igt_assert(ret == 0);
igt_assert(memcmp(buf, expected, sizeof(buf)) == 0);
printf("Testing partial read of buffer\n");
igt_info("Testing partial read of buffer\n");
ret = do_read(fd, handle, buf, 512, 1024);
igt_assert(ret == 0);
igt_assert(memcmp(buf, expected + 512, 1024) == 0);
}
igt_subtest("read-bad-handle") {
printf("Testing read of bad buffer handle\n");
igt_info("Testing read of bad buffer handle\n");
ret = do_read(fd, 1234, buf, 0, 1024);
igt_assert(ret == -1 && errno == ENOENT);
}
igt_subtest("write-bad-handle") {
printf("Testing write of bad buffer handle\n");
igt_info("Testing write of bad buffer handle\n");
ret = do_write(fd, 1234, buf, 0, 1024);
igt_assert(ret == -1 && errno == ENOENT);
}