New issue
Advanced search Search tips

Issue 780309 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

cros_uprevchrome_unittest is flakey

Project Member Reported by dgarr...@chromium.org, Oct 31 2017

Issue description

cros_uprevchrome_unittest fails if the chroot doesn't exist with this error:


clean$cli/cros/cros_uprevchrome_unittest 
...16:10:02: ERROR: pfq_build 100 not valid, status: pass
.E.
======================================================================
ERROR: [chromite.cli.cros.cros_uprevchrome_unittest] CrosUprevChromeTest.testSuccessfulRun
Test a successful uprevchrome run.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/google/home/dgarrett/sand/clean/chromite/lib/timeout_util.py", line 191, in TimeoutWrapper
    return func(*args, **kwargs)
  File "/usr/local/google/home/dgarrett/sand/clean/chromite/cli/cros/cros_uprevchrome_unittest.py", line 111, in testSuccessfulRun
    self.cmd_mock.inst.Run()
  File "<string>", line 3, in Run
  File "/usr/local/google/home/dgarrett/sand/clean/chromite/third_party/mock.py", line 955, in __call__
    return _mock_self._mock_call(*args, **kwargs)
  File "/usr/local/google/home/dgarrett/sand/clean/chromite/third_party/mock.py", line 1018, in _mock_call
    ret_val = effect(*args, **kwargs)
  File "/usr/local/google/home/dgarrett/sand/clean/chromite/cli/cros/cros_uprevchrome_unittest.py", line 32, in Run
    command_unittest.MockCommand.Run(self, inst)
  File "/usr/local/google/home/dgarrett/sand/clean/chromite/cli/command_unittest.py", line 95, in Run
    return self.backup['Run'](inst)
  File "/usr/local/google/home/dgarrett/sand/clean/chromite/cli/cros/cros_uprevchrome.py", line 376, in Run
    work_dir = tempfile.mkdtemp(prefix='uprevchrome_', dir=tmp_override)
  File "/usr/lib/python2.7/tempfile.py", line 333, in mkdtemp
    _os.mkdir(file, 0700)
OSError: [Errno 2] No such file or directory: '/usr/local/google/home/dgarrett/sand/clean/chroot/tmp/uprevchrome_dNJBbb'

----------------------------------------------------------------------
Ran 6 tests in 0.035s

FAILED (errors=1)

 
Status: Started (was: Untriaged)
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 8 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/e2f67276acab41d006881c5683e69cbdac18ad36

commit e2f67276acab41d006881c5683e69cbdac18ad36
Author: Don Garrett <dgarrett@google.com>
Date: Wed Nov 08 01:52:16 2017

cros_uprevchrome: Tweak tempdir creation.

Unittests were failing if the chroot hadn't been created, and was
flaky in some cases. Remove custom temp dir selection when inside the
chroot to resolve this.

BUG= chromium:780309 
TEST=Ran unittests.

Change-Id: Ifa65ae9fca7652a898ff338bf498d61540f80611
Reviewed-on: https://chromium-review.googlesource.com/747966
Commit-Ready: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Ningning Xia <nxia@chromium.org>

[modify] https://crrev.com/e2f67276acab41d006881c5683e69cbdac18ad36/cli/cros/cros_uprevchrome.py

Status: Fixed (was: Started)
Hopefully fixed.

Sign in to add a comment