U
    ;g3<                     @   s  d Z ddlmZ ddlZddlZddlZddlZddlZddlmZ ddlm	Z	 ddlm
Z
 ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z  ddlm!Z! ddlm"Z" ddlm#Z# ddlm$Z$ ddlm%Z% dd lm&Z& dd!lm'Z' ej(j)Z)e* Z+d"Z,d#d$ Z-G d%d& d&eZ.G d'd( d(e.Z/e#j0j1e d)d*G d+d, d,eZ2G d-d. d.eZ3dS )/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)	QEMU_USER)TestMemoryLeak)create_sockets)
get_testfn)process_namespace)pytest)skip_on_access_denied)spawn_testproc)system_namespace)	terminate   c                  C   s   dd } | S )zsDecorator for those Linux functions which are implemented in pure
    Python, and which we want to run faster.
    c                    s   t   fdd}|S )Nc                    sJ   t r6| jj}zt| j_ | f||W S || j_X n | f||S d S N)r   	__class__times	FEW_TIMES)selfargskwargsbeforefun >/tmp/pip-unpacked-wheel-u0epr1ex/psutil/tests/test_memleaks.pywrapperD   s    z5fewtimes_if_linux.<locals>.decorator.<locals>.wrapper)	functoolswraps)r+   r.   r,   r*   r-   	decoratorC   s    z$fewtimes_if_linux.<locals>.decoratorr,   )r1   r,   r,   r-   fewtimes_if_linux>   s    r2   c                   @   s0  e Zd ZdZeZdd Ze dd Ze dd Z	e dd	 Z
