New issue
Advanced search Search tips

Issue 812370 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

mtreplay fails for feedback logs with empty touch logs

Project Member Reported by seobrien@chromium.org, Feb 14 2018

Issue description

Given a feedback log which has a touch log, but where that touch log is empty, mtreplay will fail with the following error:

Traceback (most recent call last):
  File "/usr/bin/mtreplay", line 79, in <module>
    main(sys.argv)
  File "/usr/bin/mtreplay", line 65, in main
    log = Log(args[0])
  File "/mnt/host/source/src/platform/mttools/mtlib/log.py", line 45, in Log
    return FeedbackLog(source)
  File "/mnt/host/source/src/platform/mttools/mtlib/log.py", line 148, in __init__
    self._ExtractLogFiles()
  File "/mnt/host/source/src/platform/mttools/mtlib/log.py", line 254, in _ExtractLogFiles
    logs = ExtractByInterface('pad') + ExtractByInterface('screen')
  File "/mnt/host/source/src/platform/mttools/mtlib/log.py", line 211, in ExtractByInterface
    activity_tar_file = tarfile.open(fileobj=StringIO(activity_tar_data))
  File "/usr/lib64/python2.7/tarfile.py", line 1672, in open
    raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully

Instead, it should alert the user that there is an empty file, and continue.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 21 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/mttools/+/0d2d0c4445ac6f9233aa4e297e0d2c031469225b

commit 0d2d0c4445ac6f9233aa4e297e0d2c031469225b
Author: Sean O'Brien <seobrien@google.com>
Date: Wed Feb 21 04:32:10 2018

Don't exit with error if empty touch log found

When extracting touch logs from a feedback report, if there is an empty
touchscreen or touchpad log, mtreplay will exit with an error.

This CL checks for empty logs and alerts the user if one is found, then
allows the user to continue with other touch logs.

BUG= chromium:812370 
TEST=Run mtreplay and mtedit on feedback reports with empty touch logs.

Change-Id: I4576beab8eee0b288c1979f349ae65568e53145e
Reviewed-on: https://chromium-review.googlesource.com/919831
Commit-Ready: Sean O'Brien <seobrien@chromium.org>
Tested-by: Sean O'Brien <seobrien@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>

[modify] https://crrev.com/0d2d0c4445ac6f9233aa4e297e0d2c031469225b/mtlib/log.py

Status: Fixed (was: Assigned)

Sign in to add a comment