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

get_open_files errors on OS X #104

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

get_open_files errors on OS X #104

giampaolo opened this issue May 23, 2014 · 8 comments

Comments

@giampaolo
Copy link
Owner

From jlo...@gmail.com on August 06, 2010 02:13:17

======================================================================
FAIL: test_get_open_files (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 372, in test_get_open_files
    self.assertTrue(thisfile in files)
AssertionError: False is not True

======================================================================
FAIL: test_get_open_files (__main__.LimitedUserTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 372, in test_get_open_files
    self.assertTrue(thisfile in files)
AssertionError: False is not True

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

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

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

From jlo...@gmail.com on August 05, 2010 17:14:41

Status: Accepted

@giampaolo
Copy link
Owner Author

From jlo...@gmail.com on August 05, 2010 17:54:35

Ok, r629 includes fixes for the above errors. However, after doing 
that I am still getting test suite errors for get_-open_files(): 

======================================================================
FAIL: test_get_open_files (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 394, in test_get_open_files
    self.assertTrue(os.path.isfile(file))
AssertionError: False is not True

======================================================================
FAIL: test_get_open_files (__main__.LimitedUserTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 394, in test_get_open_files
    self.assertTrue(os.path.isfile(file))
AssertionError: False is not True

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

In this case I did some debugging and it's happening because of 
temporary files open by one of my processes. Since they're transient 
temporary files, they only exist for seconds or possibly even less 
time. As a result, by the time we check to see if it's a valid file, it's already gone. 

I suggest we remove/replace these tests, as this is likely to happen 
pretty frequently for any process that uses temporary files.

@giampaolo
Copy link
Owner Author

From g.rodola on August 05, 2010 17:59:30

I agree the test is unreliable and should be removed.

@giampaolo
Copy link
Owner Author

From jlo...@gmail.com on August 10, 2010 19:17:08

did this test get removed? If so let's go ahead and close out this 
issue as fixed with my changes to the lsof parser

@giampaolo
Copy link
Owner Author

From jlo...@gmail.com on September 20, 2010 16:12:17

For now I've disabled these in the test suite in OS X until we have 
time to fix the parsing code.

@giampaolo
Copy link
Owner Author

From jlo...@gmail.com on September 20, 2010 16:12:36

Labels: Type-Enhancement

@giampaolo
Copy link
Owner Author

From g.rodola on November 11, 2010 15:00:46

Re-enabled for OSX in r782 .

Status: Fixed

@giampaolo
Copy link
Owner Author

From g.rodola on March 02, 2013 03:53:56

Updated csets after the SVN -> Mercurial migration: r629 == revision 
b8eb30709b31 r782 == revision 0128cc5e790b

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