e d
d Zejje dde dd Zejje dde dd Ze dd Zdd Zdd Zejje dddd Zejje dddd Zejje dde dd Zejjeddd d! Ze d"d# Ze eed$d%d& Zejje d'dd(d) Z ejje dde d*d+ Z!e d,d- Z"e eed$d.d/ Z#e d0d1 Z$e ejje% ddd2d3 Z&e d4d5 Z'e d6d7 Z(ejje dde d8d9 Z)d:d; Z*e d<d= Z+ejje, ddd>d? Z-ejje, ddd@dA Z.e dBdC Z/ejje0 dde dDdE Z1ejje2 dFdejje3 dddGdH Z4ejje2 dFdejje3 dddIdJ Z5e ejjedKddLdM Z6ejje7 dddNdO Z8ejje d'ddPdQ Z9dRS )STestProcessObjectLeaksz$Test leaks of Process class methods.c                 C   s    t d }|| |j|j  d S r"   )r   test_class_coverageZgettersZsettersr&   nsr,   r,   r-   test_coverage_   s    z$TestProcessObjectLeaks.test_coveragec                 C   s   |  | jj d S r"   )executeprocnamer&   r,   r,   r-   	test_namec   s    z TestProcessObjectLeaks.test_namec                 C   s   |  | jj d S r"   )r8   r9   Zcmdliner;   r,   r,   r-   test_cmdlineg   s    z#TestProcessObjectLeaks.test_cmdlinec                 C   s   |  | jj d S r"   )r8   r9   Zexer;   r,   r,   r-   test_exek   s    zTestProcessObjectLeaks.test_exec                 C   s   |  | jj d S r"   )r8   r9   Zppidr;   r,   r,   r-   	test_ppido   s    z TestProcessObjectLeaks.test_ppidz
POSIX onlyreasonc                 C   s   |  | jj d S r"   )r8   r9   Zuidsr;   r,   r,   r-   	test_uidss   s    z TestProcessObjectLeaks.test_uidsc                 C   s   |  | jj d S r"   )r8   r9   Zgidsr;   r,   r,   r-   	test_gidsx   s    z TestProcessObjectLeaks.test_gidsc                 C   s   |  | jj d S r"   )r8   r9   statusr;   r,   r,   r-   test_status}   s    z"TestProcessObjectLeaks.test_statusc                 C   s   |  | jj d S r"   )r8   r9   nicer;   r,   r,   r-   	test_nice   s    z TestProcessObjectLeaks.test_nicec                    s    t    fdd d S )Nc                      s   j  S r"   )r9   rF   r,   Znicenessr&   r,   r-   <lambda>       z6TestProcessObjectLeaks.test_nice_set.<locals>.<lambda>)thisprocrF   r8   r;   r,   rH   r-   test_nice_set   s    z$TestProcessObjectLeaks.test_nice_setnot supportedc                 C   s   |  | jj d S r"   )r8   r9   ionicer;   r,   r,   r-   test_ionice   s    z"TestProcessObjectLeaks.test_ionicec                    sZ   t r"t   fdd n4  fdd ttjt	 dd} 
t| d S )Nc                      s    j S r"   )r9   rN   r,   r&   valuer,   r-   rI      rJ   z8TestProcessObjectLeaks.test_ionice_set.<locals>.<lambda>c                      s    j tjS r"   )r9   rN   psutilZIOPRIO_CLASS_NONEr,   r;   r,   r-   rI      rJ   r   )r   rK   rN   r8   r/   partialcextZproc_ioprio_setosgetpidexecute_w_excOSErrorr&   r+   r,   rP   r-   test_ionice_set   s    z&TestProcessObjectLeaks.test_ionice_setc                 C   s   |  | jj d S r"   )r8   r9   Zio_countersr;   r,   r,   r-   test_io_counters   s    z'TestProcessObjectLeaks.test_io_counterszworthless on POSIXc                 C   s   t    | | jj d S r"   )rR   Processusernamer8   r9   r;   r,   r,   r-   test_username   s    z$TestProcessObjectLeaks.test_usernamec                 C   s   |  | jj d S r"   )r8   r9   Zcreate_timer;   r,   r,   r-   test_create_time   s    z'TestProcessObjectLeaks.test_create_time)Zonly_ifc                 C   s   |  | jj d S r"   )r8   r9   Znum_threadsr;   r,   r,   r-   test_num_threads   s    z'TestProcessObjectLeaks.test_num_threadsWINDOWS onlyc                 C   s   |  | jj d S r"   )r8   r9   Znum_handlesr;   r,   r,   r-   test_num_handles   s    z'TestProcessObjectLeaks.test_num_handlesc                 C   s   |  | jj d S r"   )r8   r9   Znum_fdsr;   r,   r,   r-   test_num_fds   s    z#TestProcessObjectLeaks.test_num_fdsc                 C   s   |  | jj d S r"   )r8   r9   Znum_ctx_switchesr;   r,   r,   r-   test_num_ctx_switches   s    z,TestProcessObjectLeaks.test_num_ctx_switchesc                 C   s   |  | jj d S r"   )r8   r9   threadsr;   r,   r,   r-   test_threads   s    z#TestProcessObjectLeaks.test_threadsc                 C   s   |  | jj d S r"   )r8   r9   	cpu_timesr;   r,   r,   r-   test_cpu_times   s    z%TestProcessObjectLeaks.test_cpu_timesc                 C   s   |  | jj d S r"   )r8   r9   Zcpu_numr;   r,   r,   r-   test_cpu_num   s    z#TestProcessObjectLeaks.test_cpu_numc                 C   s   |  | jj d S r"   )r8   r9   Zmemory_infor;   r,   r,   r-   test_memory_info   s    z'TestProcessObjectLeaks.test_memory_infoc                 C   s   |  | jj d S r"   )r8   r9   Zmemory_full_infor;   r,   r,   r-   test_memory_full_info   s    z,TestProcessObjectLeaks.test_memory_full_infoc                 C   s   |  | jj d S r"   )r8   r9   Zterminalr;   r,   r,   r-   test_terminal   s    z$TestProcessObjectLeaks.test_terminalc                 C   s$   t rtn| j}| j| jj|d d S )Nr$   )r   r%   r$   r8   r9   resumer&   r$   r,   r,   r-   test_resume   s    z"TestProcessObjectLeaks.test_resumec                 C   s   |  | jj d S r"   )r8   r9   cwdr;   r,   r,   r-   test_cwd   s    zTestProcessObjectLeaks.test_cwdc                 C   s   |  | jj d S r"   )r8   r9   cpu_affinityr;   r,   r,   r-   test_cpu_affinity   s    z(TestProcessObjectLeaks.test_cpu_affinityc                    s4   t    fdd tfdd d S )Nc                      s   j  S r"   r9   rt   r,   Zaffinityr&   r,   r-   rI      rJ   z>TestProcessObjectLeaks.test_cpu_affinity_set.<locals>.<lambda>c                      s    j dgS NrS   rv   r,   r;   r,   r-   rI      rJ   )rK   rt   r8   rX   
ValueErrorr;   r,   rw   r-   test_cpu_affinity_set   s    z,TestProcessObjectLeaks.test_cpu_affinity_setc              	   C   s*   t t d | | jj W 5 Q R X d S )Nw)openr   r8   r9   Z
open_filesr;   r,   r,   r-   test_open_files   s    z&TestProcessObjectLeaks.test_open_filesc                 C   s   |  | jj d S r"   )r8   r9   Zmemory_mapsr;   r,   r,   r-   test_memory_maps   s    z'TestProcessObjectLeaks.test_memory_mapsz
LINUX onlyc                    s      fdd d S )Nc                      s    j tjS r"   r9   rlimitrR   RLIMIT_NOFILEr,   r;   r,   r-   rI      rJ   z4TestProcessObjectLeaks.test_rlimit.<locals>.<lambda>r8   r;   r,   r;   r-   test_rlimit   s    z"TestProcessObjectLeaks.test_rlimitc                    s<   t tj  fdd ttffdd d S )Nc                      s   j tj S r"   r   r,   limitr&   r,   r-   rI      rJ   z8TestProcessObjectLeaks.test_rlimit_set.<locals>.<lambda>c                      s    j dS rx   )r9   r   r,   r;   r,   r-   rI      rJ   )rK   r   rR   r   r8   rX   rY   ry   r;   r,   r   r-   test_rlimit_set   s    z&TestProcessObjectLeaks.test_rlimit_setzworthless on WINDOWSc              	      s6   t  & trdnd  fdd W 5 Q R X d S )NZinetallc                      s   j  S r"   )r9   net_connectionsr,   kindr&   r,   r-   rI     rJ   z=TestProcessObjectLeaks.test_net_connections.<locals>.<lambda>)r   r   r8   r;   r,   r   r-   test_net_connections   s    z+TestProcessObjectLeaks.test_net_connectionsc                 C   s   |  | jj d S r"   )r8   r9   environr;   r,   r,   r-   test_environ  s    z#TestProcessObjectLeaks.test_environc                 C   s   |  dd  d S )Nc                   S   s   t t S r"   )rU   	proc_inforV   rW   r,   r,   r,   r-   rI     rJ   z7TestProcessObjectLeaks.test_proc_info.<locals>.<lambda>r   r;   r,   r,   r-   test_proc_info
  s    z%TestProcessObjectLeaks.test_proc_infoN):__name__
__module____qualname____doc__rK   r9   r7   r2   r<   r=   r>   r?   r   markskipifr   rB   rC   rE   rG   rL   r   rO   r[   r   r\   r_   r`   r   r   ra   r   rc   rd   re   rg   ri   r   rj   rk   rl   rm   rq   rs   r   ru   rz   r}   r   r~   r   r   r   r   r   r   r   r   r,   r,   r,   r-   r3   Z   s   






	











r3   c                       sp   e Zd ZdZe fddZe fddZdd Zerhdd	 Z	d
d Z
dd Zdd Zdd Zdd Z  ZS )TestTerminatedProcessLeakszRepeat 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                    s:   t    t | _t| jj| _| j  | j	  d S r"   )
r
   
setUpClassr   subprR   r]   pidr9   killwaitclsr#   r,   r-   r     s
    

z%TestTerminatedProcessLeaks.setUpClassc                    s   t    t| j d S r"   )r
   tearDownClassr    r   r   r   r,   r-   r     s    
z(TestTerminatedProcessLeaks.tearDownClassc                 C   s&   z
|  W n t jk
r    Y nX d S r"   )rR   ZNoSuchProcessrZ   r,   r,   r-   call#  s    
zTestTerminatedProcessLeaks.callc                 C   s   |  | jj d S r"   )r8   r9   r   r;   r,   r,   r-   	test_kill+  s    z$TestTerminatedProcessLeaks.test_killc                 C   s   |  | jj d S r"   )r8   r9   r    r;   r,   r,   r-   test_terminate.  s    z)TestTerminatedProcessLeaks.test_terminatec                 C   s   |  | jj d S r"   )r8   r9   Zsuspendr;   r,   r,   r-   test_suspend1  s    z'TestTerminatedProcessLeaks.test_suspendc                 C   s   |  | jj d S r"   )r8   r9   ro   r;   r,   r,   r-   rq   4  s    z&TestTerminatedProcessLeaks.test_resumec                 C   s   |  | jj d S r"   )r8   r9   r   r;   r,   r,   r-   	test_wait7  s    z$TestTerminatedProcessLeaks.test_waitc                    s    fdd}  | d S )Nc                      s*   zt  jjW S  tk
r$   Y nX d S r"   )rU   r   r9   r   r	   r,   r;   r,   r-   r   <  s    z7TestTerminatedProcessLeaks.test_proc_info.<locals>.callr   )r&   r   r,   r;   r-   r   :  s    z)TestTerminatedProcessLeaks.test_proc_info)r   r   r   r   classmethodr   r   r   r   r   r   r   rq   r   r   __classcell__r,   r,   r   r-   r     s   r   rb   r@   c                   @   s   e Zd Zdd Zdd ZdS )TestProcessDualImplementationc                 C   s   |  dd  d S )Nc                   S   s   t jt ddS )NTZuse_pebrU   Zproc_cmdlinerV   rW   r,   r,   r,   r-   rI   H  rJ   zETestProcessDualImplementation.test_cmdline_peb_true.<locals>.<lambda>r   r;   r,   r,   r-   test_cmdline_peb_trueG  s    z3TestProcessDualImplementation.test_cmdline_peb_truec                 C   s   |  dd  d S )Nc                   S   s   t jt ddS )NFr   r   r,   r,   r,   r-   rI   K  rJ   zFTestProcessDualImplementation.test_cmdline_peb_false.<locals>.<lambda>r   r;   r,   r,   r-   test_cmdline_peb_falseJ  s    z4TestProcessDualImplementation.test_cmdline_peb_falseN)r   r   r   r   r   r,   r,   r,   r-   r   E  s   r   c                   @   sP  e Zd ZdZdd Ze dd Ze dd Ze dd	 Ze d
d Z	e dd Z
e ejjeore dkddejje dddd Zejje dddd Zdd Zejjedddd Zdd Zdd Zejjed dd!d" Zejjeoejd# d$de d%d& Z e d'd( Z!e ejje" ddd)d* Z#e ejjeone$ d+kd,dd-d. Z%d/d0 Z&ejjed dd1d2 Z'e ejje( ddd3d4 Z)e ejje* ddd5d6 Z+e ejje, ddd7d8 Z-e d9d: Z.d;d< Z/d=d> Z0erLd?d@ Z1dAdB Z2dCdD Z3dEdF Z4dGdH Z5dIS )JTestModuleFunctionsLeaksz&Test leaks of psutil module functions.c                 C   s   t  }|| |j d S r"   )r   r4   r   r5   r,   r,   r-   r7   V  s    z&TestModuleFunctionsLeaks.test_coveragec                 C   s   |  dd  d S )Nc                   S   s   t jddS )NTlogicalrR   	cpu_countr,   r,   r,   r-   rI   ^  rJ   z9TestModuleFunctionsLeaks.test_cpu_count.<locals>.<lambda>r   r;   r,   r,   r-   test_cpu_count\  s    z'TestModuleFunctionsLeaks.test_cpu_countc                 C   s   |  dd  d S )Nc                   S   s   t jddS )NFr   r   r,   r,   r,   r-   rI   b  rJ   z?TestModuleFunctionsLeaks.test_cpu_count_cores.<locals>.<lambda>r   r;   r,   r,   r-   test_cpu_count_cores`  s    z-TestModuleFunctionsLeaks.test_cpu_count_coresc                 C   s   |  tj d S r"   )r8   rR   rh   r;   r,   r,   r-   ri   d  s    z'TestModuleFunctionsLeaks.test_cpu_timesc                 C   s   |  dd  d S )Nc                   S   s   t jddS )NT)Zpercpu)rR   rh   r,   r,   r,   r-   rI   j  rJ   z=TestModuleFunctionsLeaks.test_per_cpu_times.<locals>.<lambda>r   r;   r,   r,   r-   test_per_cpu_timesh  s    z+TestModuleFunctionsLeaks.test_per_cpu_timesc                 C   s   |  tj d S r"   )r8   rR   Z	cpu_statsr;   r,   r,   r-   test_cpu_statsl  s    z'TestModuleFunctionsLeaks.test_cpu_statsZarm64zskipped due to #1892r@   rM   c                 C   s   |  tj d S r"   )r8   rR   Zcpu_freqr;   r,   r,   r-   test_cpu_freqp  s    z&TestModuleFunctionsLeaks.test_cpu_freqrb   c                 C   s   t   | t j d S r"   )rR   
getloadavgr8   r;   r,   r,   r-   test_getloadavgy  s    z(TestModuleFunctionsLeaks.test_getloadavgc                 C   s   |  tj d S r"   )r8   rR   Zvirtual_memoryr;   r,   r,   r-   test_virtual_memory  s    z,TestModuleFunctionsLeaks.test_virtual_memoryz&worthless on SUNOS (uses a subprocess)c                 C   s   |  tj d S r"   )r8   rR   Zswap_memoryr;   r,   r,   r-   test_swap_memory  s    z)TestModuleFunctionsLeaks.test_swap_memoryc                 C   s$   t rtn| j}| jdd |d d S )Nc                   S   s   t t S r"   )rR   Z
pid_existsrV   rW   r,   r,   r,   r-   rI     rJ   z:TestModuleFunctionsLeaks.test_pid_exists.<locals>.<lambda>rn   r   r%   r$   r8   rp   r,   r,   r-   test_pid_exists  s    z(TestModuleFunctionsLeaks.test_pid_existsc                 C   s$   t rtn| j}| jdd |d d S )Nc                   S   s
   t dS )N.)rR   
