New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 603226 link

Starred by 2 users

Issue metadata

Status: Verified
Owner: ----
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Feature



Sign in to add a comment

Store temporary perf data in the /usr/local/autotest/results directory, not the /tmp/ directory.

Project Member Reported by scunning...@chromium.org, Apr 13 2016

Issue description

Problem: The longevity_Tracker.py script stores the temporary performance data in the system /tmp/ directory during the test run, and then copies the data into the autotest results directory when the test ends. The problem we've found is that, if the device crashes during the test, the data in the /tmp directory is often lost.

Solution: Create the temporary performance file in the /usr/local/autotest/results directory. When test is done, copy it to 'perf.csv' in same directory (this allows AutoTest to upload the file with the rest of the results upon exit from test).

Note: Do not store the temp file in the .../results/default/ directory because that directory is deleted each time a test is started.


 
Update: My testing found that the /usr/local/autotest/results directory is cleared each time the test is run. So, we should not store temporary files there either.  Initial testing shows that /usr/local/autotest/ directory contents are safe from reboots and subsequent test runs. So this may be a good candidate. Need to determine best way to get path to /usr/local/autotest/.  Will try using os.path.pardir(self.tmpdir) to get it, since ../bin/test.py seems to indicate that self.tmpdir points to /usr/local/autotest/tmp.

Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 17 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/3e65d6c0c4af7085037a43d2accff14e57be4176

commit 3e65d6c0c4af7085037a43d2accff14e57be4176
Author: Scott Cunningham <scunningham@chromium.org>
Date: Fri Apr 15 14:44:31 2016

Store temporary perf data in local autotest directory.

Problem: Longevity_Tracker.py stores the temporary perf data in the system
/tmp/ directory during the test run. The problem with this is that, if the
device crashes during the test, the data in the /tmp/ directory is often lost.

Solution: Create the temporary perf file in the /usr/local/autotest/
directory. When the test exits, copy the temporary file to 'perf.csv' stored
in the ../results directory, where AutoTest will upload it with the rest of
the test results.

BUG= chromium:603226 
TEST=test_that <IP> f:.*longevity_Tracker/control.longevity_2

Change-Id: I20a2e6717c67002e55822aad9ffed14abba557d3
Reviewed-on: https://chromium-review.googlesource.com/339331
Commit-Ready: Scott Cunningham <scunningham@chromium.org>
Tested-by: Scott Cunningham <scunningham@chromium.org>
Reviewed-by: Scott Cunningham <scunningham@chromium.org>

[modify] https://crrev.com/3e65d6c0c4af7085037a43d2accff14e57be4176/client/site_tests/longevity_Tracker/longevity_Tracker.py

Status: Fixed (was: Started)
Status: Verified (was: Fixed)
Owner: ----

Sign in to add a comment