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

Add basic NetBSD support. #557

Merged
merged 26 commits into from
Jan 13, 2016
Merged

Add basic NetBSD support. #557

merged 26 commits into from
Jan 13, 2016

Conversation

0-wiz-0
Copy link
Contributor

@0-wiz-0 0-wiz-0 commented Dec 11, 2014

Signed-off-by: Thomas Klausner [email protected]

I've updated my one-year old patch.

There are still a lot of test failures. Are these because I didn't implement everything or because there are some major bugs?

rm -f `find . -type f -name \*.py[co]`
rm -f `find . -type f -name \*.so`
rm -f `find . -type f -name .\*~`
rm -f `find . -type f -name \*.orig`
rm -f `find . -type f -name \*.bak`
rm -f `find . -type f -name \*.rej`
rm -rf `find . -type d -name __pycache__`
rm -rf *.egg-info
rm -rf *\estfile*
rm -rf .tox
rm -rf build
rm -rf dist
rm -rf docs/_build
python2.7 setup.py build
running build
running build_py
creating build
creating build/lib.netbsd-7.99.2-amd64-2.7
creating build/lib.netbsd-7.99.2-amd64-2.7/psutil
copying psutil/__init__.py -> build/lib.netbsd-7.99.2-amd64-2.7/psutil
copying psutil/_common.py -> build/lib.netbsd-7.99.2-amd64-2.7/psutil
copying psutil/_compat.py -> build/lib.netbsd-7.99.2-amd64-2.7/psutil
copying psutil/_psbsd.py -> build/lib.netbsd-7.99.2-amd64-2.7/psutil
copying psutil/_pslinux.py -> build/lib.netbsd-7.99.2-amd64-2.7/psutil
copying psutil/_psosx.py -> build/lib.netbsd-7.99.2-amd64-2.7/psutil
copying psutil/_psposix.py -> build/lib.netbsd-7.99.2-amd64-2.7/psutil
copying psutil/_pssunos.py -> build/lib.netbsd-7.99.2-amd64-2.7/psutil
copying psutil/_pswindows.py -> build/lib.netbsd-7.99.2-amd64-2.7/psutil
copying psutil/_psnetbsd.py -> build/lib.netbsd-7.99.2-amd64-2.7/psutil
running build_ext
building '_psutil_netbsd' extension
creating build/temp.netbsd-7.99.2-amd64-2.7
creating build/temp.netbsd-7.99.2-amd64-2.7/psutil
creating build/temp.netbsd-7.99.2-amd64-2.7/psutil/arch
creating build/temp.netbsd-7.99.2-amd64-2.7/psutil/arch/netbsd
gcc -fno-strict-aliasing -O2 -DHAVE_DB_185_H -pthread -I/usr/include -I/usr/pkg/include -DNDEBUG -O2 -DHAVE_DB_185_H -pthread -I/usr/include -I/usr/pkg/include -fPIC -I/usr/pkg/include/python2.7 -c psutil/_psutil_netbsd.c -o build/temp.netbsd-7.99.2-amd64-2.7/psutil/_psutil_netbsd.o
gcc -fno-strict-aliasing -O2 -DHAVE_DB_185_H -pthread -I/usr/include -I/usr/pkg/include -DNDEBUG -O2 -DHAVE_DB_185_H -pthread -I/usr/include -I/usr/pkg/include -fPIC -I/usr/pkg/include/python2.7 -c psutil/_psutil_common.c -o build/temp.netbsd-7.99.2-amd64-2.7/psutil/_psutil_common.o
gcc -fno-strict-aliasing -O2 -DHAVE_DB_185_H -pthread -I/usr/include -I/usr/pkg/include -DNDEBUG -O2 -DHAVE_DB_185_H -pthread -I/usr/include -I/usr/pkg/include -fPIC -I/usr/pkg/include/python2.7 -c psutil/arch/netbsd/process_info.c -o build/temp.netbsd-7.99.2-amd64-2.7/psutil/arch/netbsd/process_info.o
gcc -shared -L/scratch/lang/python27/work/Python-2.7.8 -pthread -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib build/temp.netbsd-7.99.2-amd64-2.7/psutil/_psutil_netbsd.o build/temp.netbsd-7.99.2-amd64-2.7/psutil/_psutil_common.o build/temp.netbsd-7.99.2-amd64-2.7/psutil/arch/netbsd/process_info.o -L/usr/pkg/lib -lpython2.7 -o build/lib.netbsd-7.99.2-amd64-2.7/_psutil_netbsd.so
building '_psutil_posix' extension
gcc -fno-strict-aliasing -O2 -DHAVE_DB_185_H -pthread -I/usr/include -I/usr/pkg/include -DNDEBUG -O2 -DHAVE_DB_185_H -pthread -I/usr/include -I/usr/pkg/include -fPIC -I/usr/pkg/include/python2.7 -c psutil/_psutil_posix.c -o build/temp.netbsd-7.99.2-amd64-2.7/psutil/_psutil_posix.o
gcc -shared -L/scratch/lang/python27/work/Python-2.7.8 -pthread -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib build/temp.netbsd-7.99.2-amd64-2.7/psutil/_psutil_posix.o -L/usr/pkg/lib -lpython2.7 -o build/lib.netbsd-7.99.2-amd64-2.7/_psutil_posix.so
python2.7 setup.py install --user;
running install
running bdist_egg
running egg_info
creating psutil.egg-info
writing psutil.egg-info/PKG-INFO
writing top-level names to psutil.egg-info/top_level.txt
writing dependency_links to psutil.egg-info/dependency_links.txt
writing manifest file 'psutil.egg-info/SOURCES.txt'
reading manifest file 'psutil.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'docs/_build'
writing manifest file 'psutil.egg-info/SOURCES.txt'
installing library code to build/bdist.netbsd-7.99.2-amd64/egg
running install_lib
running build_py
running build_ext
creating build/bdist.netbsd-7.99.2-amd64
creating build/bdist.netbsd-7.99.2-amd64/egg
creating build/bdist.netbsd-7.99.2-amd64/egg/psutil
copying build/lib.netbsd-7.99.2-amd64-2.7/psutil/__init__.py -> build/bdist.netbsd-7.99.2-amd64/egg/psutil
copying build/lib.netbsd-7.99.2-amd64-2.7/psutil/_common.py -> build/bdist.netbsd-7.99.2-amd64/egg/psutil
copying build/lib.netbsd-7.99.2-amd64-2.7/psutil/_compat.py -> build/bdist.netbsd-7.99.2-amd64/egg/psutil
copying build/lib.netbsd-7.99.2-amd64-2.7/psutil/_psbsd.py -> build/bdist.netbsd-7.99.2-amd64/egg/psutil
copying build/lib.netbsd-7.99.2-amd64-2.7/psutil/_pslinux.py -> build/bdist.netbsd-7.99.2-amd64/egg/psutil
copying build/lib.netbsd-7.99.2-amd64-2.7/psutil/_psosx.py -> build/bdist.netbsd-7.99.2-amd64/egg/psutil
copying build/lib.netbsd-7.99.2-amd64-2.7/psutil/_psposix.py -> build/bdist.netbsd-7.99.2-amd64/egg/psutil
copying build/lib.netbsd-7.99.2-amd64-2.7/psutil/_pssunos.py -> build/bdist.netbsd-7.99.2-amd64/egg/psutil
copying build/lib.netbsd-7.99.2-amd64-2.7/psutil/_pswindows.py -> build/bdist.netbsd-7.99.2-amd64/egg/psutil
copying build/lib.netbsd-7.99.2-amd64-2.7/psutil/_psnetbsd.py -> build/bdist.netbsd-7.99.2-amd64/egg/psutil
copying build/lib.netbsd-7.99.2-amd64-2.7/_psutil_netbsd.so -> build/bdist.netbsd-7.99.2-amd64/egg
copying build/lib.netbsd-7.99.2-amd64-2.7/_psutil_posix.so -> build/bdist.netbsd-7.99.2-amd64/egg
byte-compiling build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py to __init__.pyc
byte-compiling build/bdist.netbsd-7.99.2-amd64/egg/psutil/_common.py to _common.pyc
byte-compiling build/bdist.netbsd-7.99.2-amd64/egg/psutil/_compat.py to _compat.pyc
byte-compiling build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psbsd.py to _psbsd.pyc
byte-compiling build/bdist.netbsd-7.99.2-amd64/egg/psutil/_pslinux.py to _pslinux.pyc
byte-compiling build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psosx.py to _psosx.pyc
byte-compiling build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psposix.py to _psposix.pyc
byte-compiling build/bdist.netbsd-7.99.2-amd64/egg/psutil/_pssunos.py to _pssunos.pyc
byte-compiling build/bdist.netbsd-7.99.2-amd64/egg/psutil/_pswindows.py to _pswindows.pyc
byte-compiling build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py to _psnetbsd.pyc
creating stub loader for _psutil_netbsd.so
creating stub loader for _psutil_posix.so
byte-compiling build/bdist.netbsd-7.99.2-amd64/egg/_psutil_netbsd.py to _psutil_netbsd.pyc
byte-compiling build/bdist.netbsd-7.99.2-amd64/egg/_psutil_posix.py to _psutil_posix.pyc
creating build/bdist.netbsd-7.99.2-amd64/egg/EGG-INFO
copying psutil.egg-info/PKG-INFO -> build/bdist.netbsd-7.99.2-amd64/egg/EGG-INFO
copying psutil.egg-info/SOURCES.txt -> build/bdist.netbsd-7.99.2-amd64/egg/EGG-INFO
copying psutil.egg-info/dependency_links.txt -> build/bdist.netbsd-7.99.2-amd64/egg/EGG-INFO
copying psutil.egg-info/top_level.txt -> build/bdist.netbsd-7.99.2-amd64/egg/EGG-INFO
writing build/bdist.netbsd-7.99.2-amd64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/psutil-2.2.0-py2.7-netbsd-7.99.2-amd64.egg' and adding 'build/bdist.netbsd-7.99.2-amd64/egg' to it
removing 'build/bdist.netbsd-7.99.2-amd64/egg' (and everything under it)
Processing psutil-2.2.0-py2.7-netbsd-7.99.2-amd64.egg
Removing /home/wiz/.local/lib/python2.7/site-packages/psutil-2.2.0-py2.7-netbsd-7.99.2-amd64.egg
Copying psutil-2.2.0-py2.7-netbsd-7.99.2-amd64.egg to /home/wiz/.local/lib/python2.7/site-packages
psutil 2.2.0 is already the active version in easy-install.pth