disk_usager,   r,   r,   r-   rI     rJ   z:TestModuleFunctionsLeaks.test_disk_usage.<locals>.<lambda>rn   r   rp   r,   r,   r-   test_disk_usage  s    z(TestModuleFunctionsLeaks.test_disk_usagezQEMU user not supportedc                 C   s   |  tj d S r"   )r8   rR   Zdisk_partitionsr;   r,   r,   r-   test_disk_partitions  s    z-TestModuleFunctionsLeaks.test_disk_partitionsz/proc/diskstatsz3/proc/diskstats not available on this Linux versionc                 C   s   |  dd  d S )Nc                   S   s   t jddS NF)Znowrap)rR   Zdisk_io_countersr,   r,   r,   r-   rI     rJ   z@TestModuleFunctionsLeaks.test_disk_io_counters.<locals>.<lambda>r   r;   r,   r,   r-   test_disk_io_counters  s    z.TestModuleFunctionsLeaks.test_disk_io_countersc                 C   s   |  tj d S r"   )r8   rR   Zpidsr;   r,   r,   r-   	test_pids  s    z"TestModuleFunctionsLeaks.test_pidsc                 C   s   |  dd  d S )Nc                   S   s   t jddS r   )rR   Znet_io_countersr,   r,   r,   r-   rI     rJ   z?TestModuleFunctionsLeaks.test_net_io_counters.<locals>.<lambda>r   r;   r,   r,   r-   test_net_io_counters  s    z-TestModuleFunctionsLeaks.test_net_io_countersr   zneed root accessc              	   C   s0   t jdd t  | dd  W 5 Q R X d S )Nr   r   c                   S   s   t jddS )Nr   r   )rR   r   r,   r,   r,   r-   rI     rJ   z?TestModuleFunctionsLeaks.test_net_connections.<locals>.<lambda>)rR   r   r   r8   r;   r,   r,   r-   r     s    z-TestModuleFunctionsLeaks.test_net_connectionsc                 C   s"   t rdn| j}| jtj|d d S )Ni @ )	tolerance)r   r   r8   rR   Znet_if_addrs)r&   r   r,   r,   r-   test_net_if_addrs  s    z*TestModuleFunctionsLeaks.test_net_if_addrsc                 C   s   |  tj d S r"   )r8   rR   Znet_if_statsr;   r,   r,   r-   test_net_if_stats  s    z*TestModuleFunctionsLeaks.test_net_if_statsc                 C   s   |  tj d S r"   )r8   rR   Zsensors_batteryr;   r,   r,   r-   test_sensors_battery  s    z-TestModuleFunctionsLeaks.test_sensors_batteryc                 C   s   |  tj d S r"   )r8   rR   Zsensors_temperaturesr;   r,   r,   r-   test_sensors_temperatures  s    z2TestModuleFunctionsLeaks.test_sensors_temperaturesc                 C   s   |  tj d S r"   )r8   rR   Zsensors_fansr;   r,   r,   r-   test_sensors_fans  s    z*TestModuleFunctionsLeaks.test_sensors_fansc                 C   s   |  tj d S r"   )r8   rR   Z	boot_timer;   r,   r,   r-   test_boot_time  s    z'TestModuleFunctionsLeaks.test_boot_timec                 C   s   |  tj d S r"   )r8   rR   Zusersr;   r,   r,   r-   
test_users  s    z#TestModuleFunctionsLeaks.test_usersc                 C   s   |  dd  d S )Nc                   S   s
   t dS )NF)rR   Z
