Last modified: 2013-09-11 22:45:51 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52384, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50384 - Need to be root to run qa/browsertests
Need to be root to run qa/browsertests
Status: RESOLVED FIXED
Product: MediaWiki-Vagrant
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Ori Livneh
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-28 18:22 UTC by Yuvi Panda
Modified: 2013-09-11 22:45 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Yuvi Panda 2013-06-28 18:22:43 UTC
And when running as root, we'll need to export MEDIAWIKI_URL manually.
Comment 1 Željko Filipin 2013-07-01 12:45:47 UTC
Is this bug saying Vagrant VM should be set up so tests are executed by root? Or, is it saying that is the case now, but it should not be?
Comment 2 Yuvi Panda 2013-07-01 15:01:20 UTC
Currently you need to be root (and export MEDIAWIKI_URL on shell) to be able to run the tests. This should not be the case - you should be able to run these as a normal user.
Comment 3 Gerrit Notification Bot 2013-07-01 19:32:36 UTC
Change 71396 had a related patch set uploaded by Ori.livneh:
Set RubyGems's GEM_HOME to ~/.gem in profile.d

https://gerrit.wikimedia.org/r/71396
Comment 4 Ori Livneh 2013-07-01 20:07:01 UTC
qa/browsertests's ./features/step_definitions/upload_wizard_steps.rb generates a temporary image file and tries to save it to PWD:

  ChunkyPNG::Image.new(Random.new.rand(255), Random.new.rand(255), Random.new.rand(255)).save file_name
  path = Dir.pwd + '/' + file_name

It shouldn't, obviously. pwd could be anything. It's not correct to assume that it is writable by the current user.
Comment 5 Gerrit Notification Bot 2013-07-01 20:27:41 UTC
Change 71516 had a related patch set uploaded by Ori.livneh:
Use Tempfile to manage temporary test images

https://gerrit.wikimedia.org/r/71516
Comment 6 Gerrit Notification Bot 2013-07-02 18:02:32 UTC
Change 71396 merged by jenkins-bot:
Set RubyGems's GEM_HOME to ~/.gem in profile.d

https://gerrit.wikimedia.org/r/71396
Comment 7 Željko Filipin 2013-07-02 18:10:16 UTC
(In reply to comment #4)
> pwd could be anything. It's not correct to assume that
> it is writable by the current user.

What would be correct to assume that it is writable by the current user? (It should work on Linux, Mac and Windows.)
Comment 8 Yuvi Panda 2013-07-02 18:16:27 UTC
They all usually have a 'temp file location' which is writeable by everyone. https://gerrit.wikimedia.org/r/#/c/71516/ uses that.
Comment 9 Željko Filipin 2013-07-02 18:30:37 UTC
I think Dir.tmpdir is what we need. Trying it out.
Comment 10 Željko Filipin 2013-07-02 18:45:44 UTC
I have pushed a new patch set:

https://gerrit.wikimedia.org/r/#/c/71516

It uses temp folder to store the image. It works on my Mac, testing it now on Windows and Linux.
Comment 11 Željko Filipin 2013-07-02 18:48:49 UTC
Jenkins is busy at the moment. If this job runs without failures then the change works on Linux:

https://wmf.ci.cloudbees.com/job/_debug-browsertests-template/182/
Comment 12 Gerrit Notification Bot 2013-07-05 16:00:33 UTC
Change 71516 merged by Zfilipin:
Use temp folder to manage temporary test images

https://gerrit.wikimedia.org/r/71516
Comment 13 Željko Filipin 2013-07-05 16:02:10 UTC
Chris and I paired on this. I have changed the commit so it saves the image to a temp folder. We have tested it on Mac, Windows and Linux. For Linux test run see https://wmf.ci.cloudbees.com/job/_debug-browsertests-template/188/

If this was the only thing that required root to run browser tests, you can resolve the bug. If there is something else, please let me know.

The commit is here: https://gerrit.wikimedia.org/r/#/c/71516/
Comment 14 Ori Livneh 2013-07-05 19:58:31 UTC
That should be all. Thanks very much.
Comment 15 Andre Klapper 2013-09-11 22:45:51 UTC
[mass-moving from Tools>MediaWiki-Vagrant to separate product. See bug 54041. Filter bugmail on this comment.]

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links