kiranvizru / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

TOTAL_PHYMEM test failing on OSX 10.5 32-bit #133

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
======================================================================
FAIL: test_TOTAL_PHYMEM (_osx.OSXSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/tester/psutil/test/_osx.py", line 42, in test_TOTAL_PHYMEM
    self.assertEqual(sysctl_hwphymem, psutil.TOTAL_PHYMEM)
AssertionError: 2147483648L != 15032385536L

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

Original issue reported on code.google.com by g.rodola on 11 Nov 2010 at 6:58

GoogleCodeExporter commented 9 years ago
Confirmed also on OSX 10.6 64-bit.

Original comment by g.rodola on 11 Nov 2010 at 7:21

GoogleCodeExporter commented 9 years ago
Possibly useful reference: 
http://stackoverflow.com/questions/583736/determine-physical-mem-size-programmat
ically-on-osx

I suggest we try using an int64_t as shown there rather than uint64_t we are 
currently using and see if that makes any difference, otherwise the code looks 
identical to ours. 

Original comment by jlo...@gmail.com on 11 Nov 2010 at 8:06

GoogleCodeExporter commented 9 years ago
I'd like to see all the sysctl mem values: 

  hw.physmem = 2147483648
  hw.usermem = 1593614336
  hw.memsize = 2147483648

We use HW_MEMSIZE in psutil, and it looks like your test case is using 
HW_PHYSMEM to compare against, which may be why the test fails. In my case 
they're the same value, but they might not be on a 64bit system (HW_MEMSIZE 
returns a 64bit counter instead of a 32bit). I suspect the issue is a problem 
with the test case rather than psutil.

Original comment by jlo...@gmail.com on 13 Nov 2010 at 7:51

GoogleCodeExporter commented 9 years ago
r818 committed to have the OS X test case for TOTAL_PHYSMEM use hw.memsize 
instead, if you get a chance to run this again on 64bit OS X systems 10.5 and 
10.6 I'd be curious to see the results.

Original comment by jlo...@gmail.com on 13 Nov 2010 at 7:53

GoogleCodeExporter commented 9 years ago

Original comment by g.rodola on 28 Feb 2011 at 9:58

GoogleCodeExporter commented 9 years ago

Original comment by g.rodola on 20 Mar 2011 at 9:55

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Updated csets after the SVN -> Mercurial migration:
r818 == revision 183549e73634

Original comment by g.rodola on 2 Mar 2013 at 11:56