+
    VN÷h’R  ã                   óJ  € R t ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RI
t
^ RI
Ht ^ RI
Ht ^ R	I
Ht ^ R
I
Ht ^ RI
Ht ^ RI
Ht ^ RI
Ht ^ RI
Ht ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIH t  ^ RIH!t! ^ RIH"t" ^ RIH#t# ^ RIH$t$ ^ RIH%t% ]&! ]R ]'! 4       4      t(R! t)]PT                  PW                  R"R#7       ! R$ R%]4      4       t, ! R& R'],4      t-]PT                  PW                  R"R#7       ! R( R)],4      4       t.]PT                  PW                  R"R#7       ! R* R+],4      4       t/ ! R, R-],4      t0]PT                  Pc                  ]R.R/7       ! R0 R1],4      4       t2 ! R2 R3]4      t3R# )4zFTests for psutil.net_connections() and Process.net_connections() APIs.N)Úclosing)ÚAF_INET)ÚAF_INET6)Ú
SOCK_DGRAM)ÚSOCK_STREAM)ÚFREEBSD)ÚLINUX)ÚMACOS)ÚNETBSD)ÚOPENBSD)ÚPOSIX)ÚSUNOS)ÚWINDOWS)Úsupports_ipv6)ÚAF_UNIX)ÚHAS_NET_CONNECTIONS_UNIX)ÚSKIP_SYSCONS)ÚPsutilTestCase)Úbind_socket)Úbind_unix_socket)Úcheck_connection_ntuple)Úcreate_sockets)Úfilter_proc_net_connections)Úpytest)Úreap_children)Úretry_on_failure)Úskip_on_access_denied)Útcp_socketpair)Úunix_socketpair)Úwait_for_fileÚSOCK_SEQPACKETc                 ót   € \         P                  ! 4       P                  V R 7      pV R9   d   \        V4      # V# )©Úkind>   ÚallÚunix)ÚpsutilÚProcessÚnet_connectionsr   )r#   Úconss   & Ú?/usr/lib/python3/dist-packages/psutil/tests/test_connections.pyÚthis_proc_net_connectionsr+   0   s4   € Ü�>Š>Ó×+Ñ+°Ð+Ó6€DØˆÔÜ*¨4Ó0Ð0Ø€Kó    Úserial)Únamec                   ó6   a € ] tR t^7t o R tR tRR ltRtV tR# )ÚConnectionTestCasec                ó,   € \        R R7      . 8X  g   Q hR# ©r$   r"   N©r+   ©Úselfs   &r*   ÚsetUpÚConnectionTestCase.setUp9   s   € Ü(¨eÔ4¸Ô:Ð:Ò:r,   c                ó,   € \        R R7      . 8X  g   Q hR# r2   r3   r4   s   &r*   ÚtearDownÚConnectionTestCase.tearDown<   s   € ä(¨eÔ4¸Ô:Ð:Ò:r,   c                ó.  €  \         P                  ! VR7      pT Uu. uF  qUP                  T8X  g   K  TRR NK  	  ppTP                  4        TP                  4        Y$8X  g   Q hR#   \         P                   d    \        '       d    R# h i ; iu upi )z„Given a process PID and its list of connections compare
those against system-wide connections retrieved via
psutil.net_connections.
r"   Néÿÿÿÿ)r&   r(   ÚAccessDeniedr	   ÚpidÚsort)r5   r>   Ú	proc_consr#   Úsys_consÚcs   &&&&  r*   Úcompare_procsys_connectionsÚ.ConnectionTestCase.compare_procsys_connections@   s„   € ð
	Ü×-Ò-°4Ô8ˆHñ %-Ó=¡H˜q·±¸±”F�A�c�r“F¡HˆÐ=Ø�‰ŒØ�‰ÔØÔ$Ð$Ò$øô ×"Ñ"ô 	÷ ‹uÚàð	üò >s   ‚A) �B´	BÁ) BÂB© N)r$   )	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r6   r9   rC   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r*   r0   r0   7   s   ø‡ € ò;ò;÷%ò %r,   r0   c                   ór   a € ] tR t^Ut o ]P
                  P                  ]RR7      R 4       tR t	R t
RtV tR# )ÚTestBasicOperationsúrequires root©Úreasonc                ó¶   € \        4       ;_uu_ 4        \        P                  ! R R7       F  p\        V4       K  	  RRR4       R#   + '       g   i     R# ; ir2   )r   r&   r(   r   ©r5   Úconns   & r*   Útest_systemÚTestBasicOperations.test_systemV   s7   € ä×ÕÜ×.Ò.°E×:�Ü'¨Ö-ñ ;÷ ××Òús   “*AÁA	c                ó    € \        4       ;_uu_ 4        \        R R7       F  p\        V4       K  	  RRR4       R#   + '       g   i     R# ; ir2   )r   r+   r   rT   s   & r*   Útest_processÚ TestBasicOperations.test_process\   s1   € Ü×ÕÜ1°u×=�Ü'¨Ö-ñ >÷ ××Òús	   “<¼A	c                óF  € \         P                  ! \        4      ;_uu_ 4        \        R R7       RRR4       \         P                  ! \        4      ;_uu_ 4        \        P
                  ! R R7       RRR4       R#   + '       g   i     LT; i  + '       g   i     R# ; i)z???r"   N)r   ÚraisesÚ
