From 8ec924498d32f51ab303a8ec9dae339919a5931c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 7 Sep 2017 19:26:54 +0100 Subject: 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 Reviewed-by: Daniel Vetter Reviewed-by: Martin Peres --- tests/tools_test.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'tests/tools_test.c') 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 ]----")); - } } -- cgit v1.2.3