[igt-dev] [PATCH i-g-t 5/6] lib/runnercomms: Report empty comms dump as empty

Petri Latvala petri.latvala at intel.com
Tue Nov 8 10:07:32 UTC 2022


A mistake that went unnoticed because it's only hit if igt_runner is
killed immediately after initializing the execution but before
executing the test binary.

Signed-off-by: Petri Latvala <petri.latvala at intel.com>
Cc: Arkadiusz Hiler <arek at hiler.eu>
Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
---
 lib/runnercomms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/runnercomms.c b/lib/runnercomms.c
index 344312bd..034ba0a2 100644
--- a/lib/runnercomms.c
+++ b/lib/runnercomms.c
@@ -515,7 +515,7 @@ int comms_read_dump(int fd, struct comms_visitor *visitor)
 		return COMMSPARSE_ERROR;
 
 	if (statbuf.st_size == 0)
-		return COMMSPARSE_ERROR;
+		return COMMSPARSE_EMPTY;
 
 	buf = mmap(NULL, statbuf.st_size, PROT_READ, MAP_SHARED, fd, 0);
 	if (buf == MAP_FAILED)
-- 
2.30.2



More information about the igt-dev mailing list