_set_debugr,   r,   r,   r-   rI     rJ   z9TestModuleFunctionsLeaks.test_set_debug.<locals>.<lambda>r   r;   r,   r,   r-   test_set_debug  s    z'TestModuleFunctionsLeaks.test_set_debugc                 C   s   |  tj d S r"   )r8   rU   Zwinservice_enumerater;   r,   r,   r-   test_win_service_iter  s    z.TestModuleFunctionsLeaks.test_win_service_iterc                 C   s   d S r"   r,   r;   r,   r,   r-   test_win_service_get  s    z-TestModuleFunctionsLeaks.test_win_service_getc                    s&   t t   |  fdd d S )Nc                      s
   t  S r"   )rU   Zwinservice_query_configr,   r:   r,   r-   rI     rJ   zFTestModuleFunctionsLeaks.test_win_service_get_config.<locals>.<lambda>nextrR   Zwin_service_iterr:   r8   r;   r,   r   r-   test_win_service_get_config  s    z4TestModuleFunctionsLeaks.test_win_service_get_configc                    s&   t t   |  fdd d S )Nc                      s
   t  S r"   )rU   Zwinservice_query_statusr,   r   r,   r-   rI     rJ   zFTestModuleFunctionsLeaks.test_win_service_get_status.<locals>.<lambda>r   r;   r,   r   r-   test_win_service_get_status  s    z4TestModuleFunctionsLeaks.test_win_service_get_statusc                    s&   t t   |  fdd d S )Nc                      s
   t  S r"   )rU   Zwinservice_query_descrr,   r   r,   r-   rI     rJ   zKTestModuleFunctionsLeaks.test_win_service_get_description.<locals>.<lambda>r   r;   r,   r   r-    test_win_service_get_description  s    z9TestModuleFunctionsLeaks.test_win_service_get_descriptionN)6r   r   r   r   r7   r2   r   r   ri   r   r   r   r   r   r   platformmachiner   r   r   r   r   r   r   r   r   r   r   r   rV   pathexistsr   r   r   r   getuidr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r,   r,   r,   r-   r   S  s   




 





r   )4r   
__future__r   r/   rV   r   rR   Zpsutil._commonr   r   r   r   r   r   Zpsutil._compatr	   r
   Zpsutil.testsr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    Z_psplatformrU   r]   rK   r%   r2   r3   r   r   r   r   r   r,   r,   r,   r-   <module>   s\   
 66