ValueErrorr+   r&   r(   r4   s   &r*   Útest_invalid_kindÚ%TestBasicOperations.test_invalid_kinda   sV   € Ü�]Š]œ:×&Õ&Ü%¨5Õ1÷ 'ä�]Š]œ:×&Õ&Ü×"Ò"¨Õ.÷ 'Ñ&÷ '×&úç&×&Ð&ús   £A<ÁBÁ<B	ÂB 	rE   N)rF   rG   rH   rI   r   ÚmarkÚskipifr   rV   rY   r^   rJ   rK   rL   s   @r*   rO   rO   U   s:   ø‡ € Ø‡[�[×Ñ˜¨_ÐÓ=ñ.ó >ð.ò
.÷
/ð /r,   rO   c                   ó�  a € ] tR t^ht o RtR tR tR t]P                  P                  ]! 4       '       * RR7      R 4       tR t]P                  P                  ]! 4       '       * RR7      R	 4       t]P                  P                  ]'       * R
R7      R 4       t]P                  P                  ]'       * R
R7      R 4       tRtV tR# )ÚTestUnconnectedSocketsz;Tests sockets which are open but not connected to anything.c                ó†  € \        R R7      pV Uu/ uF  q3P                  VbK  	  pp\        '       g   \        '       d   WAP	                  4       ,          # \        V4      ^8X  g   Q hV^ ,          P                  R8w  d6   WAP	                  4       ,          P                  VP	                  4       8X  g   Q hV^ ,          # u upi )r$   r"   r<   )r+   Úfdr
   r   ÚfilenoÚlen)r5   Úsockr)   rB   Úsmaps   &&   r*   Úget_conn_from_sockÚ)TestUnconnectedSockets.get_conn_from_sockl   s‘   € Ü(¨eÔ4ˆÙ!%Ó&¡˜A—‘�a’¡ˆÐ&ß‹6—W“Wð Ÿ™›Õ&Ð&ä�t“9 ”>Ð!�>Ø�A�w�z‰z˜RÔØŸK™K›MÕ*×-Ñ-°·±³Ô>Ð>Ð>Ø˜•7ˆNùò 's   ‘B>c                óà  € V P                  V4      p\        V4       VP                  R8w  d"   VP                  VP                  4       8X  g   Q hVP                  VP                  8X  g   Q hVP
                  VP                  \        P                  \        P                  4      8X  g   Q hVP                  4       pV'       g'   \        V\        4      '       d   VP                  4       pVP                  \        8X  d
   VR,          pVP                  V8X  g   Q hVP                  \         8X  d@   \"        '       d4   \%        RR7      pV P'                  \(        P*                  ! 4       VRR7       V# )z™Given a socket, makes sure it matches the one obtained
via psutil. It assumes this process created one connection
only (the one supposed to be checked).
:Né   Nr$   r"   r<   )rj   r   re   rf   ÚfamilyÚtypeÚ
getsockoptÚsocketÚ
SOL_SOCKETÚSO_TYPEÚgetsocknameÚ
isinstanceÚbytesÚdecoder   Úladdrr   r   r+   rC   ÚosÚgetpid)r5   rh   rU   rx   r)   s   &&   r*   Úcheck_socketÚ#TestUnconnectedSockets.check_sockety   s  € ð
 ×&Ñ& tÓ,ˆÜ Ô%ð �7‰7�bŒ=Ø—7‘7˜dŸk™k›mÔ+Ð+Ð+Ø�{‰{˜dŸk™kÔ)Ð)Ð)à�y‰y˜DŸO™O¬F×,=Ñ,=¼v¿~¹~ÓNÔNÐNÐNð × Ñ Ó"ˆßœ E¬5×1Ò1à—L‘L“NˆEØ�;‰;œ(Ô"Ø˜"•IˆEØ�z‰z˜UÔ"Ð"Ð"ð �;‰;œ'Ô!×&>Ó&>Ü,°%Ô8ˆDØ×,Ñ,¬R¯YªY«[¸$ÀUÐ,ÔKØˆr,   c                ó  € Rp\        \        \        \        VR7      4      ;_uu_ 4       pV P	                  V4      pVP
                  R8X  g   Q hVP                  \        P                  8X  g   Q h RRR4       R#   + '       g   i     R# ; i©ú	127.0.0.1©ÚaddrN©r   é    rE   )	r   r   r   r   r{   ÚraddrÚstatusr&   ÚCONN_LISTEN©r5   r�   rh   rU   s   &   r*   Útest_tcp_v4Ú"TestUnconnectedSockets.test_tcp_v4—   sg   € ØˆÜ”[¤¬+¸DÔA×BÔBÀdØ×$Ñ$ TÓ*ˆDØ—:‘: Ô#Ð#Ð#Ø—;‘;¤&×"4Ñ"4Ô4Ð4Ñ4÷ C×B×BÒBúó   ªAA;Á;B	zIPv6 not supportedrQ   c                ó  € Rp\        \        \        \        VR7      4      ;_uu_ 4       pV P	                  V4      pVP
                  R8X  g   Q hVP                  \        P                  8X  g   Q h RRR4       R#   + '       g   i     R# ; i©ú::1r€   N)r�   rƒ   rE   )	r   r   r   r   r{   r„   r…   r&   r†   r‡   s   &   r*   Útest_tcp_v6Ú"TestUnconnectedSockets.test_tcp_v6ž   sg   € àˆÜ”[¤¬;¸TÔB×CÔCÀtØ×$Ñ$ TÓ*ˆDØ—:‘: Ô#Ð#Ð#Ø—;‘;¤&×"4Ñ"4Ô4Ð4Ñ4÷ D×C×CÒCúrŠ   c                ó  € Rp\        \        \        \        VR7      4      ;_uu_ 4       pV P	                  V4      pVP
                  R8X  g   Q hVP                  \        P                  8X  g   Q h RRR4       R#   + '       g   i     R# ; ir~   )	r   r   r   r   r{   r„   r…   r&   Ú	CONN_NONEr‡   s   &   r*   Útest_udp_v4Ú"TestUnconnectedSockets.test_udp_v4¦   sg   € ØˆÜ”[¤¬*¸4Ô@×AÔAÀTØ×$Ñ$ TÓ*ˆDØ—:‘: Ô#Ð#Ð#Ø—;‘;¤&×"2Ñ"2Ô2Ð2Ñ2÷ B×A×AÒAúrŠ   c                ó  € Rp\        \        \        \        VR7      4      ;_uu_ 4       pV P	                  V4      pVP
                  R8X  g   Q hVP                  \        P                  8X  g   Q h RRR4       R#   + '       g   i     R# ; irŒ   )	r   r   r   r   r{   r„   r…   r&   r‘   r‡   s   &   r*   Útest_udp_v6Ú"TestUnconnectedSockets.test_udp_v6­   sg   € àˆÜ”[¤¬:¸DÔA×BÔBÀdØ×$Ñ$ TÓ*ˆDØ—:‘: Ô#Ð#Ð#Ø—;‘;¤&×"2Ñ"2Ô2Ð2Ñ2÷ C×B×BÒBúrŠ   ú
