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

VMS test faiulre on Windows 7 #110

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

VMS test faiulre on Windows 7 #110

giampaolo opened this issue May 23, 2014 · 4 comments

Comments

@giampaolo
Copy link
Owner

From g.rodola on September 21, 2010 19:53:06

======================================================================
FAIL: test_process_vms_memory (_windows.WindowsSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\pyftpdlib\svn\psutil\test\_windows.py", line 97, in test_process_vms_
memory
    self.assertEqual(vms, int(w.PageFileUsage))
AssertionError: 3727360 != 3640

----------------------------------------------------------------------
Ran 58 tests in 24.999s

FAILED (failures=1)



This happens on Windows 7 64 bit while on Windows XP everything is fine.
The interesting thing is that 3727360 / 1024 = 3640, so it seems that 
either WMI or our code is wrong.

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

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

From jlo...@gmail.com on September 21, 2010 10:57:15

WMI docs for Win32_Process class 
http://msdn.microsoft.com/en-us/library/aa394372(VS.85).aspx -----
*PageFileUsage*
Data type: uint32
Access type: Read-only
Qualifiers: Units (Kilobytes)

Amount of page file space that a process is using currently. This 
value is consistent with the VMSize value in TaskMgr.exe.

Example: 102435
-----

So it looks like WMI is reporting kilobytes, not bytes. We'll need to 
either convert our bytes to kilobytes, or convert the WMI results 
into bytes for comparison.

@giampaolo
Copy link
Owner Author

From g.rodola on September 21, 2010 11:05:57

Problem seems to be that apparently WMI on Windows XP reports bytes 
while on Windows 7 reports kilo bytes.

@giampaolo
Copy link
Owner Author

From g.rodola on September 21, 2010 11:41:06

Since I have no clue on why this happens I used a workaround in the 
test suite ( r637 ) which now assumes Kb on Windows 7 and bytes on all other systems.

Status: Fixed

@giampaolo
Copy link
Owner Author

From g.rodola on March 02, 2013 03:54:38

Updated csets after the SVN -> Mercurial migration: r637 == revision 15c646a51f73

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