diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-09-07 19:26:54 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-09-11 12:05:27 +0100 |
commit | 8ec924498d32f51ab303a8ec9dae339919a5931c (patch) | |
tree | cad2cbb39f4c4d594acd2a4ffd403d9ffb5176d0 /tests/tools_test.c | |
parent | 866970a57a9def534f4b4671b59670fb70f54141 (diff) |
igt/tools_test: Remove dmesg subtest
It's a silly test. If fails if there is an *ERROR* in the dmesg ringbuf,
so it neither is testing that errors are generated as expected, and as a
pre-check it can only see what's at the end of the dmesg and may miss
earlier faults. As a test it just randomly fails; worse than useless.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
Diffstat (limited to 'tests/tools_test.c')
-rw-r--r-- | tests/tools_test.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/tests/tools_test.c b/tests/tools_test.c index 3122bb4f..1baf60bd 100644 --- a/tests/tools_test.c +++ b/tests/tools_test.c @@ -47,36 +47,6 @@ static bool check_cmd_return_value(const char *s, void *data) return true; } -static bool kmsg_check(const char *str) -{ - int fd; - FILE *file = NULL; - - fd = open("/dev/kmsg", O_RDONLY | O_NONBLOCK); - if (fd != -1) - file = fdopen(fd, "r"); - if (file) { - size_t len = 0; - char *line = NULL; - char *ret = NULL; - - while (getline(&line, &len, file) != -1) { - if ((ret = strstr(line, str)) != NULL) { - break; - } - } - free(line); - fclose(file); - close(fd); - if (ret) - return true; - } else { - close(fd); - igt_warn("Unable to retrieve kernel log (from /dev/kmsg)\n"); - } - return false; -} - igt_main { igt_skip_on_simulation(); @@ -135,9 +105,4 @@ igt_main igt_assert(igt_system_quiet(cmd) == IGT_EXIT_SUCCESS); free(cmd); } - - igt_subtest("check_dmesg") { - igt_assert(!kmsg_check("*ERROR*")); - igt_assert(!kmsg_check("------[ cut here ]----")); - } } |