POSIX onlyc                ó0  € V P                  4       p\        \        V\        R 7      4      ;_uu_ 4       pV P	                  V4      pVP
                  R8X  g   Q hVP                  \        P                  8X  g   Q h RRR4       R#   + '       g   i     R# ; i©)ro   Ú N©	Ú
get_testfnr   r   r   r{   r„   r…   r&   r‘   ©r5   Útestfnrh   rU   s   &   r*   Útest_unix_tcpÚ$TestUnconnectedSockets.test_unix_tcpµ   óm   € à—‘Ó"ˆÜÔ% f´;Ô?×@Ô@ÀDØ×$Ñ$ TÓ*ˆDØ—:‘: Ô#Ð#Ð#Ø—;‘;¤&×"2Ñ"2Ô2Ð2Ñ2÷ A×@×@Ò@úó   ³ABÂB	c                ó0  € V P                  4       p\        \        V\        R 7      4      ;_uu_ 4       pV P	                  V4      pVP
                  R8X  g   Q hVP                  \        P                  8X  g   Q h RRR4       R#   + '       g   i     R# ; ir™   r›   r�   s   &   r*   Útest_unix_udpÚ$TestUnconnectedSockets.test_unix_udp½   r¡   r¢   rE   N)rF   rG   rH   rI   Ú__doc__rj   r{   rˆ   r   r`   ra   r   rŽ   r’   r•   r   rŸ   r¤   rJ   rK   rL   s   @r*   rc   rc   h   sÎ   ø‡ € áEòòò<5ð ‡[�[×Ñ™M›OÔ+Ð4HÐÓIñ5ó Jð5ò3ð ‡[�[×Ñ™M›OÔ+Ð4HÐÓIñ3ó Jð3ð ‡[�[×Ñ˜Eœ	¨,ÐÓ7ñ3ó 8ð3ð ‡[�[×Ñ˜Eœ	¨,ÐÓ7ñ3ó 8ö3r,   rc   c                   óº   a € ] tR t^Æt o Rt]P                  P                  ]RR7      R 4       t	]P                  P                  ]
'       * RR7      R 4       tRtV tR# )	ÚTestConnectedSocketz>Test socket pairs which are actually connected to
each other.
zunreliable on SUNOSrQ   c                óÀ  € Rp\        RR7      . 8X  g   Q h\        \        VR7      w  r# \        RR7      p\        V4      ^8X  g   Q hV^ ,          P                  \
        P                  8X  g   Q hV^,          P                  \
        P                  8X  g   Q h VP                  4        VP                  4        R#   TP                  4        TP                  4        i ; i)r   Útcp4r"   r€   Nr‚   )r+   r   r   rg   r…   r&   ÚCONN_ESTABLISHEDÚclose)r5   r�   ÚserverÚclientr)   s   &    r*   Útest_tcpÚTestConnectedSocket.test_tcpÎ   s©   € àˆÜ(¨fÔ5¸Ô;Ð;Ð;Ü'¬°dÔ;‰ˆð	Ü,°&Ô9ˆDÜ�t“9 ”>Ð!�>Ø˜•7—>‘>¤V×%<Ñ%<Ô<Ð<Ð<Ø˜•7—>‘>¤V×%<Ñ%<Ô<Ð<Ñ<ð �L‰LŒNØ�L‰LŽNøð �L‰LŒNØ�L‰L�Nús   ªA.B; Â;"Cr—   c                ó  € V P                  4       p\        V4      w  r# \        R R7      pV^ ,          P                  '       d!   V^ ,          P                  '       d   Q V4       hV^,          P                  '       d!   V^,          P                  '       d   Q V4       h\
        '       g   \        '       d$   V Uu. uF  qUP                  R8w  g   K  VNK  	  pp\        V4      ^8X  g   Q h\        '       g%   \        '       g   \        '       g   \        '       dj   V^ ,          P                  R8X  g   Q hV^,          P                  R8X  g   Q hY^ ,          P                  ;'       g    V^,          P                  8X  g   Q hM5V^ ,          P                  ;'       g    V^,          P                  V8X  g   Q hVP                  4        VP                  4        R# u upi   TP                  4        TP                  4        i ; i)r%   r"   z/var/run/logrš   N)rœ   r   r+   rx   r„   r
   r   rg   r   r   r   r¬   )r5   rž   r­   r®   r)   rB   s   &     r*   Ú	test_unixÚTestConnectedSocket.test_unixâ   sb  € à—‘Ó"ˆÜ(¨Ó0‰ˆð	Ü,°&Ô9ˆDØ˜Q�ŸŸ˜¨$¨q­'¯-¯-¨-Ð>¸$Ó>Ð8Ø˜Q�ŸŸ˜¨$¨q­'¯-¯-¨-Ð>¸$Ó>Ð8ß‹vŸ›ñ $(ÓE¡4˜a¯7©7°nÑ+DŸ˜¡4�ÐEÜ�t“9 ”>Ð!�>ß‹uŸ›§5£5¯G«Gà˜A•w—}‘}¨Ô*Ð*Ð*Ø˜A•w—}‘}¨Ô*Ð*Ð*à q¥'§-¡-×"@Ð"@°4¸µ7·=±=ÔAÐAÑAð ˜Q�Ÿ™×6Ð6¨¨a­¯©¸6ÔAÐAÐAà�L‰LŒNØ�L‰LŽNùò Føð �L‰LŒNØ�L‰L�Núsf   Ÿ=G ÁG Á=G ÂG Â)G Â5G Â9GÃGÃG Ã6G ÄG ÄG ÄAG Å(4G ÆG ÇG Ç"HrE   N)rF   rG   rH   rI   r¦   r   r`   ra   r   r¯   r   r²   rJ   rK   rL   s   @r*   r¨   r¨   Æ   s]   ø‡ € ñð ‡[�[×Ñ˜Ð&;ÐÓ<ñó =ðð& ‡[�[×Ñ˜Eœ	¨,ÐÓ7ñó 8ör,   r¨   c                   óJ   a € ] tR t^þt o R t]! ]R7      R 4       tR tRt	V t
R# )ÚTestFiltersc           	     ó€  € R  p\        4       ;_uu_ 4        V! R\        \        \        .\        \
        \        .4       V! R\        \        .\        \
        .4       V! R\        .\        \
        .4       V! R\        \        .\        .4       V! R\        .\        .4       V! R\        .\        .4       V! R\        \        .\
        .4       V! R\        .\
        .4       V! R	\        .\
        .4       \        '       d   V! R
\        .\        \
        \        .4       RRR4       R#   + '       g   i     R# ; i)c                 ó  € \        V R 7       F)  pVP                  V9   g   Q hVP                  V9   d   K)  Q h	  \        '       gG   \        P
                  ! V R 7       F)  pVP                  V9   g   Q hVP                  V9   d   K)  Q h	  R# R# )r"   N)r+   rn   ro   r   r&   r(   )r#   ÚfamiliesÚtypesrU   s   &&& r*   ÚcheckÚ'TestFilters.test_filters.<locals>.check   sz   € Ü1°t×<�Ø—{‘{ hÔ.Ð.Ð.Ø—y‘y EÖ)Ð)Ð)ñ =÷  “<Ü"×2Ò2¸×=�DØŸ;™;¨(Ô2Ð2Ð2ØŸ9™9¨Ö-Ð-Ð-ó >ñ  r,   r$   ÚinetÚinet4Útcprª   Útcp6ÚudpÚudp4Úudp6r%   N)r   r   r   r   r   r   r    r   )r5   rº   s   & r*   Útest_filtersÚTestFilters.test_filtersÿ   sñ   € ò	.ô ×ÕÙØÜœ(¤GÐ,Üœj¬.Ð9ôñ
 �&œ7¤HÐ-´¼ZÐ/HÔIÙ�'œG˜9¤{´JÐ&?Ô@Ù�%œ'¤8Ð,¬{¨mÔ<Ù�&œ7˜)¤k ]Ô3Ù�&œ8˜*¤{ mÔ4Ù�%œ'¤8Ð,¬z¨lÔ;Ù�&œ7˜)¤j \Ô2Ù�&œ8˜*¤z lÔ3ß'Ó'ÙØÜ�IÜ ¤*¬nÐ=ô÷ ××Òús   –DD,Ä,D=	)Úonly_ifc                ó<  a € \        4        V 3R  lp\        P                  ! R4      p\        P                  ! R4      p\        P                  P                  S P                  \        P                  ! 4       R7      4      pVP                  \        \        4      RVR7      pVP                  \        \        4      RVR7      pVP                  \        \        4      RVR7      pVP                  \        \        4      RVR7      pS P                  V4      p	\        \        VRR7      4      p
S P                  V4      p\        \        VRR7      4      p\        4       '       dP   S P                  V4      p\        \        VRR7      4      pS P                  V4      p\        \        VRR7      4      pMR	pR	pR	pR	p\         P"                  ! 4       P%                  4        EF;  pVP'                  4       p\)        V4      ^8X  g   Q hV EF  pVP*                  V	P*                  8X  d(   V! VV\        \,        V
R\         P.                  R4       KF  VP*                  VP*                  8X  d(   V! VV\        \0        VR\         P2                  R4       Kˆ  VP*                  \5        VR
R	4      8X  d(   V! VV\        \,        VR\         P.                  R4       KË  VP*                  \5        VR
R	4      8X  g   Ké  V! VV\        \0        VR\         P2                  R4       EK  	  EK>  	  R	# )c                 ó   <€ Rp\        V4       VP                  V8X  g   Q hVP                  V8X  g   Q hVP                  V8X  g   Q hVP                  V8X  g   Q hVP
                  V8X  g   Q hV F/  p	V P                  V	R7      p
W—9   d   V
. 8w  g   Q hK&  V
. 8X  d   K/  Q h	  \        '       d    SP                  V P                  V.4       R# R# )r$   r"   N)
r$   r¼   r½   Úinet6r¾   rª   r¿   rÀ   rÁ   rÂ   )
r   rn   ro   rx   r„   r…   r(   r   rC   r>   )ÚprocrU   rn   ro   rx   r„   r…   ÚkindsÚ	all_kindsr#   r)   r5   s   &&&&&&&&   €r*   Ú
check_connÚ+TestFilters.test_combos.<locals>.check_conn"  sË   ø€ ðˆIô $ DÔ)Ø—;‘; &Ô(Ð(Ð(Ø—9‘9 Ô$Ð$Ð$Ø—:‘: Ô&Ð&Ð&Ø—:‘: Ô&Ð&Ð&Ø—;‘; &Ô(Ð(Ð(Û!�Ø×+Ñ+°Ð+Ó6�Ø”=Ø 2œ:Ð%š:à 2ž:Ð%˜:ñ "÷ (Ó'Ø×0Ñ0°·±¸D¸6ÖBñ (r,   a4  
            import socket, time
            s = socket.socket({family}, socket.SOCK_STREAM)
            s.bind(('{addr}', 0))
            s.listen(5)
            with open('{testfn}', 'w') as f:
                f.write(str(s.getsockname()[:2]))
            [time.sleep(0.1) for x in range(100)]
            a  
            import socket, time
            s = socket.socket({family}, socket.SOCK_DGRAM)
            s.bind(('{addr}', 0))
            with open('{testfn}', 'w') as f:
                f.write(str(s.getsockname()[:2]))
            [time.sleep(0.1) for x in range(100)]
            )Údirr   )rn   r�   rž   r�   T)ÚdeleteNr>   rE   )r$   r¼   r½   r¾   rª   )r$   r¼   r½   rÀ   rÁ   )r$   r¼   rÈ   r¾   r¿   )r$   r¼   rÈ   rÀ   rÂ   )r   ÚtextwrapÚdedentry   ÚpathÚbasenamerœ   ÚgetcwdÚformatÚintr   r   ÚpyrunÚevalr   r   r&   r'   Úchildrenr(   rg   r>   r   r†   r   r‘   Úgetattr)r5   rÌ   Útcp_templateÚudp_templateÚtestfileÚtcp4_templateÚudp4_templateÚtcp6_templateÚudp6_templateÚ	tcp4_procÚ	tcp4_addrÚ	udp4_procÚ	udp4_addrÚ	tcp6_procÚ	tcp6_addrÚ	udp6_procÚ	udp6_addrÚpr)   rU   s   f                   r*   Útest_combosÚTestFilters.test_combos  s©  ø€ äŒõ	Cô>  —’ð (ó ˆô  —’ð (ó ˆô —7‘7×#Ñ# D§O¡O¼¿	º	» OÓ$DÓEˆØ$×+Ñ+Ü”w“< k¸(ð ,ó 
ˆð %×+Ñ+Ü”w“< k¸(ð ,ó 
ˆð %×+Ñ+Ü”x“= u°Xð ,ó 
ˆð %×+Ñ+Ü”x“= u°Xð ,ó 
ˆð —J‘J˜}Ó-ˆ	Üœ x¸Ô=Ó>ˆ	Ø—J‘J˜}Ó-ˆ	Üœ x¸Ô=Ó>ˆ	Ü�?Š?ØŸ
™
 =Ó1ˆIÜœ]¨8¸DÔAÓBˆIØŸ
™
 =Ó1ˆIÜœ]¨8¸DÔAÓB‰IàˆIØˆIØˆIØˆIä—’Ó!×*Ñ*×,ˆAØ×$Ñ$Ó&ˆDÜ�t“9 ”>Ð!�>Ü�à—5‘5˜IŸM™MÔ)ÙØØÜÜ#Ø!ØÜ×*Ñ*Ø?ö	ð —U‘U˜iŸm™mÔ+ÙØØÜÜ"Ø!ØÜ×(Ñ(Ø?ö	ð —U‘Uœg i°¸Ó=Ô=ÙØØÜ Ü#Ø!ØÜ×*Ñ*Ø?ö	ð —U‘Uœg i°¸Ó=Ö=ÙØØÜ Ü"Ø!ØÜ×(Ñ(Ø?÷	ôO ó -r,   c                óâ  € \        4       ;_uu_ 4        \        R R7      p\        V4      \        4       '       d   ^M^8X  g   Q hV F7  pVP                  \
        \        09   g   Q hVP                  \        8X  d   K7  Q h	  \        RR7      p\        V4      ^8X  g   Q hV^ ,          P                  \
        8X  g   Q hV^ ,          P                  \        8X  g   Q h\        4       '       d[   \        RR7      p\        V4      ^8X  g   Q hV^ ,          P                  \        8X  g   Q hV^ ,          P                  \        8X  g   Q h\        RR7      p\        V4      \        4       '       d   ^M^8X  g   Q hV F7  pVP                  \
        \        09   g   Q hVP                  \        8X  d   K7  Q h	  \        RR7      p\        V4      ^8X  g   Q hV^ ,          P                  \
        8X  g   Q hV^ ,          P                  \        8X  g   Q h\        4       '       d[   \        RR7      p\        V4      ^8X  g   Q hV^ ,          P                  \        8X  g   Q hV^ ,          P                  \        8X  g   Q h\        RR7      p\        V4      \        4       '       d   ^M^8X  g   Q hV F=  pVP                  \
        \        09   g   Q hVP                  \        \        09   d   K=  Q h	  \        4       '       d\   \        RR7      p\        V4      ^8X  g   Q hV F7  pVP                  \        8X  g   Q hVP                  \        \        09   d   K7  Q h	  \        '       dt   \        '       gh   \        '       g\   \        R	R7      p\        V4      ^8X  g   Q hV F7  pVP                  \        8X  g   Q hVP                  \        \        09   d   K7  Q h	  R
R
R
4       R
#   + '       g   i     R
# ; i)r¾   r"   rª   r¿   rÀ   rÁ   rÂ   r¼   rÈ   r%   N)r   r+   rg   r   rn   r   r   ro   r   r   r   r   r
   r   )r5   r)   rU   s   &  r*   Ú
test_countÚTestFilters.test_count©  s  € Ü×Õä,°%Ô8ˆDÜ�t“9¤m§o¢o¡¸1Ô=Ð=Ð=Û�Ø—{‘{¤w´Ð&9Ô9Ð9Ð9Ø—y‘y¤KÖ/Ð/Ð/ñ ô -°&Ô9ˆDÜ�t“9 ”>Ð!�>Ø˜•7—>‘>¤WÔ,Ð,Ð,Ø˜•7—<‘<¤;Ô.Ð.Ð.ä�ŠÜ0°fÔ=�Ü˜4“y A”~Ð%�~Ø˜A•w—~‘~¬Ô1Ð1Ð1Ø˜A•w—|‘|¤{Ô2Ð2Ð2ä,°%Ô8ˆDÜ�t“9¤m§o¢o¡¸1Ô=Ð=Ð=Û�Ø—{‘{¤w´Ð&9Ô9Ð9Ð9Ø—y‘y¤JÖ.Ð.Ð.ñ ô -°&Ô9ˆDÜ�t“9 ”>Ð!�>Ø˜•7—>‘>¤WÔ,Ð,Ð,Ø˜•7—<‘<¤:Ô-Ð-Ð-ä�ŠÜ0°fÔ=�Ü˜4“y A”~Ð%�~Ø˜A•w—~‘~¬Ô1Ð1Ð1Ø˜A•w—|‘|¤zÔ1Ð1Ð1ä,°&Ô9ˆDÜ�t“9¤m§o¢o¡¸1Ô=Ð=Ð=Û�Ø—{‘{¤w´Ð&9Ô9Ð9Ð9Ø—y‘y¤[´*Ð$=Ö=Ð=Ð=ñ ô �ŠÜ0°gÔ>�Ü˜4“y A”~Ð%�~Û �DØŸ;™;¬(Ô2Ð2Ð2ØŸ9™9¬´jÐ(AÖAÐAÐAñ !÷
 (Ó'·³¿F»FÜ0°fÔ=�Ü˜4“y A”~Ð%�~Û �DØŸ;™;¬'Ô1Ð1Ð1ØŸ9™9¬´jÐ(AÖAÐAÐAñ !÷k ××Òús@   “A%OÁ=D,OÆ.D2OË%A&OÍOÍ OÍ,OÍ8AOÏOÏO.	rE   N)rF   rG   rH   rI   rÃ   r   r	   rë   rî   rJ   rK   rL   s   @r*   rµ   rµ   þ   s2   ø‡ € òñ>  5Ô)ñHó *ðH÷T8Bð 8Br,   rµ   rP   rQ   c                   óD   a € ] tR tRt o RtR t]! 4       R 4       tRtV t	R# )ÚTestSystemWideConnectionsiä  zTests for net_connections().c           	     ó`  € R  p\        4       ;_uu_ 4        ^ RIHp VP                  4        Fa  w  r4VR8X  d   \        '       g   K  Vw  rV\
        P                  ! V4      p\        V4      \        \        V4      4      8X  g   Q hV! WuV4       Kc  	  RRR4       R#   + '       g   i     R# ; i)c                 ó¤   € V  FI  pVP                   V9   g   Q hVP                   \        8w  d   VP                  V9   g   Q h\        V4       KK  	  R # )N)rn   r   ro   r   )r)   r¸   Útypes_rU   s   &&& r*   rº   Ú0TestSystemWideConnections.test_it.<locals>.checké  sD   € Û�Ø—{‘{ hÔ.Ð.Ð.Ø—;‘;¤'Ô)ØŸ9™9¨Ô.Ð.Ð.Ü'¨Ö-ó	 r,   )Ú	conn_tmapr%   N)	r   Úpsutil._commonrö   Úitemsr   r&   r(   rg   Úset)r5   rº   rö   r#   Úgroupsr¸   rô   r)   s   &       r*   Útest_itÚ!TestSystemWideConnections.test_itè  sƒ   € ò	.ô ×ÕÝ0à )§¡Ö 1‘�à˜6”>×*BÓ*BÙØ#)Ñ �Ü×-Ò-¨dÓ3�Ü˜4“y¤C¬¨D«	£NÔ2Ð2Ð2Ù�d fÖ-ñ !2÷ ××Òús   –.BÁABÂB-	c                ó  € \        4       ;_uu_ 4       p\        V4      pR R R 4       . p^
