Error message opaque when .testrepository files are unreadable

Bug #1348970 reported by Monty Taylor
This bug affects 4 people
Affects Status Importance Assigned to Milestone

Bug Description

If the files in .testrepository are unreadable for some reason (such as tests having been written by root mode 600) then testr slowest unhelpfully prints:

local variable 'run_subunit_content' referenced before assignment

Revision history for this message
Robert Collins (lifeless) wrote :

could you reproduce this with TESTR_PDB=1 and get a full backtrace? Thanks!

Changed in testrepository:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Victor Stinner (vstinner) wrote :

Hi, I got the same error. Traceback:

vstinner@d-bstcld-0000[dev45][aub] ~/ci-cloudwatt % TESTR_PDB=1 testr run --subunit xxx
${PYTHON:-python} -m discover -t ./ ${OS_TEST_PATH:-./tempest/test_discover} --list
  File "/usr/lib/python2.7/dist-packages/testrepository/commands/", line 143, in execute
    result =
  File "/usr/lib/python2.7/dist-packages/testrepository/commands/", line 134, in run
    previous_run = repo.get_latest_run()
  File "/usr/lib/python2.7/dist-packages/testrepository/repository/", line 99, in get_latest_run
    return self.get_test_run(self.latest_id())
  File "/usr/lib/python2.7/dist-packages/testrepository/repository/", line 136, in get_test_run
    return _DiskRun(run_id, run_subunit_content)

> /usr/lib/python2.7/dist-packages/testrepository/repository/
-> return _DiskRun(run_id, run_subunit_content)

(Pdb) where
-> result =
-> previous_run = repo.get_latest_run()
-> return self.get_test_run(self.latest_id())
> /usr/lib/python2.7/dist-packages/testrepository/repository/

Changed in testrepository:
importance: Medium → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.