Installed /home/wiz/.local/lib/python2.7/site-packages/psutil-2.2.0-py2.7-netbsd-7.99.2-amd64.egg
Processing dependencies for psutil==2.2.0
Finished processing dependencies for psutil==2.2.0
python2.7 test/test_psutil.py
/usr/pkg/lib/python2.7/site-packages/pkg_resources.py:1045: UserWarning: /home/wiz/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
  warnings.warn(msg, UserWarning)
test_PAGESIZE (__main__.TestSystemAPIs) ... ok
test_boot_time (__main__.TestSystemAPIs) ... ok
test_cpu_count (__main__.TestSystemAPIs) ... FAIL
test_deprecated_apis (__main__.TestSystemAPIs) ... ERROR
test_deprecated_apis_retval (__main__.TestSystemAPIs) ... ERROR
test_disk_io_counters (__main__.TestSystemAPIs) ... ERROR
test_disk_partitions (__main__.TestSystemAPIs) ... ok
test_disk_usage (__main__.TestSystemAPIs) ... ok
test_disk_usage_unicode (__main__.TestSystemAPIs) ... ok
test_net_connections (__main__.TestSystemAPIs) ... ERROR
test_net_io_counters (__main__.TestSystemAPIs) ... ok
test_pid_exists (__main__.TestSystemAPIs) ... ERROR
test_pid_exists_2 (__main__.TestSystemAPIs) ... ERROR
test_pids (__main__.TestSystemAPIs) ... ERROR
test_process_iter (__main__.TestSystemAPIs) ... ERROR
test_process_iter_against_pids (__main__.TestSystemAPIs) ... ERROR
test_swap_memory (__main__.TestSystemAPIs) ... ERROR
test_sys_cpu_percent (__main__.TestSystemAPIs) ... ok
test_sys_cpu_times (__main__.TestSystemAPIs) ... ok
test_sys_cpu_times2 (__main__.TestSystemAPIs) ... ok
test_sys_cpu_times_percent (__main__.TestSystemAPIs) ... ok
test_sys_per_cpu_percent (__main__.TestSystemAPIs) ... ok
test_sys_per_cpu_times (__main__.TestSystemAPIs) ... ok
test_sys_per_cpu_times2 (__main__.TestSystemAPIs) ... ok
test_sys_per_cpu_times_percent (__main__.TestSystemAPIs) ... ok
test_test (__main__.TestSystemAPIs) ... ERROR
test_users (__main__.TestSystemAPIs) ... ok
test_virtual_memory (__main__.TestSystemAPIs) ... ERROR
test_wait_procs (__main__.TestSystemAPIs) ... ERROR
test_wait_procs_no_timeout (__main__.TestSystemAPIs) ... ERROR
test_Popen (__main__.TestProcess) ... ERROR
test_as_dict (__main__.TestProcess) ... ERROR
test_children (__main__.TestProcess) ... ERROR
test_children_duplicates (__main__.TestProcess) ... ERROR
test_children_recursive (__main__.TestProcess) ... ERROR
test_cmdline (__main__.TestProcess) ... ERROR
test_connection_constants (__main__.TestProcess) ... ok
test_connection_fromfd (__main__.TestProcess) ... ERROR
test_connections (__main__.TestProcess) ... ERROR
test_connections_all (__main__.TestProcess) ... ERROR
test_connections_ipv6 (__main__.TestProcess) ... ERROR
test_connections_unix (__main__.TestProcess) ... ERROR
test_cpu_affinity (__main__.TestProcess) ... skipped 'not available on this platform'
test_cpu_percent (__main__.TestProcess) ... ERROR
test_cpu_times (__main__.TestProcess) ... ERROR
test_cpu_times2 (__main__.TestProcess) ... ERROR
test_create_time (__main__.TestProcess) ... ERROR
test_cwd (__main__.TestProcess) ... ERROR
test_cwd_2 (__main__.TestProcess) ... ERROR
test_exe (__main__.TestProcess) ... ERROR
test_gids (__main__.TestProcess) ... ERROR
test_halfway_terminated_process (__main__.TestProcess) ... ERROR
test_invalid_pid (__main__.TestProcess) ... ok
test_io_counters (__main__.TestProcess) ... ERROR
test_ionice (__main__.TestProcess) ... skipped 'Linux and Windows Vista only'
test_is_running (__main__.TestProcess) ... ERROR
test_kill (__main__.TestProcess) ... ERROR
test_memory_info (__main__.TestProcess) ... ERROR
test_memory_maps (__main__.TestProcess) ... ERROR
test_memory_percent (__main__.TestProcess) ... ERROR
test_name (__main__.TestProcess) ... ERROR
test_nice (__main__.TestProcess) ... ERROR
test_num_ctx_switches (__main__.TestProcess) ... ERROR
test_num_fds (__main__.TestProcess) ... ERROR
test_num_handles (__main__.TestProcess) ... skipped 'Windows only'
test_num_threads (__main__.TestProcess) ... ERROR
test_open_files (__main__.TestProcess) ... ERROR
test_open_files2 (__main__.TestProcess) ... ERROR
test_parent_ppid (__main__.TestProcess) ... ERROR
test_pid (__main__.TestProcess) ... ERROR
test_pid_0 (__main__.TestProcess) ... ERROR
test_rlimit_get (__main__.TestProcess) ... skipped 'only available on Linux >= 2.6.36'
test_rlimit_set (__main__.TestProcess) ... skipped 'only available on Linux >= 2.6.36'
test_send_signal (__main__.TestProcess) ... ERROR
test_status (__main__.TestProcess) ... ERROR
test_suspend_resume (__main__.TestProcess) ... ERROR
test_terminal (__main__.TestProcess) ... ERROR
test_terminate (__main__.TestProcess) ... ERROR
test_threads (__main__.TestProcess) ... ERROR
test_uids (__main__.TestProcess) ... ERROR
test_username (__main__.TestProcess) ... ERROR
test_wait (__main__.TestProcess) ... ERROR
test_wait_non_children (__main__.TestProcess) ... ERROR
test_wait_timeout_0 (__main__.TestProcess) ... ERROR
test_zombie_process (__main__.TestProcess) ... ERROR
test_fetch_all (__main__.TestFetchAllProcesses) ... ERROR
test__all__ (__main__.TestMisc) ... ok
test__eq__ (__main__.TestMisc) ... ERROR
test__hash__ (__main__.TestMisc) ... ERROR
test__str__ (__main__.TestMisc) ... ERROR
test_memoize (__main__.TestMisc) ... ok
test_serialization (__main__.TestMisc) ... ERROR
test_check_presence (__main__.TestExampleScripts) ... ok
test_disk_usage (__main__.TestExampleScripts) ... test/test_psutil.py:170: UserWarning: /usr/pkg/lib/python2.7/site-packages/pkg_resources.py:1045: UserWarning: /home/wiz/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
  warnings.warn(msg, UserWarning)

  warnings.warn(msg, UserWarning)