p. p\        V4       Fj  pV P                  4       pVP	                  V4       \
        P                  ! RV R24      pV P                  V4      p	VP	                  V	P                  4       Kl  	  V F  p\        V4       K  	  \        P                  ! RR7       U
u. uF  qªP                  V9   g   K  V
NK  	  pp
V Fn  p\        V U
u. uF  qªP                  V8X  g   K  V
NK  	  up
4      X8X  g   Q h\        P                  ! V4      p\        VP                  R4      4      V8X  d   Kn  Q h	  R #   + '       g   i     ELR; iu up
i u up
i )NzŸ                import time, os
                from psutil.tests import create_sockets
                with create_sockets():
                    with open(r'z�', 'w') as f:
                        f.write("hello")
                    [time.sleep(0.1) for x in range(100)]
                r$   r"   )r   rg   Úrangerœ   ÚappendrÐ   rÑ   r×   r>   r   r&   r(   r'   )r5   ÚsocksÚexpectedÚpidsÚtimesÚfnamesÚ_ÚfnameÚsrcÚsprocÚxÚsysconsr>   rê   s   &             r*   Útest_multi_sockets_procsÚ2TestSystemWideConnections.test_multi_sockets_procsü  sV  € ô ×Ô Ü˜5“zˆH÷ àˆØˆØˆÜ�u–ˆAØ—O‘OÓ%ˆEØ�M‰M˜%Ô Ü—/’/ð '!ð "' ð (ð	#ó ˆCð —J‘J˜s“OˆEØ�K‰K˜Ÿ	™	Ö"ñ ó ˆEÜ˜%Ö ñ ô ×-Ò-°5Õ9ó
