test_rewrite fails on pristine setup: no permission to write to /var/tmp/bazaar.launchpad.dev/rewrite.log

Bug #395999 reported by Jeroen T. Vermeulen
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Michael Hudson-Doyle

Bug Description

On a freshly installed rocketfuel, this test fails:

  Running:
 lp.codehosting.tests.test_rewrite.TestBranchRewriterScript.test_script

Failure in test lp.codehosting.tests.test_rewrite.TestBranchRewriterScript.test_script
Traceback (most recent call last):
  File "/home/jtv/canonical/lp-branches/trunk/lib/lp/testing/__init__.py", line 327, in run
    testMethod()
  File "/home/jtv/canonical/lp-branches/trunk/lib/lp/codehosting/tests/test_rewrite.py", line 106, in test_script
    self.assertEqual('', err)
  File "/home/jtv/canonical/lp-branches/trunk/lib/lp/testing/__init__.py", line 216, in assertEqual
    self.fail("%snot equal:\na = %s\nb = %s\n"
  File "/usr/lib/python2.4/unittest.py", line 301, in fail
    raise self.failureException, msg
AssertionError: not equal:
a = ''
b = 'Traceback (most recent call last):\n File "/home/jtv/canonical/lp-branches/trunk/scripts/branch-rewrite.py", line 70, in ?\n BranchRewriteScript("branch-rewrite").run()\n File "/home/jtv/canonical/lp-branches/trunk/scripts/branch-rewrite.py", line 25, in __init__\n LaunchpadScript.__init__(self, name)\n File "/home/jtv/canonical/lp-branches/trunk/lib/lp/services/scripts/base.py", line 123, in __init__\n self.logger = scripts.logger(self.options, name)\n File "/home/jtv/canonical/lp-branches/trunk/lib/canonical/launchpad/scripts/logger.py", line 292, in logger\n out_stream = open(options.log_file, \'a\')\nIOError: [Errno 13] Permission denied: \'/var/tmp/bazaar.launchpad.dev/rewrite.log\'\n'

chown'ing /var/tmp/bazaar.launchpad.dev/rewrite.log to myself silenced the error.

affects: launchpad → launchpad-code
tags: added: test-system
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Easy to believe. Probably the fix is to touch the log during make install...

Changed in launchpad-code:
assignee: nobody → Michael Hudson (mwhudson)
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Actually I guess it would be good to get this done before open sourcing.

Changed in launchpad-code:
importance: Medium → High
milestone: none → 2.2.7
Changed in launchpad-code:
status: Triaged → In Progress
Changed in launchpad-code:
status: In Progress → Triaged
status: Triaged → Fix Committed
Changed in launchpad-code:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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