ok
test_free (__main__.TestExampleScripts) ... ERROR
test_iotop (__main__.TestExampleScripts) ... ok
test_killall (__main__.TestExampleScripts) ... ok
test_meminfo (__main__.TestExampleScripts) ... ERROR
test_netstat (__main__.TestExampleScripts) ... ERROR
test_nettop (__main__.TestExampleScripts) ... ok
test_pmap (__main__.TestExampleScripts) ... ERROR
test_process_detail (__main__.TestExampleScripts) ... ERROR
test_ps (__main__.TestExampleScripts) ... ERROR
test_pstree (__main__.TestExampleScripts) ... ERROR
test_top (__main__.TestExampleScripts) ... ok
test_who (__main__.TestExampleScripts) ... ok
test_Popen (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_as_dict (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_children (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_children_duplicates (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_children_recursive (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_cmdline (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_connection_constants (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_connection_fromfd (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_connections (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_connections_all (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_connections_ipv6 (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_connections_unix (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_cpu_affinity (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_cpu_percent (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_cpu_times (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_cpu_times2 (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_create_time (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_cwd (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_cwd_2 (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_exe (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_gids (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_halfway_terminated_process (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_invalid_pid (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_io_counters (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_ionice (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_is_running (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_kill (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_memory_info (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_memory_maps (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_memory_percent (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_name (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_nice (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_num_ctx_switches (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_num_fds (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_num_handles (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_num_threads (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_open_files (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_open_files2 (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_parent_ppid (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_pid (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_pid_0 (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_rlimit_get (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_rlimit_set (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_send_signal (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_status (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_suspend_resume (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_terminal (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_terminate (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_threads (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_uids (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_username (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_wait (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_wait_non_children (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_wait_timeout_0 (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
test_zombie_process (__main__.LimitedUserTestCase) ... skipped 'super user privileges are required'
ERROR
ERROR

======================================================================
ERROR: test_deprecated_apis (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 590, in test_deprecated_apis
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_deprecated_apis_retval (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 670, in test_deprecated_apis_retval
    self.assertEqual(psutil.total_virtmem(),
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_common.py", line 124, in inner
    return fun(*args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1879, in total_virtmem
    return virtmem_usage().total
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_common.py", line 124, in inner
    return fun(*args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1864, in virtmem_usage
    return swap_memory()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1692, in swap_memory
    return _psplatform.swap_memory()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 81, in swap_memory
    total, used, free, sin, sout = [x * PAGESIZE for x in cext.swap_mem()]
SystemError: error return without exception set

======================================================================
ERROR: test_disk_io_counters (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1030, in test_disk_io_counters
    ret = psutil.disk_io_counters(perdisk=False)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1738, in disk_io_counters
    rawdict = _psplatform.disk_io_counters()
SystemError: error return without exception set

======================================================================
ERROR: test_net_connections (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 983, in test_net_connections
    cons = psutil.net_connections(kind)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1804, in net_connections
    return _psplatform.net_connections(kind)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 185, in net_connections
    rawlist = cext.net_connections()
SystemError: error return without exception set

======================================================================
ERROR: test_pid_exists (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 705, in test_pid_exists
    sproc = get_test_subprocess(wait=True)
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_pid_exists_2 (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 716, in test_pid_exists_2
    pids = psutil.pids()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1245, in pids
    return _psplatform.pids()
RuntimeError: failed to retrieve process list.

======================================================================
ERROR: test_pids (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 731, in test_pids
    plist = [x.pid for x in psutil.process_iter()]
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1291, in process_iter
    a = set(pids())
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1245, in pids
    return _psplatform.pids()
RuntimeError: failed to retrieve process list.

======================================================================
ERROR: test_process_iter (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 511, in test_process_iter
    self.assertIn(os.getpid(), [x.pid for x in psutil.process_iter()])
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1291, in process_iter
    a = set(pids())
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1245, in pids
    return _psplatform.pids()
RuntimeError: failed to retrieve process list.

======================================================================
ERROR: test_process_iter_against_pids (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 383, in wrapper
    return fun(*args, **kwargs)
  File "test/test_psutil.py", line 521, in test_process_iter_against_pids
    self.assertEqual(len(list(psutil.process_iter())), len(psutil.pids()))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1291, in process_iter
    a = set(pids())
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1245, in pids
    return _psplatform.pids()
RuntimeError: failed to retrieve process list.

======================================================================
ERROR: test_swap_memory (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 692, in test_swap_memory
    mem = psutil.swap_memory()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1692, in swap_memory
    return _psplatform.swap_memory()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 81, in swap_memory
    total, used, free, sin, sout = [x * PAGESIZE for x in cext.swap_mem()]
SystemError: error return without exception set

======================================================================
ERROR: test_test (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 742, in test_test
    psutil.test()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1912, in test
    for p in process_iter():
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1291, in process_iter
    a = set(pids())
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1245, in pids
    return _psplatform.pids()
RuntimeError: failed to retrieve process list.

======================================================================
ERROR: test_virtual_memory (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 674, in test_virtual_memory
    mem = psutil.virtual_memory()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1673, in virtual_memory
    ret = _psplatform.virtual_memory()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 71, in virtual_memory
    total, free, active, inactive, wired, cached, buffers, shared = mem
ValueError: need more than 6 values to unpack

======================================================================
ERROR: test_wait_procs (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 527, in test_wait_procs
    sproc1 = get_test_subprocess()
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_wait_procs_no_timeout (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 565, in test_wait_procs_no_timeout
    sproc1 = get_test_subprocess()
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_Popen (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2130, in test_Popen
    stderr=subprocess.PIPE)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1216, in __init__
    self._init(self.__subproc.pid, _ignore_nsp=True)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_as_dict (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1966, in test_as_dict
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_children (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1900, in test_children
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_children_duplicates (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1935, in test_children_duplicates
    for p in psutil.process_iter():
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1291, in process_iter
    a = set(pids())
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1245, in pids
    return _psplatform.pids()
RuntimeError: failed to retrieve process list.

======================================================================
ERROR: test_children_recursive (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1919, in test_children_recursive
    get_test_subprocess(cmd=[PYTHON, "-c", s])
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_cmdline (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1499, in test_cmdline
    sproc = get_test_subprocess(cmdline, wait=True)
  File "test/test_psutil.py", line 143, in get_test_subprocess
    wait_for_pid(sproc.pid)
  File "test/test_psutil.py", line 240, in wait_for_pid
    if pid in psutil.pids():
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1245, in pids
    return _psplatform.pids()
RuntimeError: failed to retrieve process list.

======================================================================
ERROR: test_connection_fromfd (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1774, in test_connection_fromfd
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_connections (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1709, in test_connections
    sproc = get_test_subprocess([PYTHON, "-c", arg])
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_connections_all (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1813, in test_connections_all
    tcp4_proc = pyrun(tcp4_template)
  File "test/test_psutil.py", line 163, in pyrun
    stderr=None)
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_connections_ipv6 (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1737, in test_connections_ipv6
    cons = psutil.Process().connections()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_connections_unix (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1763, in test_connections_unix
    check(SOCK_STREAM)
  File "test/test_psutil.py", line 1750, in check
    cons = psutil.Process().connections(kind='unix')
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_cpu_percent (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1196, in test_cpu_percent
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_cpu_times (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1209, in test_cpu_times
    times = psutil.Process().cpu_times()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_cpu_times2 (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1224, in test_cpu_times2
    user_time, kernel_time = psutil.Process().cpu_times()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_create_time (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1237, in test_create_time
    sproc = get_test_subprocess(wait=True)
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_cwd (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1585, in test_cwd
    sproc = get_test_subprocess(wait=True)
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_cwd_2 (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1591, in test_cwd_2
    sproc = get_test_subprocess(cmd, wait=True)
  File "test/test_psutil.py", line 143, in get_test_subprocess
    wait_for_pid(sproc.pid)
  File "test/test_psutil.py", line 240, in wait_for_pid
    if pid in psutil.pids():
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1245, in pids
    return _psplatform.pids()
RuntimeError: failed to retrieve process list.

======================================================================
ERROR: test_exe (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1479, in test_exe
    sproc = get_test_subprocess(wait=True)
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_gids (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1524, in test_gids
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_halfway_terminated_process (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1983, in test_halfway_terminated_process
    sproc = get_test_subprocess()
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_io_counters (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 416, in wrapper
    return fun(*args, **kwargs)
  File "test/test_psutil.py", line 1265, in test_io_counters
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_is_running (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1469, in test_is_running
    sproc = get_test_subprocess(wait=True)
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_kill (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1075, in test_kill
    sproc = get_test_subprocess(wait=True)
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_memory_info (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1413, in test_memory_info
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_memory_maps (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1436, in test_memory_maps
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_memory_percent (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1465, in test_memory_percent
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_name (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1504, in test_name
    sproc = get_test_subprocess(PYTHON, wait=True)
  File "test/test_psutil.py", line 143, in get_test_subprocess
    wait_for_pid(sproc.pid)
  File "test/test_psutil.py", line 240, in wait_for_pid
    if pid in psutil.pids():
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1245, in pids
    return _psplatform.pids()
RuntimeError: failed to retrieve process list.

======================================================================
ERROR: test_nice (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1536, in test_nice
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_num_ctx_switches (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 416, in wrapper
    return fun(*args, **kwargs)
  File "test/test_psutil.py", line 1879, in test_num_ctx_switches
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_num_fds (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1865, in test_num_fds
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_num_threads (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1369, in test_num_threads
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_open_files (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1627, in test_open_files
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_open_files2 (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1655, in test_open_files2
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_parent_ppid (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1889, in test_parent_ppid
    sproc = get_test_subprocess()
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_pid (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1070, in test_pid
    self.assertEqual(psutil.Process().pid, os.getpid())
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_pid_0 (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2082, in test_pid_0
    if 0 not in psutil.pids():
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1245, in pids
    return _psplatform.pids()
RuntimeError: failed to retrieve process list.

======================================================================
ERROR: test_send_signal (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1096, in test_send_signal
    sproc = get_test_subprocess()
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_status (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1566, in test_status
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_suspend_resume (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1951, in test_suspend_resume
    sproc = get_test_subprocess(wait=True)
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_terminal (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1255, in test_terminal
    terminal = psutil.Process().terminal()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_terminate (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1085, in test_terminate
    sproc = get_test_subprocess(wait=True)
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_threads (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1389, in test_threads
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_uids (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1511, in test_uids
    p = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_username (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1570, in test_username
    sproc = get_test_subprocess()
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_wait (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1107, in test_wait
    sproc = get_test_subprocess()
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_wait_non_children (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1162, in test_wait_non_children
    stdout=subprocess.PIPE)
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_wait_timeout_0 (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1176, in test_wait_timeout_0
    sproc = get_test_subprocess()
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_zombie_process (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2078, in test_zombie_process
    reap_children(search_all=True)
  File "test/test_psutil.py", line 257, in reap_children
    this_process = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_fetch_all (__main__.TestFetchAllProcesses)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2182, in test_fetch_all
    for p in psutil.process_iter():
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1291, in process_iter
    a = set(pids())
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1245, in pids
    return _psplatform.pids()
RuntimeError: failed to retrieve process list.

======================================================================
ERROR: test__eq__ (__main__.TestMisc)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2488, in test__eq__
    p1 = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test__hash__ (__main__.TestMisc)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2496, in test__hash__
    s = set([psutil.Process(), psutil.Process()])
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test__str__ (__main__.TestMisc)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2473, in test__str__
    sproc = get_test_subprocess()
  File "test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_serialization (__main__.TestMisc)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2562, in test_serialization
    check(psutil.Process().as_dict())
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: test_free (__main__.TestExampleScripts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2618, in test_free
    self.assert_stdout('free.py')
  File "test/test_psutil.py", line 2589, in assert_stdout
    out = sh(sys.executable + ' ' + exe).strip()
  File "test/test_psutil.py", line 180, in sh
    raise RuntimeError(stderr)
RuntimeError: /usr/pkg/lib/python2.7/site-packages/pkg_resources.py:1045: UserWarning: /home/wiz/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
  warnings.warn(msg, UserWarning)
Traceback (most recent call last):
  File "/archive/foreign/psutil/examples/free.py", line 41, in <module>
    main()
  File "/archive/foreign/psutil/examples/free.py", line 20, in main
    virt = psutil.virtual_memory()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1673, in virtual_memory

  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 71, in virtual_memory
ValueError: need more than 6 values to unpack


======================================================================
ERROR: test_meminfo (__main__.TestExampleScripts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2621, in test_meminfo
    self.assert_stdout('meminfo.py')
  File "test/test_psutil.py", line 2589, in assert_stdout
    out = sh(sys.executable + ' ' + exe).strip()
  File "test/test_psutil.py", line 180, in sh
    raise RuntimeError(stderr)
RuntimeError: /usr/pkg/lib/python2.7/site-packages/pkg_resources.py:1045: UserWarning: /home/wiz/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
  warnings.warn(msg, UserWarning)
Traceback (most recent call last):
  File "/archive/foreign/psutil/examples/meminfo.py", line 68, in <module>
    main()
  File "/archive/foreign/psutil/examples/meminfo.py", line 63, in main
    pprint_ntuple(psutil.virtual_memory())
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1673, in virtual_memory

  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 71, in virtual_memory
ValueError: need more than 6 values to unpack


======================================================================
ERROR: test_netstat (__main__.TestExampleScripts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2636, in test_netstat
    self.assert_stdout('netstat.py')
  File "test/test_psutil.py", line 2589, in assert_stdout
    out = sh(sys.executable + ' ' + exe).strip()
  File "test/test_psutil.py", line 180, in sh
    raise RuntimeError(stderr)
RuntimeError: /usr/pkg/lib/python2.7/site-packages/pkg_resources.py:1045: UserWarning: /home/wiz/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
  warnings.warn(msg, UserWarning)
Traceback (most recent call last):
  File "/archive/foreign/psutil/examples/netstat.py", line 64, in <module>
    main()
  File "/archive/foreign/psutil/examples/netstat.py", line 44, in main
    for p in psutil.process_iter():
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1291, in process_iter

  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1245, in pids

RuntimeError: failed to retrieve process list.


======================================================================
ERROR: test_pmap (__main__.TestExampleScripts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2639, in test_pmap
    self.assert_stdout('pmap.py', args=str(os.getpid()))
  File "test/test_psutil.py", line 2589, in assert_stdout
    out = sh(sys.executable + ' ' + exe).strip()
  File "test/test_psutil.py", line 180, in sh
    raise RuntimeError(stderr)
RuntimeError: /usr/pkg/lib/python2.7/site-packages/pkg_resources.py:1045: UserWarning: /home/wiz/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
  warnings.warn(msg, UserWarning)
Traceback (most recent call last):
  File "/archive/foreign/psutil/examples/pmap.py", line 57, in <module>
    main()
  File "/archive/foreign/psutil/examples/pmap.py", line 41, in main
    p = psutil.Process(int(sys.argv[1]))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__

  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init

  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time

  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
SystemError: error return without exception set


======================================================================
ERROR: test_process_detail (__main__.TestExampleScripts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2624, in test_process_detail
    self.assert_stdout('process_detail.py')
  File "test/test_psutil.py", line 2589, in assert_stdout
    out = sh(sys.executable + ' ' + exe).strip()
  File "test/test_psutil.py", line 180, in sh
    raise RuntimeError(stderr)
RuntimeError: /usr/pkg/lib/python2.7/site-packages/pkg_resources.py:1045: UserWarning: /home/wiz/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
  warnings.warn(msg, UserWarning)
Traceback (most recent call last):
  File "/archive/foreign/psutil/examples/process_detail.py", line 162, in <module>
    sys.exit(main())
  File "/archive/foreign/psutil/examples/process_detail.py", line 155, in main
    sys.exit(run(os.getpid()))
  File "/archive/foreign/psutil/examples/process_detail.py", line 69, in run
    p = psutil.Process(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__

  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init

  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time

  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
SystemError: error return without exception set


======================================================================
ERROR: test_ps (__main__.TestExampleScripts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2630, in test_ps
    self.assert_stdout('ps.py')
  File "test/test_psutil.py", line 2589, in assert_stdout
    out = sh(sys.executable + ' ' + exe).strip()
  File "test/test_psutil.py", line 180, in sh
    raise RuntimeError(stderr)
RuntimeError: /usr/pkg/lib/python2.7/site-packages/pkg_resources.py:1045: UserWarning: /home/wiz/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
  warnings.warn(msg, UserWarning)
Traceback (most recent call last):
  File "/archive/foreign/psutil/examples/ps.py", line 81, in <module>
    main()
  File "/archive/foreign/psutil/examples/ps.py", line 31, in main
    for p in psutil.process_iter():
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1291, in process_iter

  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1245, in pids

RuntimeError: failed to retrieve process list.


======================================================================
ERROR: test_pstree (__main__.TestExampleScripts)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2633, in test_pstree
    self.assert_stdout('pstree.py')
  File "test/test_psutil.py", line 2589, in assert_stdout
    out = sh(sys.executable + ' ' + exe).strip()
  File "test/test_psutil.py", line 180, in sh
    raise RuntimeError(stderr)
RuntimeError: /usr/pkg/lib/python2.7/site-packages/pkg_resources.py:1045: UserWarning: /home/wiz/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
  warnings.warn(msg, UserWarning)
Traceback (most recent call last):
  File "/archive/foreign/psutil/examples/pstree.py", line 71, in <module>
    main()
  File "/archive/foreign/psutil/examples/pstree.py", line 59, in main
    for p in psutil.process_iter():
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1291, in process_iter

  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 1245, in pids

RuntimeError: failed to retrieve process list.


======================================================================
ERROR: setUpClass (_posix.PosixSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/archive/foreign/psutil/test/_posix.py", line 51, in setUpClass
    stdin=subprocess.PIPE).pid
  File "/archive/foreign/psutil/test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
ERROR: setUpClass (_bsd.BSDSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/archive/foreign/psutil/test/_bsd.py", line 57, in setUpClass
    cls.pid = get_test_subprocess().pid
  File "/archive/foreign/psutil/test/test_psutil.py", line 144, in get_test_subprocess
    _subprocesses_started.add(psutil.Process(sproc.pid))
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set

======================================================================
FAIL: test_cpu_count (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 752, in test_cpu_count
    self.assertGreaterEqual(physical, 1)
AssertionError: None not greater than or equal to 1

----------------------------------------------------------------------
Ran 161 tests in 1.662s

FAILED (failures=1, errors=76, skipped=60)
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/pkg/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/archive/foreign/psutil/test/test_psutil.py", line 100, in cleanup
    reap_children(search_all=True)
  File "/archive/foreign/psutil/test/test_psutil.py", line 257, in reap_children
    this_process = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/pkg/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "test/test_psutil.py", line 100, in cleanup
    reap_children(search_all=True)
  File "test/test_psutil.py", line 257, in reap_children
    this_process = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__
    self._init(pid)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init
    self.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time
    self._create_time = self._proc.create_time()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
    return fun(self, *args, **kwargs)
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
    return cext.proc_create_time(self.pid)
SystemError: error return without exception set
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/pkg/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "test/test_psutil.py", line 100, in cleanup
    reap_children(search_all=True)
  File "test/test_psutil.py", line 257, in reap_children
    this_process = psutil.Process()
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 300, in __init__

  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 326, in _init

  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/__init__.py", line 584, in create_time

  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 210, in wrapper
  File "build/bdist.netbsd-7.99.2-amd64/egg/psutil/_psnetbsd.py", line 283, in create_time
SystemError: error return without exception set
*** Error code 1

Stop.
make: stopped in /archive/foreign/psutil

@0-wiz-0
Copy link
Contributor Author

0-wiz-0 commented Jan 11, 2015

I just saw that there is a new release out, but not even feedback on this version.
If it helps, I can give you a login on a NetBSD machine so you can work on it.
IMHO, even partial support is better than no support at all.

@giampaolo
Copy link
Owner

Hello. Judging from test results this doesn't seem ready for inclusion. What are the major stoppers? SSH access to a NetBSD would be welcome and I can try to take a look. Feel free to contact me privately ([email protected]).

@giampaolo giampaolo mentioned this pull request Jun 12, 2015
@giampaolo
Copy link
Owner

Sorry for not having given too much attention to this. In case you don't know I added support for OpenBSD in the last psutil release so I would like to push this further. http://grodola.blogspot.com/2015/11/openbsd-support-for-psutil.html explains how I reorganized source files in order to do that. If you're still interested in working on this you should update your PR in accordance, meaning having a shared _psutil_bsd.c file with multiple #ifdefs and arch/bsd/netbsd.c for all the stuff which differs.

@0-wiz-0
Copy link
Contributor Author

0-wiz-0 commented Dec 30, 2015

Ryo ONODERA has ported psutil to NetBSD, again, based on psutil 3.3.0. I've replaced my version with his and committed it to my fork. Please take a look! Thank you.

@@ -123,7 +123,7 @@
elif sys.platform.startswith("darwin"):
from . import _psosx as _psplatform

elif sys.platform.startswith("freebsd") or sys.platform.startswith("openbsd"):
elif sys.platform.startswith("freebsd") or sys.platform.startswith("openbsd") or sys.platform.startswith("netbsd"):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be PEP8 compliant

giampaolo added a commit that referenced this pull request Jan 8, 2016
giampaolo added a commit that referenced this pull request Jan 8, 2016
@0-wiz-0
Copy link
Contributor Author

0-wiz-0 commented Jan 8, 2016

What's the best way to disable the cwd function on NetBSD?
I tried make it return NULL (as above), "", and an exception, and none of these makes the tests work or at least be skipped.

@giampaolo
Copy link
Owner

I just did it in e377b74. It turns out NetBSD has /proc fs (didn't notice). I'm almost done with everything though. I will merge this soon.

@0-wiz-0
Copy link
Contributor Author

0-wiz-0 commented Jan 8, 2016

That's great news, thank you!

giampaolo added a commit that referenced this pull request Jan 13, 2016
giampaolo added a commit that referenced this pull request Jan 13, 2016
Add basic NetBSD support.
@giampaolo giampaolo merged commit 859d615 into giampaolo:master Jan 13, 2016
@giampaolo
Copy link
Owner

Merged into master. Next version of psutil will support NetBSD (yay!).

@0-wiz-0
Copy link
Contributor Author

0-wiz-0 commented Jan 13, 2016

Yay! Thank you!

I ran the tests again on psutil git head, and this is what I currently see:

======================================================================
ERROR: test_pid_0 (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2441, in test_pid_0
    p.as_dict()
  File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/__init__.py", line 455, in as_dict
    ret = attr()
  File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/__init__.py", line 582, in exe
    exe = self._proc.exe()
  File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/_psbsd.py", line 320, in wrapper
    return fun(self, *args, **kwargs)
  File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/_psbsd.py", line 354, in exe
    return cext.proc_exe(self.pid)
OSError: [Errno 2] No such file or directory

======================================================================
ERROR: test_cpu_count_logical (_bsd.BSDSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/archive/foreign/psutil/test/_bsd.py", line 123, in test_cpu_count_logical
    syst = sysctl("hw.ncpu")
  File "/archive/foreign/psutil/test/_bsd.py", line 47, in sysctl
    elif OPENBSD or NETBSD:
NameError: global name 'NETBSD' is not defined

======================================================================
ERROR: test_virtual_memory_total (_bsd.BSDSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/archive/foreign/psutil/test/_bsd.py", line 127, in test_virtual_memory_total
    num = sysctl('hw.physmem')
  File "/archive/foreign/psutil/test/_bsd.py", line 47, in sysctl
    elif OPENBSD or NETBSD:
NameError: global name 'NETBSD' is not defined

======================================================================
FAIL: test_disk_io_counters (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1159, in test_disk_io_counters
    assert key, key
AssertionError

======================================================================
FAIL: test_cmdline (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1742, in test_cmdline
    ' '.join(cmdline))
AssertionError: '/usr/pkg/bin/python2.7 -c -c' != '/usr/pkg/bin/python2.7 -c import time; time.sleep(60)'

======================================================================
FAIL: test_connections (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 474, in wrapper
    return fun(*args, **kwargs)
  File "test/test_psutil.py", line 2046, in test_connections
    ("all", "inet", "inet4", "tcp", "tcp4"))
  File "test/test_psutil.py", line 1977, in check_conn
    self.assertEqual(conn.raddr, raddr)
AssertionError: Tuples differ: ('0.0.0.0', 0) != ()

First tuple contains 2 additional elements.
First extra element 0:
0.0.0.0

- ('0.0.0.0', 0)
+ ()

======================================================================
FAIL: test_connections_unix (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 474, in wrapper
    return fun(*args, **kwargs)
  File "test/test_psutil.py", line 2086, in test_connections_unix
    check(SOCK_DGRAM)
  File "test/test_psutil.py", line 2074, in check
    check_connection_ntuple(conn)
  File "test/test_psutil.py", line 387, in check_connection_ntuple
    assert not conn.raddr, repr(conn.raddr)
AssertionError: '/var/run/log'

======================================================================
FAIL: test_send_signal (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1235, in test_send_signal
    assert fun.called
AssertionError

======================================================================
FAIL: test_threads (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1622, in test_threads
    self.assertEqual(len(step2), len(step1) + 1)
AssertionError: 2 != 3

======================================================================
FAIL: test_threads_2 (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1646, in test_threads_2
    p.threads()[0].user_time, delta=0.1)
AssertionError: 0.673857 != 0.000211 within 0.1 delta

======================================================================
FAIL: test_fetch_all (__main__.TestFetchAllProcesses)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2546, in test_fetch_all
    self.fail(''.join(failures))
AssertionError:
    ======================================================================
    FAIL: test_exe (proc=psutil.Process(pid=0, name='system'))
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "test/test_psutil.py", line 2511, in test_fetch_all
        ret = attr(*args)
      File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/__init__.py", line 582, in exe
        exe = self._proc.exe()
      File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/_psbsd.py", line 320, in wrapper
        return fun(self, *args, **kwargs)
      File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/_psbsd.py", line 354, in exe
        return cext.proc_exe(self.pid)
    OSError: [Errno 2] No such file or directory

    ======================================================================
    FAIL: test_num_ctx_switches (proc=psutil.Process(pid=23626, name='python3.5'), ret=pctxsw(voluntary=-7, involuntary=8)))
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "test/test_psutil.py", line 2531, in test_fetch_all
        meth(ret, p)
      File "test/test_psutil.py", line 2733, in num_ctx_switches
        self.assertTrue(ret.voluntary >= 0)
      File "/usr/pkg/lib/python2.7/unittest/case.py", line 422, in assertTrue
        raise self.failureException(msg)
    AssertionError: False is not true

    ======================================================================
    FAIL: test_uids (proc=psutil.Process(pid=1200, name='sh'), ret=puids(real=2000, effective=2000, saved=2000)))
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "test/test_psutil.py", line 2531, in test_fetch_all
        meth(ret, p)
      File "test/test_psutil.py", line 2592, in uids
        self.assertIn(uid, self._uids)
      File "/usr/pkg/lib/python2.7/unittest/case.py", line 803, in assertIn
        self.fail(self._formatMessage(msg, standardMsg))
      File "/usr/pkg/lib/python2.7/unittest/case.py", line 410, in fail
        raise self.failureException(msg)
    AssertionError: 2000 not found in set([0, 1, 2, 3, 7, 12, 14, 15, 16, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 30, 66, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 32767])

    ======================================================================
    FAIL: test_username (proc=psutil.Process(pid=1200, name='sh'), ret='2000'))
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "test/test_psutil.py", line 2531, in test_fetch_all
        meth(ret, p)
      File "test/test_psutil.py", line 2604, in username
        self.assertIn(ret, self._usernames)
      File "/usr/pkg/lib/python2.7/unittest/case.py", line 803, in assertIn
        self.fail(self._formatMessage(msg, standardMsg))
      File "/usr/pkg/lib/python2.7/unittest/case.py", line 410, in fail
        raise self.failureException(msg)
    AssertionError: '2000' not found in set(list of my local users)


======================================================================
FAIL: test_process_create_time (_bsd.BSDSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/archive/foreign/psutil/test/_bsd.py", line 93, in test_process_create_time
    self.assertEqual(start_ps, start_psutil)
AssertionError: '13. J\xc3\xa4nner 2016 10:33:33 CET' != 'Wed Jan 13 10:33:33 2016'

----------------------------------------------------------------------
Ran 206 tests in 3.452s

FAILED (failures=9, errors=3, skipped=73)
*** Error code 1

@giampaolo
Copy link
Owner

I applied different fixes. Can you re-run tests?

@giampaolo
Copy link
Owner

I should release 3.4.0 today. In the meantime I gave you and @ryoon credits in 711c45b. Thanks a lot for your effort.

@0-wiz-0
Copy link
Contributor Author

0-wiz-0 commented Jan 15, 2016

Sure, here are the new test results:

======================================================================
ERROR: test_pid_0 (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2452, in test_pid_0
    p.as_dict()
  File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/__init__.py", line 455, in as_dict
    ret = attr()
  File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/__init__.py", line 582, in exe
    exe = self._proc.exe()
  File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/_psbsd.py", line 320, in wrapper
    return fun(self, *args, **kwargs)
  File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/_psbsd.py", line 354, in exe
    return cext.proc_exe(self.pid)
OSError: [Errno 2] No such file or directory

======================================================================
FAIL: test_disk_io_counters (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1159, in test_disk_io_counters
    assert key, key
AssertionError

======================================================================
FAIL: test_connections_unix (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 474, in wrapper
    return fun(*args, **kwargs)
  File "test/test_psutil.py", line 2097, in test_connections_unix
    check(SOCK_DGRAM)
  File "test/test_psutil.py", line 2085, in check
    check_connection_ntuple(conn)
  File "test/test_psutil.py", line 387, in check_connection_ntuple
    assert not conn.raddr, repr(conn.raddr)
AssertionError: '/var/run/log'

======================================================================
FAIL: test_send_signal (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1235, in test_send_signal
    assert fun.called
AssertionError

======================================================================
FAIL: test_threads (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1622, in test_threads
    self.assertEqual(len(step2), len(step1) + 1)
AssertionError: 2 != 3

======================================================================
FAIL: test_threads_2 (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1646, in test_threads_2
    p.threads()[0].user_time, delta=0.1)
AssertionError: 0.462706 != 0.000156 within 0.1 delta

======================================================================
FAIL: test_fetch_all (__main__.TestFetchAllProcesses)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2557, in test_fetch_all
    self.fail(''.join(failures))
AssertionError:
    ======================================================================
    FAIL: test_exe (proc=psutil.Process(pid=0, name='system'))
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "test/test_psutil.py", line 2522, in test_fetch_all
        ret = attr(*args)
      File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/__init__.py", line 582, in exe
        exe = self._proc.exe()
      File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/_psbsd.py", line 320, in wrapper
        return fun(self, *args, **kwargs)
      File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/_psbsd.py", line 354, in exe
        return cext.proc_exe(self.pid)
    OSError: [Errno 2] No such file or directory


======================================================================
FAIL: test_process_create_time (_bsd.BSDSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/archive/foreign/psutil/test/_bsd.py", line 94, in test_process_create_time
    self.assertEqual(start_ps, start_psutil)
AssertionError: '15. J\xc3\xa4nner 2016 10:01:42 CET' != 'Fri Jan 15 10:01:42 2016'

======================================================================
FAIL: test_virtual_memory_total (_bsd.BSDSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/archive/foreign/psutil/test/_bsd.py", line 129, in test_virtual_memory_total
    self.assertEqual(num, psutil.virtual_memory().total)
AssertionError: -1 != 34298167296L

----------------------------------------------------------------------
Ran 206 tests in 3.019s

test_process_create_time fails because my default locale is German. The tests should probably reset to C locale if they compare locale-relevant strings.

Thank you for the credits!

@giampaolo
Copy link
Owner

Can you retry now?

@0-wiz-0
Copy link
Contributor Author

0-wiz-0 commented Jan 15, 2016

Sure:


======================================================================
FAIL: test_disk_io_counters (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1159, in test_disk_io_counters
    assert key, key
AssertionError

======================================================================
FAIL: test_connections_unix (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 474, in wrapper
    return fun(*args, **kwargs)
  File "test/test_psutil.py", line 2097, in test_connections_unix
    check(SOCK_DGRAM)
  File "test/test_psutil.py", line 2085, in check
    check_connection_ntuple(conn)
  File "test/test_psutil.py", line 387, in check_connection_ntuple
    assert not conn.raddr, repr(conn.raddr)
AssertionError: '/var/run/log'

======================================================================
FAIL: test_send_signal (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1235, in test_send_signal
    assert fun.called
AssertionError

======================================================================
FAIL: test_threads (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1622, in test_threads
    self.assertEqual(len(step2), len(step1) + 1)
AssertionError: 2 != 3

======================================================================
FAIL: test_threads_2 (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1646, in test_threads_2
    p.threads()[0].user_time, delta=0.1)
AssertionError: 0.521092 != 0.000155 within 0.1 delta

======================================================================
FAIL: test_fetch_all (__main__.TestFetchAllProcesses)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2557, in test_fetch_all
    self.fail(''.join(failures))
AssertionError:
    ======================================================================
    FAIL: test_exe (proc=psutil.Process(pid=142, name='dconf-service'))
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "test/test_psutil.py", line 2522, in test_fetch_all
        ret = attr(*args)
      File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/__init__.py", line 582, in exe
        exe = self._proc.exe()
      File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/_psbsd.py", line 320, in wrapper
        return fun(self, *args, **kwargs)
      File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/_psbsd.py", line 354, in exe
        return cext.proc_exe(self.pid)
    OSError: [Errno 2] No such file or directory


======================================================================
FAIL: test_process_create_time (_bsd.BSDSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/archive/foreign/psutil/test/_bsd.py", line 94, in test_process_create_time
    self.assertEqual(start_ps, start_psutil)
AssertionError: '15. J\xc3\xa4nner 2016 10:25:11 CET' != 'Fri Jan 15 10:25:11 2016'

======================================================================
FAIL: test_virtual_memory_total (_bsd.BSDSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/archive/foreign/psutil/test/_bsd.py", line 129, in test_virtual_memory_total
    self.assertEqual(num, psutil.virtual_memory().total)
AssertionError: -1 != 34298167296L

----------------------------------------------------------------------
Ran 206 tests in 3.206s

@giampaolo
Copy link
Owner

I don't understand why this happens (can't reproduce).

    ======================================================================
    FAIL: test_exe (proc=psutil.Process(pid=142, name='dconf-service'))
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "test/test_psutil.py", line 2522, in test_fetch_all
        ret = attr(*args)
      File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/__init__.py", line 582, in exe
        exe = self._proc.exe()
      File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/_psbsd.py", line 320, in wrapper
        return fun(self, *args, **kwargs)
      File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/_psbsd.py", line 354, in exe
        return cext.proc_exe(self.pid)
    OSError: [Errno 2] No such file or directory

Could you try to debug it? The implementation is in psutil/arch/bsd/netbsd.c, psutil_proc_exe function. Maybe the process disappears during the first or second sysctl call? You can verify that with something like this:

    error = sysctl(mib, 4, NULL, &size, NULL, 0);
    if (error == -1) {
        if (error == ENOENT) {
              ret = psutil_pid_exists(pid);
              if (ret == -1) {
                   return NULL;
              }
              else if (ret == 0) {
                     // process is gone
                    return NoSuchProcess();
              }
        }
        PyErr_SetFromErrno(PyExc_OSError);
        return NULL;
    }

@giampaolo
Copy link
Owner

Here's a patch:

diff --git a/psutil/arch/bsd/netbsd.c b/psutil/arch/bsd/netbsd.c
index f3cfd53..97b3356 100644
--- a/psutil/arch/bsd/netbsd.c
+++ b/psutil/arch/bsd/netbsd.c
@@ -172,15 +172,12 @@ psutil_proc_exe(PyObject *self, PyObject *args) {
     size = sizeof(pathname);
     error = sysctl(mib, 4, NULL, &size, NULL, 0);
     if (error == -1) {
-        PyErr_SetFromErrno(PyExc_OSError);
-        return NULL;
-    }
+        goto error;

     error = sysctl(mib, 4, pathname, &size, NULL, 0);
-    if (error == -1) {
-        PyErr_SetFromErrno(PyExc_OSError);
-        return NULL;
-    }
+    if (error == -1)
+        goto error;
+
     if (size == 0 || strlen(pathname) == 0) {
         ret = psutil_pid_exists(pid);
         if (ret == -1)
@@ -191,6 +188,18 @@ psutil_proc_exe(PyObject *self, PyObject *args) {
             strcpy(pathname, "");
     }
     return Py_BuildValue("s", pathname);
+
+error:
+    if (error == -1) {
+        if (error == ENOENT) {
+            ret = psutil_pid_exists(pid);
+            if (ret == 0)
+                return NoSuchProcess();
+        }
+        PyErr_SetFromErrno(PyExc_OSError);
+        return NULL;
+    }
+
 #else
     return Py_BuildValue("s", "");
 #endif

Can you try it?

@0-wiz-0
Copy link
Contributor Author

0-wiz-0 commented Jan 15, 2016

The process is long-running and still exists.
The test failure on that process is repeatable for me.
I'm not quite sure how you're extracting information for that process, but here's the listing from /proc/142:

ls -l /proc/142/
total 176
-r--r--r--  1 wiz   users      0 Jan 15 11:10 cmdline
--w-------  1 wiz   users      0 Jan 15 11:10 ctl
lr-xr-xr-x  1 root  wheel      1 Jan 15 11:10 cwd -> /
-r--r--r--  1 wiz   users      6 Jan 15 11:10 emul
lr-xr-xr-x  1 root  wheel      1 Jan 15 11:10 exe -> /
dr-x------  2 wiz   users    512 Jan 15 11:10 fd
-rwxr-xr-x  1 root  wheel  79008 Dec 29 01:40 file
-rw-------  1 wiz   users    512 Jan 15 11:10 fpregs
-r--------  1 wiz   users      0 Jan 15 11:10 map
-r--------  1 wiz   users      0 Jan 15 11:10 maps
-rw-------  1 wiz   users  98304 Jan 15 11:10 mem
--w-------  1 wiz   users      0 Jan 15 11:10 note
--w-------  1 wiz   users      0 Jan 15 11:10 notepg
-rw-------  1 wiz   users    208 Jan 15 11:10 regs
lr-xr-xr-x  1 root  wheel      1 Jan 15 11:10 root -> /
-r--r--r--  1 wiz   users      0 Jan 15 11:10 stat
-r--r--r--  1 wiz   users      0 Jan 15 11:10 statm
-r--r--r--  1 wiz   users      0 Jan 15 11:10 status
dr-xr-xr-x  2 wiz   users    512 Jan 15 11:10 task

The file sizes are not relevant, e.g.:

cat /proc/142/cmdline
/usr/pkg/libexec/dconf-service

Here's the sysctl(8) output for the pid:

sysctl  proc.142 |less
proc.142.corename = %n.core
proc.142.rlimit.cputime.soft = unlimited
proc.142.rlimit.cputime.hard = unlimited
proc.142.rlimit.filesize.soft = unlimited
proc.142.rlimit.filesize.hard = unlimited
proc.142.rlimit.datasize.soft = 268435456
proc.142.rlimit.datasize.hard = 8589934592
proc.142.rlimit.stacksize.soft = 4194304
proc.142.rlimit.stacksize.hard = 134217728
proc.142.rlimit.coredumpsize.soft = unlimited
proc.142.rlimit.coredumpsize.hard = unlimited
proc.142.rlimit.memoryuse.soft = 33261957120
proc.142.rlimit.memoryuse.hard = 33261957120
proc.142.rlimit.memorylocked.soft = 11087319040
proc.142.rlimit.memorylocked.hard = 33261957120
proc.142.rlimit.maxproc.soft = 1024
proc.142.rlimit.maxproc.hard = 1044
proc.142.rlimit.descriptors.soft = 1024
proc.142.rlimit.descriptors.hard = 3404
proc.142.rlimit.sbsize.soft = unlimited
proc.142.rlimit.sbsize.hard = unlimited
proc.142.rlimit.vmemoryuse.soft = unlimited
proc.142.rlimit.vmemoryuse.hard = unlimited
proc.142.rlimit.maxlwp.soft = 1024
proc.142.rlimit.maxlwp.hard = 2048
proc.142.stopfork = 0
proc.142.stopexec = 0
proc.142.stopexit = 0

@0-wiz-0
Copy link
Contributor Author

0-wiz-0 commented Jan 15, 2016

With your patch (btw, you need to remove the opening '{' in the first if too) I still get the same error:

======================================================================
FAIL: test_fetch_all (__main__.TestFetchAllProcesses)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 2557, in test_fetch_all
    self.fail(''.join(failures))
AssertionError:     
    ======================================================================
    FAIL: test_exe (proc=psutil.Process(pid=142, name='dconf-service'))
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "test/test_psutil.py", line 2522, in test_fetch_all
        ret = attr(*args)
      File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/__init__.py", line 582, in exe
        exe = self._proc.exe()
      File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/_psbsd.py", line 320, in wrapper
        return fun(self, *args, **kwargs)
      File "/home/wiz/.local/lib/python2.7/site-packages/psutil-3.4.0-py2.7-netbsd-7.99.25-amd64.egg/psutil/_psbsd.py", line 354, in exe
        return cext.proc_exe(self.pid)
    OSError: [Errno 2] No such file or directory

@giampaolo
Copy link
Owner

OK can you please try now (337c6be)?

@0-wiz-0
Copy link
Contributor Author

0-wiz-0 commented Jan 15, 2016

Down to 7!


======================================================================
FAIL: test_disk_io_counters (__main__.TestSystemAPIs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1159, in test_disk_io_counters
    assert key, key
AssertionError

======================================================================
FAIL: test_connections_unix (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 474, in wrapper
    return fun(*args, **kwargs)
  File "test/test_psutil.py", line 2097, in test_connections_unix
    check(SOCK_DGRAM)
  File "test/test_psutil.py", line 2085, in check
    check_connection_ntuple(conn)
  File "test/test_psutil.py", line 387, in check_connection_ntuple
    assert not conn.raddr, repr(conn.raddr)
AssertionError: '/var/run/log'

======================================================================
FAIL: test_send_signal (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1235, in test_send_signal
    assert fun.called
AssertionError

======================================================================
FAIL: test_threads (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1622, in test_threads
    self.assertEqual(len(step2), len(step1) + 1)
AssertionError: 2 != 3

======================================================================
FAIL: test_threads_2 (__main__.TestProcess)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1646, in test_threads_2
    p.threads()[0].user_time, delta=0.1)
AssertionError: 0.587031 != 0.000151 within 0.1 delta

======================================================================
FAIL: test_process_create_time (_bsd.BSDSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/archive/foreign/psutil/test/_bsd.py", line 94, in test_process_create_time
    self.assertEqual(start_ps, start_psutil)
AssertionError: '15. J\xc3\xa4nner 2016 13:02:55 CET' != 'Fri Jan 15 13:02:55 2016'

======================================================================
FAIL: test_virtual_memory_total (_bsd.BSDSpecificTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/archive/foreign/psutil/test/_bsd.py", line 129, in test_virtual_memory_total
    self.assertEqual(num, psutil.virtual_memory().total)
AssertionError: -1 != 34298167296L

----------------------------------------------------------------------
Ran 206 tests in 2.942s

@giampaolo
Copy link
Owner

OK, cool. I think I'm gonna make a release now. These are not important failures and hopefully I/we can fix them later and use this very ticket. for discussing

@0-wiz-0
Copy link
Contributor Author

0-wiz-0 commented Jan 15, 2016

I'll trust your judgment on that. Let's do it this way.

@giampaolo
Copy link
Owner

@0-wiz-0 would you mind taking a look at this? #770

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

Successfully merging this pull request may close these issues.

3 participants