Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in test_process_groupname in _posix.py on OS X #72

Closed
giampaolo opened this issue May 23, 2014 · 7 comments
Closed

Error in test_process_groupname in _posix.py on OS X #72

giampaolo opened this issue May 23, 2014 · 7 comments

Comments

@giampaolo
Copy link
Owner

From jlo...@gmail.com on February 01, 2010 17:55:13

======================================================================
ERROR: test_process_groupname (_posix.PosixSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jloden/src/psutil/test/_posix.py", line 61, in
test_process_groupname
    groupname_ps = ps("ps --no-headers -o rgroup -p %s" %self.pid)
  File "/Users/jloden/src/psutil/test/_posix.py", line 22, in ps
    output = output.split()[1]
IndexError: list index out of range

======================================================================
FAIL: test_process_vsz_memory (_posix.PosixSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jloden/src/psutil/test/_posix.py", line 79, in
test_process_vsz_memory
    self.assertEqual(vsz_ps, vsz_psutil)
AssertionError: 38412 != 562700

----------------------------------------------------------------------

Original issue: http://code.google.com/p/psutil/issues/detail?id=72

@giampaolo giampaolo self-assigned this May 23, 2014
@giampaolo
Copy link
Owner Author

From jlo...@gmail.com on February 01, 2010 08:58:47

All of the tests relying on ps are going to fail on OS X and probably BSD as well
since there is no "--no-headers" option on ps unless it's the GNU ps utility.

@giampaolo
Copy link
Owner Author

From jlo...@gmail.com on February 01, 2010 09:09:27

Actually looks like it's the -o option that's failing: 

[user@host]$ ps -o rgroup
ps: rgroup: keyword not found
ps: no valid keywords

the man page for ps on OS X indicates there is no "rgroup" keyword (actually there
does not appear to be a group name keyword, only group id "rgid" for some reason). We
will probably have to convert the group id to a groupname in order to test process
groupname. 

The test_process_vsz_memory I'm not sure about, it looks like some other kind of
issue since the ps command is completing but the numbers aren't even close.

@giampaolo
Copy link
Owner Author

From jlo...@gmail.com on February 01, 2010 09:38:44

Summary: Errors in test suite _posix.py on OS X

@giampaolo
Copy link
Owner Author

From jlo...@gmail.com on February 01, 2010 10:00:53

Splitting the vsz test out to a separate issue #73 since it appears the unit test is
doing what it's supposed to there. Leaving this open to address the groupname problem
on OS X.

Summary: Error in test_process_groupname in _posix.py on OS X

@giampaolo
Copy link
Owner Author

From billiej...@gmail.com on February 04, 2010 05:40:53

Labels: Milestone-0.1.3

@giampaolo
Copy link
Owner Author

From jlo...@gmail.com on February 28, 2010 16:51:29

Marking as won't fix since ps just doesn't supply a groupname anywhere on OS X and we
already check the rgid in the posix tests anyway.

Status: WontFix

@giampaolo
Copy link
Owner Author

From billiej...@gmail.com on March 02, 2010 11:33:34

Labels: -Milestone-0.1.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant