diff mbox series

[kms-tests,2/2] kmstest.py: Capture the last kernel messages before closing the log

Message ID 20190617161217.22463-2-laurent.pinchart@ideasonboard.com (mailing list archive)
State New
Delegated to: Kieran Bingham
Headers show
Series [kms-tests,1/2] kmstest.py: Fix CRTC disabling | expand

Commit Message

Laurent Pinchart June 17, 2019, 4:12 p.m. UTC
When stopping a test, kernel messages can be logged after the event loop
is stopped. Capture them before closing the log.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 tests/kmstest.py | 2 ++
 1 file changed, 2 insertions(+)

Comments

Kieran Bingham June 18, 2019, 5:19 p.m. UTC | #1
Hi Laurent,

On 17/06/2019 17:12, Laurent Pinchart wrote:
> When stopping a test, kernel messages can be logged after the event loop
> is stopped. Capture them before closing the log.

Ohh good catch.

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  tests/kmstest.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/kmstest.py b/tests/kmstest.py
> index adb67c82c368..217d39221c90 100755
> --- a/tests/kmstest.py
> +++ b/tests/kmstest.py
> @@ -119,6 +119,8 @@ class Logger(object):
>  
>      def close(self):
>          if self.logfile:
> +            # Capture the last kernel messages.
> +            self.event()
>              self.logfile.close()
>              self.logfile = None
>  
>
diff mbox series

Patch

diff --git a/tests/kmstest.py b/tests/kmstest.py
index adb67c82c368..217d39221c90 100755
--- a/tests/kmstest.py
+++ b/tests/kmstest.py
@@ -119,6 +119,8 @@  class Logger(object):
 
     def close(self):
         if self.logfile:
+            # Capture the last kernel messages.
+            self.event()
             self.logfile.close()
             self.logfile = None