Mozrunner 2.5.2rc1 (Mozmill 1.5.1rc1) breaks Windows 2000 compatibility because of IsProcessInJob call

VERIFIED FIXED

Status

Testing
Mozbase
--
blocker
VERIFIED FIXED
7 years ago
7 years ago

People

(Reporter: geo, Unassigned)

Tracking

({regression})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [mozmill-1.5.1+])

Attachments

(1 attachment)

winprocess.py tries to bind to a kernel.dll function called IsProcessInJob(). This only exists on XP+, so we're broken on W2K.  See c/p below:

---

$ python -c 'import mozrunner;'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\mozilla-build\python\lib\site-packages\mozrunner\__init__.py", line 4
8, in <module>
    import killableprocess
  File "c:\mozilla-build\python\lib\site-packages\mozrunner\killableprocess.py",
 line 75, in <module>
    import winprocess
  File "c:\mozilla-build\python\lib\site-packages\mozrunner\winprocess.py", line
 249, in <module>
    IsProcessInJobFlags)
AttributeError: function 'IsProcessInJob' not found
This is when I point out that Firefox still supports Windows 2000 as an OS.
This is a regression from the process implementation by Jeff on bug 600321 and should definitely be a blocker for 1.5.1.
Blocks: 600321
Severity: critical → blocker
Keywords: regression
Whiteboard: [mozmill-1.5.1+]
Component: Mozmill → MozRunner
QA Contact: mozmill → mozrunner

Comment 3

7 years ago
We should really get a list of platforms that mozmill is to support.  While I tested on OSX 10.5 and 10.6, linux (Fedora), and windows 7, I do not have slaves for winxp or win2k.  I also don't have slaves for Solaris (https://bugzilla.mozilla.org/show_bug.cgi?id=543492).

See also bug 606512 and bug 606524

Comment 4

7 years ago
I'm not sure how to fix this for win2k but would welcome suggestions (out of the vague "check for win2k and if so don't do what you're doing")
For API calls like that one MSDN is always helpful:
http://msdn.microsoft.com/en-us/library/ms684127%28VS.85%29.aspx

So we only need this for build bot, right? What's normally happen when the function call doesn't succeed? Does the testrun fail on buildbot? I wonder if we should/could use another command line option to explicitly put mozrunner into buildbot state. Otherwise it will not being used. Would that be possible? Sorry, I haven't read the underlying code...
Summary: Mozrunner 2.5.2rc1 (Mozmill 1.5.1rc1) breaks Windows 2000 compatibility → Mozrunner 2.5.2rc1 (Mozmill 1.5.1rc1) breaks Windows 2000 compatibility because of IsProcessInJob call
If buildbot doesn't test win2k builds, and this is just for buildbot, then maybe there's a way to just ifdef around the code (and related calls) for win2k.

Comment 7

7 years ago
As discussed on IRC, one possible solution is to wrap the IsProcessInJob code in a try-except clause.  I'm not sure how this would look exactly, but given a w2k system it should be easily figure-outable by trial+error.

I'm not in favor of a command line flag.  If we got that route we should spec it out here.  I *don't* want --buildbot which is only misleading (it has nothing to do with buildbot, only with job flags).
(In reply to comment #7)
> As discussed on IRC, one possible solution is to wrap the IsProcessInJob code
> in a try-except clause.  I'm not sure how this would look exactly, but given a
> w2k system it should be easily figure-outable by trial+error.

We can offer access to our Win2k VM on the qa-mozmill box. Clint already has access to.

Comment 9

7 years ago
Created attachment 486132 [details] [diff] [review]
fix patch, tested on w2k
Attachment #486132 - Flags: review?(hskupin)
Comment on attachment 486132 [details] [diff] [review]
fix patch, tested on w2k

Looks good and I trust your testing on our QA box.
Attachment #486132 - Flags: review?(hskupin) → review+

Comment 11

7 years ago
landed:

http://github.com/mozautomation/mozmill/commit/b3b6c3fd80f054ae6a056e2df2407a46d3e69099

should be landed on 2.0 as well, however we're denoting such things these days
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Whiteboard: [mozmill-1.5.1+] → [mozmill-1.5.1+][needs-landing-2.0]
Landed on master as:
http://github.com/mozautomation/mozmill/commit/48aa1c81676036db229e119149af41dc4a086793
Whiteboard: [mozmill-1.5.1+][needs-landing-2.0] → [mozmill-1.5.1+]
Works great. See the todays results:
http://mozmill-release.brasstacks.mozilla.com/#/general/report/530443ebc3b0968fb1a89c49c001be10
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.