Closed
Bug 705220
Opened 13 years ago
Closed 11 years ago
tests should be written for mozprocess.pid
Categories
(Testing :: Mozbase, defect)
Testing
Mozbase
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: k0scist, Unassigned)
Details
(Whiteboard: [mozbase])
Attachments
(1 file, 1 obsolete file)
6.85 KB,
patch
|
Details | Diff | Splinter Review |
While not necessarily good practice, Talos and other harnesses check against the shelled-out command `ps` to see what processes is running. While not currently consumed (though see https://bugzilla.mozilla.org/show_bug.cgi?id=700722 and https://bugzilla.mozilla.org/show_bug.cgi?id=694625 ), the `mozprocess.pid` module should have tests whereby various combinations of processes are launched and then the functions appropriately tested. (An is_running() function would also be nice.)
Reporter | ||
Updated•13 years ago
|
Whiteboard: [mozbase]
I have attached a patch with few test cases but it could very well be missing out something. Please review and apply if correct. Thanks :)
Reporter | ||
Comment 2•12 years ago
|
||
Comment on attachment 642747 [details] [diff] [review] Patch to resolve the bug. + pids = get_pids(name) + if len(pids) > 0: + return True + else: + return False This can just be return len(pids) > 0 We also shouldn't need the check_for_processes function at all
Updated the submitted patch.
Attachment #642747 -
Attachment is obsolete: true
Reporter | ||
Comment 4•12 years ago
|
||
(In reply to swvist from comment #3) > Created attachment 642758 [details] [diff] [review] > Updated the patch > > Updated the submitted patch. Could you combine the two diffs into one single diff that has the new file, pidtest.py, but without the check_for_processes function? Thanks
Reporter | ||
Comment 5•11 years ago
|
||
This is probably not a priority and we are likely not to need it at all. Please reopen/refile if desired
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•