[igt-dev] [PATCH i-g-t 2/2] runner: Seek to the end to get to the end of kmsg

Petri Latvala petri.latvala at intel.com
Tue Sep 11 11:38:53 UTC 2018


When draining the rest of kmsg records, read the compare record from
the end of kmsg or you get incomplete dmesg fields in the results.

Signed-off-by: Petri Latvala <petri.latvala at intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
Cc: Martin Peres <martin.peres at linux.intel.com>
---
 runner/executor.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/runner/executor.c b/runner/executor.c
index 60cf4da5..36117af6 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -247,6 +247,7 @@ static void dump_dmesg(int kmsgfd, int outfd)
 
 	if (comparefd < 0)
 		return;
+	lseek(comparefd, 0, SEEK_END);
 
 	if (fcntl(kmsgfd, F_SETFL, O_NONBLOCK))
 		return;
-- 
2.14.1



More information about the igt-dev mailing list