Closed Bug 733826 Opened 12 years ago Closed 12 years ago

global ffprocess shouldnt check for dwwim

Categories

(Testing :: Talos, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: k0scist, Assigned: mattyrdaly)

Details

(Whiteboard: [good first bug][mentor=jhammel][lang=py])

Attachments

(3 files)

http://www.file.net/process/dwwin.exe.html

dwwim is a windows utility. But we dont check for it in
ffprocess_win.py but instead in ffprocess.py:

http://hg.mozilla.org/build/talos/file/51075a756118/talos/ffprocess.py#l71

We also code the list of processes in several places.

Instead, each platform-dependent class should have a list of processes
to monitor coded in a single place instead of copied all over the
code.  Only the windows class should care about dwwim.
Whiteboard: [good first bug][mentor=jhammel][lang=py]
Assignee: nobody → mattyrdaly
Attachment #654650 - Flags: review?(jhammel)
Comment on attachment 654650 [details] [diff] [review]
any changes required ?

So this doesn't really suffice, as we will still need these methods to be called from e.g. ttest.py

What we should do is make a list in the ffprocess class of "extra programs" that should be killed, that contains crashreporter (and possibly whatever talkback is, damned if i know).

Then ffprocess_win32 can extend this list, adding 'dwwim'

It appears that checkBrowserAlive isn't used at all and can be gotten rid of:

(talos)│grep 'checkBrowserAlive' *.py
ffprocess.py:    def checkBrowserAlive(self, process_name):
Attachment #654650 - Flags: review?(jhammel) → review-
Attached patch changes madeSplinter Review
Attachment #657882 - Flags: review?(jhammel)
Comment on attachment 657882 [details] [diff] [review]
changes made

Close, but you'll need to change the signature for ProcessesWithNames:

+    def ProcessesWithNames(self,extra,*process_names):

There's no reason to do this since the logic is the same for extra and each of the process_names.  Removing this will also allow you to have have to add this code:

+
+        for name in extra :
+            pids = self.GetPidsByName(name)
+            if len(pids) > 0:
+                processes_with_names.extend([(pid, name) for pid in pids])
+

+        return self.ProcessesWithNames(extra_prog,process_name, child_process)
should be self.extra_prog.  You'll have to build this up a bit differently to avoid changing the method signature:

return self.ProcessesWithNames(*([process_name, child_process] + self.extra_prog))

(Likewise elsewhere in the code.)

+    self.extra_prog.append('dwwim')

This won't quite work.  For one, you're at the class level so 'self' isn't defined.

class Win32Process(FFProcess):
 
    extra_prog = FFProcess.extra_prog[:] + ['dwwim']

Giving an r- for now but this is really close.
Attachment #657882 - Flags: review?(jhammel) → review-
Attached patch done :)Splinter Review
Attachment #658143 - Flags: review?(jhammel)
Comment on attachment 658143 [details] [diff] [review]
done :)

Looks great!  Thanks!
Attachment #658143 - Flags: review?(jhammel) → review+
pushed to try: https://tbpl.mozilla.org/?tree=Try&rev=18d42afa3046

will land upon success
(In reply to Jeff Hammel [:jhammel] from comment #7)
> pushed to try: https://tbpl.mozilla.org/?tree=Try&rev=18d42afa3046
> 
> will land upon success

Looks green!
Try run for 18d42afa3046 is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=18d42afa3046
Results (out of 73 total builds):
    success: 67
    failure: 6
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/jhammel@mozilla.com-18d42afa3046
pushed: http://hg.mozilla.org/build/talos/rev/1c5976f92643

Thanks for the patch!
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: