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

Windows 2000 support #117

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

Windows 2000 support #117

giampaolo opened this issue May 23, 2014 · 7 comments

Comments

@giampaolo
Copy link
Owner

From g.rodola on October 16, 2010 21:50:13

Not sure how Windows 2000 support was in 0.1.3 version but this is 
the current situation:


======================================================================
ERROR: test_zombie_process (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test\test_psutil.py", line 710, in test_zombie_process
    self.assertRaises(psutil.NoSuchProcess, getattr, p, "username")
  File "C:\Python27\lib\unittest\case.py", line 456, in assertRaises
    callableObj(*args, **kwargs)
  File "C:\Python27\lib\site-packages\psutil\__init__.py", line 263, in username
    self._procinfo.username =  
self._platform_impl.get_process_username(self.pid)
  File "C:\Python27\lib\site-packages\psutil\_psmswindows.py", line 113, in wrapper
    return callable(self, pid, *args, **kwargs)
  File "C:\Python27\lib\site-packages\psutil\_psmswindows.py", line 
163, in get_process_username
    return _psutil_mswindows.get_process_username(pid);
WindowsError: [Error 87] Parametro non corretto

======================================================================
ERROR: test_pid_4 (_windows.WindowsSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Documents and 
Settings\foo\Desktop\psutil\test\_windows.py", line 39, in test_pid_4
    p = psutil.Process(4)
  File "C:\Python27\lib\site-packages\psutil\__init__.py", line 136, in __init__
    raise NoSuchProcess(pid, None, "no process found with PID %s" % pid)
NoSuchProcess: no process found with PID 4

======================================================================
FAIL: test_process_names (_windows.WindowsSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Documents and 
Settings\foo\Desktop\psutil\test\_windows.py", line 64, in test_process_names
    self.assertTrue(p.name.endswith(".exe") or 
p.name.endswith(".bin"))
AssertionError: False is not True

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

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

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

From wj32...@gmail.com on October 16, 2010 15:30:56

What's with the last test case? In Windows any file with any/no 
extension can be run.

@giampaolo
Copy link
Owner Author

From g.rodola on October 17, 2010 13:30:45

This is now fixed in r688 and r689 .
Out of curiosity I've tried 0.1.3 version on Windows 2000 and there 
were a lot of failures so we might say that we added support in 0.2.0.

> What's with the last test case? In Windows any file with any/no extension 
> can be run.

That test was failing because the process name was in upper case (".EXE").
Aside from pids 0 and 4 I've always seen only processes with ".exe" 
or ".bin" extensions.
Do you think the test is unreliable?

Labels: -Type-Defect Type-Enhancement

@giampaolo
Copy link
Owner Author

From wj32...@gmail.com on October 17, 2010 22:19:35

I don't understand the purpose of the test, because you can rename 
executables to anything and run them. This happens most often with 
installers - you will see names like "D3F92B.tmp".

@giampaolo
Copy link
Owner Author

From jlo...@gmail.com on October 18, 2010 06:26:02

I agree on pulling the exe/bin test. There are definitely instances 
where I've seen files with other extensions being run (I've seen more 
than my share of viruses using .tmp files for one), and there's 
really no reason for us to check the file extension on a running process anyway.

@giampaolo
Copy link
Owner Author

From g.rodola on October 18, 2010 10:30:18

Test removed in r702 .
Closing this out as fixed.

Labels: OpSys-Windows2000 Milestone-0.2.0

@giampaolo
Copy link
Owner Author

From g.rodola on October 18, 2010 10:30:28

Status: Fixed

@giampaolo
Copy link
Owner Author

From g.rodola on March 02, 2013 03:55:25

Updated csets after the SVN -> Mercurial migration: r688 == revision 
6ae3bea6ffdf r702 == revision bf797a071d12

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