Ù9�!¿U¹UÀd¹]�AˆAÑ9ð 	ð 
ó ˆCÜ¡7Ó;¡7˜a¯e©e°s©lŸ˜¡7Ñ;Ó<ÀÔHÐHÐHÜ—’˜sÓ#ˆAÜ�q×(Ñ(¨Ó/Ó0°HÖ<Ð<Ð<ó ÷5 ×Ðüò.
ùò <s#   “E(ÃE<Ã*E<Ä F
ÄF
Å(E9	rE   N)
rF   rG   rH   rI   r¦   rû   r   r  rJ   rK   rL   s   @r*   rñ   rñ   ä  s$   ø‡ € á&ò.ñ( Óñ$=ó ö$=r,   rñ   c                   ó&   a € ] tR tRt o R tRtV tR# )ÚTestMisci$  c                óÞ  € . p. p\        \        4       F‹  pVP                  R 4      '       g   K  \        \        V4      p\	        V4      pVP                  4       '       g   Q V4       h\        V9  g   Q hWA9  g   Q hVP                  V4       VP                  V4       K�  	  \        '       d!   \        P                   \        P                   \        '       d   \        P                   R# R# )ÚCONN_N)rÎ   r&   Ú
startswithrÚ   ÚstrÚisupperrÿ   r   Ú	CONN_IDLEÚ
CONN_BOUNDr   ÚCONN_DELETE_TCB)r5   ÚintsÚstrsr.   ÚnumÚstr_s   &     r*   Útest_net_connection_constantsÚ&TestMisc.test_net_connection_constants%  s­   € ØˆØˆÜœ–KˆDØ�‰˜w×'Ô'Üœf dÓ+�Ü˜3“x�Ø—|‘|—~’~Ð+ tÓ+�~Ü $”Ð&�Ø”Ð&�Ø—‘˜CÔ Ø—‘˜DÖ!ñ  ÷ ‹5Ü×ÒÜ×Òß‹7Ü×"Ô"ñ r,   rE   N)rF   rG   rH   rI   r  rJ   rK   rL   s   @r*   r  r  $  s   ø‡ € ÷#ð #r,   r  )4r¦   ry   rq   rÐ   Ú
contextlibr   r   r   r   r   r&   r   r   r	   r
   r   r   r   r   r÷   r   Úpsutil.testsr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rÚ   Úobjectr    r+   r`   Úxdist_groupr0   rO   rc   r¨   rµ   ra   rñ   r  rE   r,   r*   Ú<module>r!     sq  ðñ Mã 	Û Û Ý Ý Ý Ý Ý ã Ý Ý Ý Ý Ý Ý Ý Ý Ý (Ý  Ý 1Ý %Ý 'Ý $Ý )Ý 0Ý 'Ý 4Ý Ý &Ý )Ý .Ý 'Ý (Ý &á˜Ð!1±6³8Ó<€òð ‡�×Ñ˜hÐÓ'ô%˜ó %ó (ð%ô:/Ð,ô /ð& ‡�×Ñ˜hÐÓ'ôZ3Ð/ó Z3ó (ðZ3ðz ‡�×Ñ˜hÐÓ'ô4Ð,ó 4ó (ð4ôncBÐ$ô cBðL ‡�×Ñ�L¨ÐÓ9ô<=Ð 2ó <=ó :ð<=ô~#ˆ~ö #r,   