403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.188
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/test/test_os/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/test_os/__pycache__/test_posix.cpython-315.pyc
R
>lqj�c���Qs]QHGs]QHGs]QHGs]QHGs]QHGs]PH$s	]PH(s
]PH,s]PH0s]PH4s
]PH8s]PH<s]PH@s]PHDs]PHHs]PHLs]PHPs]PHTs]QHXGs]PHbs]PHns\O8O;\O<2\O>Q*2s \OB\ODQ#69%c&\OF9%f
\OH%(Q2s%Q	s&\OB\&2Q
2s'QQ\OP2s)Q
Q\OP2s*QQ\OP2s+QQ2s,\OB\-\Q2Q2\O\2QQ\OP\,222s/\OB\-\Q2Q2\O\2QQ\OP\,222s0\OB\OQ6HQ2QQ\OP22s1QQ \OP2s2Q!s3\4Q"6Xc\Oj2P!P!\c	]PHjsCK�h9h\cPsCKh9h)$zTest posix functions)�support)�is_apple)�	os_helper)�warnings_helper��assert_python_ok)�contextmanagerz-dummy-symlinkz(test is only meaningful on 32-bit buildsc��[[Q2%fP
![O]2P	![cAoSO[O
[O17cPo=P
!Po=P	!Po=hh9h)�sched_getscheduler)�hasattr�posixr	�OSError�errno�ENOSYS�EPERM)�es �,C:\Python315\\Lib\test\test_os\test_posix.py�_supports_schedr+sa���5�.�/�/���
� � ��#�
��	���7�7�u�|�|�U�[�[�1�1��2���	�s�3�	A>�A>�.A9�9A>zrequires POSIX scheduler APIc��`�\sQs]9snQsQs\O\\	Q2Q2Q2s
\O\\	Q2Q2Q2s\O\\	Q	2Q
2Q2s\O\\	Q	2Q
2Q2s
\O\\	Q
2Q2Q2s\O\\	Q
2Q2Q2s\O\\	Q2Q2\O\\Q2Q2Q22s\O\\	Q2Q2Q2s\O\\	Q2Q2Q2s\O\\	Q2Q2Q2s\O\\	Q2Q 2Q!2s\O\\Q"P2\O07Q#2\O42Q$22s\O\\	Q%2Q&2\O42Q'22s\O42Q(2s\O\\	Q)2Q*2Q+2s\O\\	Q,2Q-2Q.2s\O\\	Q/2Q02Q12s \O\\	Q/2Q02\O\\	Q22Q32Q422s!\O\\	Q/2Q02\"Q522s#\O\\	Q62Q72Q82s$\O\\	Q92Q:2Q;2s%\O\\	Q92Q:2\O\\	Q<2Q=2Q>22s&\O\\	Q92Q:2\"Q?22s'\O\\	Q@2QA2QB2s(\O\\	Q@2QA2QC2s)\O\\	QD2QE2QF2s*\O\\	QD2QE2QG2s+\O\OX\O07QH2QI2s-\O\OX\O\7QJ2QK2s/\O\\	QL2QM2QN2s0\O\\	QL2QM2\"QO22s1\O\\	QP2QQ2QR2s2\O\\	QP2QQ2\"QS22s3\O\\	QT2QU2\Oh\OjQV2QW22s6\O\\	QX2QY2QZ2s7\O\\	Q[2Q\2Q]2s8\O\\	Q^2Q_2\Oh\OjQ`2Qa22s9\O\\Qb2Qc2\Ot]]]2\Ov2Qd222s<\O\\	Qe2Qf2Qg2s=\O\\	Qh2Qi2Qj2s>\O\\	Qk2Ql2Qm2s?\O\\	Qn2Qo2\O\O�\O\7Qp2Qq22sAQrsBQssC\O\\	Qt2Qu2Qv2sD\O\\	Qt2Qu2Qw2sE\O\\	Qx2Qy2Qz2sF\O\\	Q{29%c
\\@Q|2Q}2Q~2sG\O\\	Q2Q�2Q�2sHQ�sIQ�sJ\O\\Q�2Q�2\Oh\O�Q�2Q�22sL\MO�\O\\	Q�2Q�2\Oh\O�Q�2Q�222sO\MO�\O\\	Q�2Q�2Q�22sP\O\\	Q�2Q�2Q�2sQQ�sRQ�sSQ�sTQ�sU\O\	O�\O07Q�2Q�2sW\O\\	Q�2Q�2Q�2sX\O\\	Q�2Q�2Q�2sY\O\\	Q�2Q�2Q�2sZ\O\\	Q�2Q�2Q�2s[\O\\Q�2Q�2\Ot]]]2Q�22s\\O�\O\\Q�2Q�2\Ot]]]2Q�222s^\O\\	Q�2Q�2Q�2s_Q�s`\MO�Q�2saQ�sb\MO�Q�2sc\MO�Q�2sd\O\\	Q�2Q�2Q�2se\O\\	Q�2Q�2Q�2sfQ�sgQ�sh\MO�Q�2sj\MO�Q�2sk\O\\	Q�2Q�2\MO�Q�22sl\O\\	Q�2Q�2\MO�Q�22smQ�sn\O\\	Q�2Q�2Q�2so\O\\	Q�2Q�2Q�2sp\O\\	Q�2Q�2Q�2sqQ�srQ�ss\O\\	Q�2Q�2Q�2st\O\\	Q�2Q�2\O\\Q2Q2\O\\Q�2Q�2Q�222su\O\\Q�2Q�2\O\\Q�2Q�2\Ov2Q�222sv\O\\wQ�2Q�2\O\\Q�2Q�2Q�22sx\O\\	Q�2Q�2sy\O\\	Q�2Q�2sz\yQ�2s{\y\O\\	Q�2Q�2Q�22s|\}Q�2s~\}Q�2s\}Q�2s�\}\O\\	Q�2Q�2Q�22s�\zQ�2s�\zQ�2s�\Oh\OjQ�2\O\COQ�6HQ�2Q�22s�\O\\Q�2Q�2Q�2s�Q�s�Q�s�Q�s�\O\\Q�2Q�2Q�2s�\MCO\MO�Q�22s�Q�s�Us�P!)��PosixTesterc�b�UO[O[O2[	[OQ29^tt^2PPP2UO[O22[OQQ[2P!)%fhKR9h)�wb�ignorez.* potential security risk .*)�
addCleanupr�unlink�TESTFN�open�enterContextr�check_warnings�warnings�filterwarnings�RuntimeWarning��selfs&r�setUp�PosixTester.setUp;sm�����	�(�(�)�*:�*:�;�
�)�"�"�D�
)�
)��*����/�8�8�:�;�����*I� .�	0�*�
)�s�B�B.	�'B.	c	��,QNoSFDZo[[UP2oUeJUOU29^tt^2U2UO[U]2PPP2J\	P!)%fhJq9h)�ctermid)r&�getcwd�getcwdb�uname�times�
getloadavg�getegid�geteuid�getgid�	getgroups�getpid�getpgrp�getppid�getuid�sync)�getattrr�subTest�assertRaises�	TypeError)r"�NO_ARG_FUNCTIONS�name�
posix_funcs&   r�testNoArgFunctions�PosixTester.testNoArgFunctionsDsd����%�D� ���d�3�J��%��\�\�$�'�'��L��%�%�i��Q�?�(�'�%�(�'�'�s�A)	�)A:
�2A:
�	getresuidztest needs posix.getresuid()c��[O2oUO[U2]2SFDoUO	U]2J	P!��)rr>�assertEqual�len�assertGreaterEqual)r"�user_ids�vals&  r�test_getresuid�PosixTester.test_getresuidTs>���?�?�$������X���*��C��#�#�C��+���	getresgidztest needs posix.getresgid()c��[O2oUO[U2]2SFDoUO	U]2J	P!r@)rrJrBrCrD)r"�	group_idsrFs&  r�test_getresgid�PosixTester.test_getresgid\s>���O�O�%�	�����Y���+��C��#�#�C��+�rI�	setresuidztest needs posix.setresuid()c���[O2oUO[OU2UO[OPPP22P!��)rr>�assertIsNonerO)r"�current_user_idss& r�test_setresuid�PosixTester.test_setresuiddsD��!�?�?�,�����%�/�/�+;�<�=����%�/�/�"�b�"�5�6rIc��[O2o]U7c>U]*]*PP1oUO[[O,UN3P!P!��)rr>r7rrO)r"rT�new_user_idss&  r�test_setresuid_exception�$PosixTester.test_setresuid_exceptionlsN��!�?�?�,���$�$�,�Q�/��1�2�r�:�L����g�u���F��F�%rI�	setresgidztest needs posix.setresgid()c���[O2oUO[OU2UO[OPPP22P!rQ)rrJrSr])r"�current_group_idss& r�test_setresgid�PosixTester.test_setresgidusD��"�O�O�-�����%�/�/�+<�=�>����%�/�/�"�b�"�5�6rIc��[O2o]U7c>U]*]*PP1oUO[[O,UN3P!P!rX)rrJr7rr])r"r_�
new_group_idss&  r�test_setresgid_exception�$PosixTester.test_setresgid_exception}sN��"�O�O�-���%�%�.�q�1�!�3�R��<�M����g�u���G��G�&rI�
initgroupsztest needs os.initgroups()�getpwuidztest needs pwd.getpwuid()c��UO[[O2UO[[OP2UO[[O]Q2UO[[OQ][	22[
O2]6wc`[O[O22Oo[OU]
2UOQ2P!P![c[OQ2gh9h[c6oSOSO [ O"2Po=P!Po=hh9h)N�foozneed a pwd entryz+Expected OSError to be raised by initgroups)r7r8rrf�object�osr3�pwdrg�pw_name�KeyError�unittest�SkipTest�failrrBr
r)r"r:rs&  r�test_initgroups�PosixTester.test_initgroups�s��	
���)�U�%5�%5�6����)�U�%5�%5�t�<����)�U�%5�%5�q�%�@����)�U�%5�%5�u�a���J��9�9�;�!��
<��|�|�E�L�L�N�3�;�;��
I�� � ��r�*��	�	�G�H����
<��'�'�(:�;�;�
<��
�
7�� � ����%�+�+�6�6��
7�s0�;3D�/E�	D=�%D=�	F�
F�*E;�;F�statvfsztest needs posix.statvfs()c�n�UO[O[O22P!�N)�
assertTruerrtrk�curdirr!s&r�test_statvfs�PosixTester.test_statvfs�s��	
����
�
�b�i�i�0�1rI�fstatvfsztest needs posix.fstatvfs()c�R�[[O2oUO[O
UO
222UO[OUO
222UO2P!SO2h9hrv)	rrrrwrr{�filenort�close�r"�fps& r�
test_fstatvfs�PosixTester.test_fstatvfs�sb���)�"�"�
#��	��O�O�E�N�N�2�9�9�;�7�8��O�O�E�M�M�"�)�)�+�6�7��H�H�J��B�H�H�J�s�A&B�B&�	ftruncateztest needs posix.ftruncate()c��[[OQ2oUOQ2UO	2[
OUO2]2UO2P!SO2h9h)�w+�test)	rrr�write�flushrr�r}r~rs& r�test_ftruncate�PosixTester.test_ftruncate�sW���)�"�"�D�
)��	��H�H�V���H�H�J��O�O�B�I�I�K��+��H�H�J��B�H�H�J�s�AA5�5B�truncateztest needs posix.truncate()c��[[OQ29^tt^2oUOQ2UO	2PPP2[
O[O]2P!)%fhK79h)�wr�)rrrr�r�rr�rs& r�
test_truncate�PosixTester.test_truncate�sP��
�)�"�"�C�
(�
(�B��H�H�V���H�H�J�)�	���y�'�'��+�)�
(�s�"A5�5B	�>B	�execvez/test needs execve() to support the fd parameterc�:�[O[O[O2o[O
2oU]6Xc�[O[OO[O2]*2[OU[OQQ,[O2L[OU]Q5[OU2P![OS2h9h)rY�-c�pass��exitcode)rkr�sys�
executable�O_RDONLY�fork�chdir�path�splitrr��environr�wait_processr~)r"r��pids&  r�test_fexecve�PosixTester.test_fexecve�s����W�W�S�^�^�R�[�[�
1��	��'�'�)�C��a�x���������s�~�~�6�q�9�:����R�#�.�.�$��!?����L��$�$�S�1�5��H�H�R�L��B�H�H�R�L�s�D�BD�D�waitidztest needs posix.waitid()c��[O2oU]6Xc�[O[OO	[
O2]*2[O[
O[
OQQ,[O2P![O[OU[O2oUOVO2P!)rYr�r�)rkr�r�r�r�r�r�rr�r�r��P_PID�WEXITEDrB�si_pid)r"r��ress&  r�test_waitid�PosixTester.test_waitid�s����g�g�i���!�8��H�H�R�W�W�]�]�3�>�>�2�1�5�6��L�L����#�.�.�$��)G����T��,�,�u�{�{�C����?�C����S�*�*�-rIc��UO[QQ59^tt^2[OQ2PPP2UO[QQ59^tt^2[O]Q5PPP2UO[QQ59^tt^2[OQQ5PPP2UO[QQ59^tt^2[OQQ5PPP2UO[Q	Q59^tt^2[OPQ5PPP2UO[Q	Q59^tt^2[OPQ5PPP2UO[Q	Q59^tt^2[OPQ5PPP2UO[Q
Q59^tt^2[OPQQ5PPP2UO[Q
Q59^tt^2[O2PPP2UO[Q
Q59^tt^2[OQPQ5PPP2Qo[	QU2P!)%fhCKZ9h)%fhCK/9h)%fhCK9h)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCKX9h)%fhCK+9h)%fhCK9h)%fhK�9h)zPositional args not allowed��msgc��P!rv�r�rIr�<lambda>�3PosixTester.test_register_at_fork.<locals>.<lambda>�s��rIzArgs must be callable)�before�three)�after_in_childsFive)�after_in_parentzArgs must not be NonezInvalid arg was allowedc��]!r@r�r�rIrr�r��s��QrI)r�r�z!At least one argument is requiredc��P!rvr�r�rIrr�r��s��trI)r�r�a�if 1:
            import os

            r, w = os.pipe()
            fin_r, fin_w = os.pipe()

            os.register_at_fork(before=lambda: os.write(w, b'A'))
            os.register_at_fork(after_in_parent=lambda: os.write(w, b'C'))
            os.register_at_fork(after_in_child=lambda: os.write(w, b'E'))
            os.register_at_fork(before=lambda: os.write(w, b'B'),
                                after_in_parent=lambda: os.write(w, b'D'),
                                after_in_child=lambda: os.write(w, b'F'))

            pid = os.fork()
            if pid == 0:
                # At this point, after-forkers have already been executed
                os.close(w)
                # Wait for parent to tell us to exit
                os.read(fin_r, 1)
                os._exit(0)
            else:
                try:
                    os.close(w)
                    with open(r, "rb") as f:
                        data = f.read()
                        assert len(data) == 6, data
                        # Check before-fork callbacks
                        assert data[:2] == b'BA', data
                        # Check after-fork callbacks
                        assert sorted(data[2:]) == list(b'CDEF'), data
                        assert data.index(b'C') < data.index(b'D'), data
                        assert data.index(b'E') < data.index(b'F'), data
                finally:
                    os.write(fin_w, b'!')
            r�)r7r8rk�register_at_forkr�r"�codes& r�test_register_at_fork�!PosixTester.test_register_at_fork�s5��
�
�
�y�.K�
�
L�
L�����-�M�
�
�
�y�.E�
�
F�
F����q�)�G�
�
�
�y�.E�
�
F�
F����w�7�G�
�
�
�y�.E�
�
F�
F�����8�G�
�
�
�y�.E�
�
F�
F����t�,�G�
�
�
�y�.E�
�
F�
F����t�4�G�
�
�
�y�.E�
�
F�
F�����5�G�
�
�
�y�.G�
�
H�
H����t�Y�G�I��
�
�y�.Q�
�
R�
R����!�S��
�
�y�.G�
�
H�
H����|�B�G�I�
"��F	��t�$�yM�
L�
L��
F�
F�
F��
F�
F�
F��
F�
F�
F��
F�
F�
F��
F�
F�
F��
F�
F�
F��
H�
H�
H��S�
R�
R��I�
H�s��J
� J�J2�K�K�K.�L�L�L*�L>�
J	�J	�J/	�'J/	�2K	�;K	�K	�K	�K+	�#K+	�.K?	�7K?	�L	�L	�L'	�L'	�*L;	�3L;	�>M	�M	�lockfztest needs posix.lockf()c��[O[O[O[O
*2o[OUQ2[OU][O2[OU[O]2[OU[O]2[OU2P![OS2h9h)�test)rkrrr�O_WRONLY�O_CREATr��lseek�SEEK_SETrr��F_LOCK�F_ULOCKr~�r"�fds& r�
test_lockf�PosixTester.test_lockfs���
�W�W�Y�%�%�r�{�{�R�Z�Z�'?�
@��	��H�H�R��!��H�H�R��B�K�K�(��K�K��E�L�L�!�,��K�K��E�M�M�1�-��H�H�R�L��B�H�H�R�L�s
�B	C,�,D�preadztest needs posix.pread()c��[O[O[O[O
*2o[OUQ2[OU][O2UOQ[OU]]22UOQ[OU]22[OU2P![OS2h9h)r�sesste)rkrrr�O_RDWRr�r�r�r�rBrr��readr~r�s& r�
test_pread�PosixTester.test_pread(s���
�W�W�Y�%�%�r�y�y�2�:�:�'=�
>��	��H�H�R��!��H�H�R��B�K�K�(����U�E�K�K��A�q�$9�:����U�E�J�J�r�1�$5�6��H�H�R�L��B�H�H�R�L�s
�BC/�/D�preadvztest needs posix.preadv()c��[O[O[O[O
*2o[OUQ2,QNTt,tFDo[U2MJ	ooUO[OV]2]
2UO,QN[U22[OU2P!ttoh[OS2h9h)�test1tt2t3t5t6t6t8��rA��st1tt2st3ts5t)
rkrrrr�r�r��	bytearrayrBrr��listr~)r"r��i�bufs&   r�test_preadv�PosixTester.test_preadv4s���
�W�W�Y�%�%�r�y�y�2�:�:�'=�
>��	��H�H�R�.�/�)2�3��A�9�Q�<��C�3����U�\�\�"�1�5�r�:����6��S�	�B��H�H�R�L��	4��
�H�H�R�L�s�C �'C�=AC �C � C8�	RWF_HIPRIztest needs posix.RWF_HIPRIc��[O[O[O[O
*2o[OUQ2,QNTt,tFDo[U2MJ	ooUO[OV][O2]
2UO,QN[U22[O*U2P!ttoh[cSOQ2K;[cLoSO [ O"[ O$.7c[&O(Q2ggPo=hh9h[O*S2h9h)r�zpreadv2 not availablez0RWF_HIPRI is not supported by the current systemr�r�)rkrrrr�r�r�r�rBrr�r�r��NotImplementedError�skipTestrr
�EINVAL�ENOTSUProrpr~)r"r�r�r��insts&    r�test_preadv_flags�PosixTester.test_preadv_flags?s���W�W�Y�%�%�r�y�y�2�:�:�'=�
>��	��H�H�R�.�/�)2�3��A�9�Q�<��C�3����U�\�\�"�1�b�l�l�C�R�H����6��S�	�B�
�H�H�R�L��4��#�	3��M�M�1�2��	��z�z�e�l�l�E�M�M�:�:��'�'�(Z�[�[���	��
�H�H�R�L�sU�C/�'C*�=AC/�*C/�/	E"�9E"�E%�
E"�E"�.E�E�E"�"E%�%E=c�|�[O[O[O[O
*2o[
Q2,Q*oUO[29^tt^2o[OV]2PPP2UOWOO[O2UO[U]*2QQ*2[OU2P!)%fhK�9h[OS2h9h�r�����)rkrrrr�r�r�r7rr�rB�	exceptionr
r��bytesr~�r"r�r��cms&   r�test_preadv_overflow_32bits�'PosixTester.test_preadv_overflow_32bitsUs����W�W�Y�%�%�r�y�y�2�:�:�'=�
>��	��U�#�$�u�,�C��"�"�7�+�+�r��	�	�"�1�%�,����R�\�\�/�/����>����U�3�q�6�]�E�5�L�9��H�H�R�L�,�+��

�H�H�R�L�s+�0D#�;D�A%D#�D 	�D 	�D#�#D;�pwriteztest needs posix.pwrite()c���[O[O[O[O
*2o[OUQ2[OU][O2[OUQ]2UOQ[OU]22[OU2P![OS2h9h)r��xxstxxt)rkrrrr�r�r�r�r�rr�rBr�r~r�s& r�test_pwrite�PosixTester.test_pwritebs���
�W�W�Y�%�%�r�y�y�2�:�:�'=�
>��	��H�H�R��!��H�H�R��B�K�K�(��L�L��U�A�&����W�e�j�j��Q�&7�8��H�H�R�L��B�H�H�R�L�s
�A<C�C7�pwritevztest needs posix.pwritev()c�h�[O[O[O[O
*2o[OUQ2[OU][O2[OU,QN]2oUOU]
2[OU][O2UOQ[OU]d22[OU2P![OS2h9h)r�sxxtest1tt2t3��test1stt2st3)rkrrrr�r�r�r�r�r�rBrr�r~�r"r��ns&  r�test_pwritev�PosixTester.test_pwritevms���
�W�W�Y�%�%�r�y�y�2�:�:�'=�
>��		��H�H�R����H�H�R��B�K�K�(��
�
�2�8�!�<�A����Q��#��H�H�R��B�K�K�(����_�e�j�j��S�.A�B��H�H�R�L��B�H�H�R�L�s
�B6D�D1zos.RWF_SYNCztest needs os.RWF_SYNCc��[O[O[O[O
*2o[OUQ2[OU][O2[OU,QN][O2oUOU]
2[OU][O2UOQ[OU]d22[OU2P![OS2h9h)r�s
xxtest1tt2r�)rkrrrr�r�r�r�r�r��RWF_SYNCrBrr�r~r�s&  r�test_pwritev_flags�PosixTester.test_pwritev_flags{s����W�W�Y�%�%�r�y�y�2�:�:�'=�
>��		��H�H�R����H�H�R��B�K�K�(��
�
�2�8�!�R�[�[�I�A����Q��#��H�H�R��B�K�K�(����]�E�J�J�r�3�,?�@��H�H�R�L��B�H�H�R�L�s
�CD(�(Ec�$�[O[O[O[O
*2oUO
[29^tt^2o[OUQQ*,Q*]2PPP2UOWOO[O2[OU2P!)%fhK\9h[OS2h9h��xr�r�)rkrrrr�r�r7rr�rBr�r
r�r~�r"r�r�s&  r�test_pwritev_overflow_32bits�(PosixTester.test_pwritev_overflow_32bits�s����W�W�Y�%�%�r�y�y�2�:�:�'=�
>��	��"�"�7�+�+�r��
�
�2��u��~��5�q�9�,����R�\�\�/�/����>��H�H�R�L�	,�+��
�H�H�R�L�s*�C7�((C$�<C7�$C4	�-C4	�/C7�7D�posix_fallocatez"test needs posix.posix_fallocate()c�t�[O[O[O[O
*2o[OU]]
2[O"U2P![c�oSO[O6Xc<[OOQ2%c[OQ2gSO[O 6Xc[OQ2ggPo=hh9h[O"S2h9h)rYz test may fail on ZFS filesystemsz2the file system does not support posix_fallocate())�sunos�freebsd�openbsd�gnukfreebsd)rkrrrr�r�rrrr
r�r��platform�
startswithrorp�
EOPNOTSUPPr~)r"r�r�s&  r�test_posix_fallocate� PosixTester.test_posix_fallocate�s����W�W�Y�%�%�r�{�{�R�Z�Z�'?�
@��	��!�!�"�a��,� 
�H�H�R�L���
	�
�z�z�U�\�\�)�c�l�l�.E�.E�>�/@�/@��'�'�(J�K�K����u�/�/�/��'�'�H�J�J���
	��
�H�H�R�L�s<�A<�<	D�D�D�&$D�4D�D�D�D�D7c��[OQ]]
2P![c,oSO[O6wcgPo=P!Po=hh9h��*i���)rrrr
�EBADF�r"r�s& r�test_posix_fallocate_errno�&PosixTester.test_posix_fallocate_errno�sA��	��!�!�#�q�"�-���	��z�z�U�[�[�(��)��	�s��	A�A�A�A�A�
posix_fadvisez test needs posix.posix_fadvise()c� �[O[O[O2o[
OU]][
O2[OU2P![OS2h9hrX)	rkrrrr�rr�POSIX_FADV_WILLNEEDr~r�s& r�test_posix_fadvise�PosixTester.test_posix_fadvise�sT���W�W�Y�%�%�r�{�{�
3��	�����A�q�%�*C�*C�D��H�H�R�L��B�H�H�R�L�s�'A5�5B
c���[OQ]][O2P![c,oSO[O
6wcgPo=P!Po=hh9hr)rrrrr
rrs& r�test_posix_fadvise_errno�$PosixTester.test_posix_fadvise_errno�sI��	�����Q��5�+D�+D�E���	��z�z�U�[�[�(��)��	�s�',�	A"�A"�A�A�A"z!test needs fd support in os.utimec
���[O2o[O[O[O
2o[OU2[OUP2UO[[OUQ2UO[[OV!P12UO[[OUPU12[OU[U2[U212[OV!U12UO[[OV!U1V1Q5UO[[OV!]1QQ5UO[[OUQU]1Q5[OU[U2[U[U2*
Q*212[OU[U2[U[U2*
Q*21Q5[OU2P![OS2h9h)N)�ns�e��A�NN)
�timerkrrrr�r�utimer7r8�int�
ValueErrorr~)r"�nowr�s&  r�test_utime_with_fd�PosixTester.test_utime_with_fd�s����i�i�k��
�W�W�Y�%�%�r�{�{�
3��	��K�K��O��K�K��D�!����i����b�,�G����i����b��+�F����i����b�4��+�F��K�K��S��X�s�3�x�0�1��K�K��#�J�'����j�%�+�+�r��:�3�*��U����j�%�+�+�r��8���U����j�%�+�+�r�<�S�RS�H��U��K�K��S��X�s�C�#�c�(�N�c�+A�'B�C�D��K�K���C��#�s�S��X�~��.D�*E�F�G�
�H�H�R�L��B�H�H�R�L�s
�G'I
�
I"z.test needs follow_symlinks support in os.utimec���[O2o[O[OPP
Q5UO[[O[OQP
Q5UO[[O[OUP1P
Q5UO[[O[OPU1P
Q5[O[O[U2[U21P
Q5[O[OV1P
Q5[O[OP
Q5P!)N��follow_symlinksr$�r%rr&rrr7r8r'�r"r)s& r�test_utime_nofollow_symlinks�(PosixTester.test_utime_nofollow_symlinks�s����i�i�k��
���I�$�$�d�E�B����)�U�[�[�)�2B�2B�&��	�	?����)�U�[�[�)�2B�2B���+�u�	�	>����)�U�[�[�)�2B�2B���+�u�	�	>�
���I�$�$�s�3�x��S��&:�$)�	+�
���I�$�$�s�j�%�H�
���I�$�$�e�<rI�writevztest needs posix.writev()c�^�[O[O[O[O
*2o[OUQ2oUOU]
2[OU][O2UOQ[OU]
22[OU,2oUOU]2[OU2P![cK%h9h[OS2h9h)r��
test1tt2t3r�)rkrrrr�r�r3rBr�r�rr�rr~)r"r�r��sizes&   r�test_writev�PosixTester.test_writev�s���
�W�W�Y�%�%�r�y�y�2�:�:�'=�
>��	��	�	�"�7�8�A����Q��#��H�H�R��B�K�K�(����]�E�J�J�r�2�,>�?�
*��|�|�B��+��� � ��q�)��H�H�R�L���
��
��
�H�H�R�L�s7�A6D�D�D�	D�
D�D�D�D�D,c�"�[O[O[O[O
*2oUO
[29^tt^2o[OUQQ*,Q*2PPP2UOWOO[O2[OU2P!)%fhK\9h[OS2h9hr)rkrrrr�r�r7rr3rBr�r
r�r~rs&  r�test_writev_overflow_32bits�'PosixTester.test_writev_overflow_32bitss����W�W�Y�%�%�r�y�y�2�:�:�'=�
>��	��"�"�7�+�+�r��	�	�"�t�e�|�n�u�4�5�,����R�\�\�/�/����>��H�H�R�L�	,�+��
�H�H�R�L�s*�C6�('C#�<C6�#C3	�,C3	�.C6�6D�readvztest needs posix.readv()c
���[O[O[O[O
*2o[OUQ2[OU][O2,QNTt,tFDo[U2MJ	ooUO[OV2]
2SO,QNSTt,tFDo[U2MJ	to2[OU,2oUOU]2[OU2P!ttohttoh[cK/h9h[OS2h9h)r5r�r�)rkrrrr�r�r�r�r�r�rBrr<r�rr~)r"r�r�r�r6s&    r�
test_readv�PosixTester.test_readv
s���
�W�W�Y�%�%�r�y�y�2�:�:�'=�
>��	��H�H�R��'��H�H�R��B�K�K�(�)2�3��A�9�Q�<��C�3����U�[�[��1�2�6����6�3�8O�3�a��q��3�8O�P�
*��{�{�2�r�*��� � ��q�)��H�H�R�L��4��8O��
�
��
��
�H�H�R�L�sU�AE�
D;�#9E�E
�2E�:E�E�;
E�	E�E�E�E�E�E.c�z�[O[O[O[O
*2o[
Q2,Q*oUO[29^tt^2o[OV2PPP2UOWOO[O2UO[U]*2QQ*2[OU2P!)%fhK�9h[OS2h9hr�)rkrrrr�r�r�r7rr<rBr�r
r�r�r~r�s&   r�test_readv_overflow_32bits�&PosixTester.test_readv_overflow_32bits#s����W�W�Y�%�%�r�y�y�2�:�:�'=�
>��	��U�#�$�u�,�C��"�"�7�+�+�r�����!�,����R�\�\�/�/����>����U�3�q�6�]�E�5�L�9��H�H�R�L�,�+��

�H�H�R�L�s+�0D"�;D�A%D"�D	�D	�D"�"D:�dupztest needs posix.dup()zWASI does not have dup()c�&�[[O2o[OUO22oUO
U[2[OU2UO2P!SO2h9hrv)
rrrrrCr}�assertIsInstancer'rkr~)r"r�r�s&  r�test_dup�PosixTester.test_dup0s[���)�"�"�
#��	����2�9�9�;�'�B��!�!�"�c�*��H�H�R�L��H�H�J��B�H�H�J�s�AA>�>B�confstrztest needs posix.confstr()c� �UO[Q29^tt^2[OQ2PPP2UO[Q29^tt^2[OQ2PPP2[OQ2oUO[
U2]2UO[O[OQ*2U2P!)%fhK�9h)%fhK�9h)�unrecognized configuration name�
CS_garbage�/configuration names must be strings or integers�G�z��?�CS_PATH)	�assertRaisesRegexr(rrHr8�
assertGreaterrCrB�
confstr_names)r"r�s& r�test_confstr�PosixTester.test_confstr<s����
#�
#��9�
�
�
�M�M�,�'�
�
�
#�
#��H�
�
�
�M�M�$��
�
�}�}�Y�'�����3�t�9�a�(�������u�':�':�9�'E�F��M�
�
��

�
�s#�C*�C=�*C:	�3C:	�=D
	�D
	�sysconfztest needs posix.sysconf()c��UO[Q29^tt^2[OQ2PPP2UO[Q29^tt^2[OQ2PPP2[OQ2oUOU]2UO
[O[OQ*2U2P!)%fhK�9h)%fhK�9h)rJ�
SC_garbagerLrM�
SC_ARG_MAX)rOr(rrTr8rPrB�
sysconf_names)r"�arg_maxs& r�test_sysconf�PosixTester.test_sysconfMs����
#�
#��9�
�
�
�M�M�,�'�
�
�
#�
#��H�
�
�
�M�M�$��
�
�-�-��-�����7�A�&�����M�M�%�-�-�l�;�<�g�	G�
�
��

�
�s#�C!�C4�!C1	�*C1	�4D	�=D	�dup2ztest needs posix.dup2()zWASI does not have dup2()c�^�[[O2o[[O2o[OUO2UO22UO
2UO
2P!SO
2SO
2h9hrv)rrrrr\r}r~)r"�fp1�fp2s&  r�	test_dup2�PosixTester.test_dup2_sk���9�#�#�$���9�#�#�$��	��J�J�s�z�z�|�S�Z�Z�\�2��I�I�K��I�I�K��
�I�I�K��I�I�K�s�3B
�
"B,�	O_CLOEXECzneeds os.O_CLOEXECc�"�[O[O[O[O
*2oUO
[OU2UO[OU22P!rv)
rkrrrr�rbrr~�assertFalse�get_inheritabler�s& r�test_oscloexec�PosixTester.test_oscloexecksR���W�W�Y�%�%�r�{�{�2�<�<�'?�
@��������"�%�����+�+�B�/�0rI�O_EXLOCKztest needs posix.O_EXLOCKc��[O[O[O[O
*[O*2oUO[[O[O[O[O
*[O*2[OU2[[Q2%c�[O[O[O[O*[O*2oUO[[O[O[O[O
*[O*2[OU2P!P!)�O_SHLOCK)rkrrrr�rhr�r7r�
O_NONBLOCKr~r
rrjr�s& r�
test_osexlock�PosixTester.test_osexlockss����W�W�Y�%�%��[�[����,�R�Z�Z�7�9�����'�2�7�7�I�,<�,<��+�+�b�k�k�1�"�-�-�?�	A�
������5�*�%�%�����)�)����R�[�[�0����;�=�B����g�r�w�w�	�0@�0@� �k�k�"�+�+�5�b�m�m�C�
E��H�H�R�L�&rIrjztest needs posix.O_SHLOCKc���[O[O[O[O
*[O*2o[O[O[O[O
*[O*2o[OU2[OU2[[Q2%c�[O[O[O[O
*[O*2oUO[[O[O[O[O*[O*2[OU2P!P!)rh)rkrrrr�rjr�r~r
rr7rr�rhrk)r"�fd1�fd2r�s&   r�
test_osshlock�PosixTester.test_osshlock�s����g�g�i�&�&��[�[����,�R�Z�Z�7�9���g�g�i�&�&��k�k�"�+�+�-�b�j�j�8�:��
����
�
����
��5�*�%�%�����)�)����R�[�[�0����;�=�B����g�r�w�w�	�0@�0@� �k�k�"�+�+�5�b�m�m�C�
E��H�H�R�L�&rI�fstatztest needs posix.fstat()c	���[[O2oUO[O
UO
222UO[OUO
222UO[Q[O[UO
222UO2P!SO2h9h�z4should be string, bytes, os.PathLike or integer, not)rrrrwrrsr}�statrOr8�floatr~rs& r�
test_fstat�PosixTester.test_fstat�s����)�"�"�
#��	��O�O�E�K�K��	�	��4�5��O�O�E�J�J�r�y�y�{�3�4��"�"�9�J��J�J��b�i�i�k� 2�
4�
�H�H�J��B�H�H�J�s�B#C�C#rvztest needs posix.stat()z/test needs follow_symlinks support in os.stat()c�R�UO[Q29^tt^2[O]P
Q5PPP2UO[Q29^tt^2[O]P
Q5PPP2P!)%fhKQ9h)%fhP!9h)z*cannot use fd and follow_symlinks togetherr-)rOr(rrvr!s&r�!test_stat_fd_zero_follow_symlinks�-PosixTester.test_stat_fd_zero_follow_symlinks�s|��
�
#�
#�J�<�>�>��J�J�q�%�0�>��
#�
#�J�<�>�>��J�J�q�%�0�>�>�>�>��>�>�>�s#�B�B�B	�B	�B&	�B&	c
���UOU[O22UOU[O[O222UOU[O
[O222UO
[QU[[O[O222UO
[QUP2UO
[QU[[O22UO
[QU[[O[O222P!ru)
rwrrrk�fsencode�FakePathrOr8r�r��r"�funcs&&r�check_statlike_path�PosixTester.check_statlike_path�s�������Y�-�-�.�/�����R�[�[��)9�)9�:�;�<�����Y�/�/�	�0@�0@�A�B�C����y�F��i����I�,<�,<� =�>�	@�	
���y�F��d�	�	
���y�F��d�9�+�+�,�	.�	
���y�F��d�2�;�;�y�'7�'7�8�9�	;rIc�F�UO[O2P!rv)r�rrvr!s&r�	test_stat�PosixTester.test_stat�s��� � ����,rI�statxztest needs posix.statx()c�0�QoUOU2P!)c�R�[OU[O1-U@!rv)rr��STATX_BASIC_STATS�r��kwargss&,rr��$PosixTester.test_statx.<locals>.func�s���;�;�t�U�%<�%<�G��G�GrI)r�r�s& r�
test_statx�PosixTester.test_statx�s��	H�� � ��&rIc��QoSFDko[[U2oUOV#Q59^tt^2[O[O
[OUQ5PPP2Jm	QoSFD�vq2oUOV#Q59^tt^2UO[U29^tt^2[O[O
[OUQ5PPP2PPP2J�	UOQQ59^tt^2UO[29^tt^2o[O[O*o[O[O
[OUQ5PPP2UOWOO[O 2PPP2P!)%fhCJ�9h)%fhCK9h)%fhCJ�9h)%fhK�9h)%fhP!9h)�AT_NO_AUTOMOUNT)r��flags)r�z(AT_STATX_FORCE_SYNC | AT_STATX_DONT_SYNCr�)r��AT_STATX_SYNC_AS_STAT�AT_STATX_FORCE_SYNC�AT_STATX_DONT_SYNC))��AT_SYMLINK_NOFOLLOWr.)��AT_SYMLINK_FOLLOWr.)i�
AT_EMPTY_PATH�dir_fd)r5rr6r�rrr�rOr(r7rr�r�rBr�r
r�)r"�valid_flag_names�	flag_name�flag�kwarg_equivalent_flags�
kwarg_name�ctxr�s&       r�test_statx_flags�PosixTester.test_statx_flags�s���
I��)�I��5�)�,�D����)��8�8����I�,�,�e�.E�.E�"&�(�9�8�*�"
��
,B�'�D�Z����)��8�8��+�+�J�
�C�C��K�K�	� 0� 0�%�2I�2I�&*�,�D�9�8�,B��\�\�H�\�
I�
I��"�"�7�+�+�s��1�1�E�4L�4L�L�����I�,�,�e�.E�.E�"'�)�,�
���S�]�]�0�0�%�,�,�?�J�
I�#9�8�8��D�C�C��9�8�8��,�+��J�
I�
I�sr�6G	�H	�:6G2
�0H	�H.�<AH	�<H.�G/
�&G/
�2H�;H�=	H	�H
�H
�H+
�$H+
�&H.�.H?	�7H?	�mkfifozdon't have mkfifo()c�x�[OQ6Xc0[OO	Q[
O2oL[
Oo[
OU2UO[
OU2[OU[O[O*2UO![O"[OU2O$22P![c#oSOQS*2Po=KmPo=hh9h)�vxworksz/fifos/�posix.mkfifo(): %s)r�r
rkr��joinrrrrrr�rv�S_IRUSR�S_IWUSR�PermissionErrorr�rw�S_ISFIFO�st_mode)r"�	fifo_pathrs&  r�test_mkfifo�PosixTester.test_mkfifo�s����<�<�9�$������Y�	�0@�0@�A�I�!�(�(�I�����#����	�(�(�)�4�	4��L�L��D�L�L�4�<�<�$?�@�	
����
�
�e�j�j��&;�&C�&C�D�E���	4��M�M�.��2�3�3��	4�s�
:D�	D9�D9�D4�4D9�mknod�S_IFIFOzdon't have mknod()/S_IFIFOc���[O[O2[O[O
*[O*o[O[OU]2UO[O[O[O2O22[O[O2[O[OU]PQ5P![cToSOSO[O[O [O"12Po=K�Po=hh9h[cUoSOSO[O[O [O"12Po=P!Po=hh9h)rY)r��mode�devicer�)rrrrvr�r�r�rr�rwr�r�r�assertInr
rr��EACCES)r"r�rs&  r�
test_mknod�PosixTester.test_mknod�s+��
	����)�)�*��|�|�d�l�l�*�T�\�\�9��	Q��K�K�	�(�(�$��2�
�O�O�D�M�M�%�*�*�Y�5E�5E�*F�*N�*N�O�P�	����)�)�*�	N��K�K�Y�-�-�D���
���	N�
�M�M�!�'�'�E�K�K����u�|�|�#L�M�M��	N���	N��M�M�!�'�'�E�K�K����u�|�|�#L�M�M��	N�s>�!&D'�=(F�'	F�1F�2A	F�F�	G'�G'�A	G"�"G'�makedevztest needs posix.makedev()c�@�[O[O2oUOoUOU[2UOU]2[OU2oUOU[2UOU]2UO[OU2U2UO[[O[U22UO[[O2QFD.oUO[[1[OU2J0	[OU2oUOU[2UOU]2UO[OU2U2UO[[O[U22UO[[O2QFD.oUO[[1[OU2J0	UO[O V52U2UO[[O [U2U2UO[[O U[U22UO[[O U2UO[[O 2QFDYoUO[[1[O VE2UO[[1[O V42J[	[#[Q2%c�[$O&O)Q2%c�[O*oUO[OU2U2UO[OU2U2UO[O Vf2U2P!P!P!)rY�NODEV)�������)r��r�r�)�linux�macosr
r	)rrvrr�st_devrEr'rD�majorrBr7r8rwr(�
OverflowError�minorr�r
r�r
rr�)r"�st�devr��xr�r�s&      r�test_makedev�PosixTester.test_makedevs���
�Z�Z�	�(�(�
)���i�i�����c�3�'�����Q�'����C� �����e�S�)�����q�)�������S�)�5�1����)�U�[�[�%��*�=����)�U�[�[�1�$�A����z�=�9�5�;�;��J�%����C� �����e�S�)�����q�)�������S�)�5�1����)�U�[�[�%��*�=����)�U�[�[�1�$�A����z�=�9�5�;�;��J�%�	
������u�4�c�:����)�U�]�]�E�%�L�%�H����)�U�]�]�E�5��<�H����)�U�]�]�E�:����)�U�]�]�3�+�A����z�=�9�5�=�=�!�S����z�=�9�5�=�=�%�S�,�
�E�7�#�#��L�L�#�#�$J�K�K��K�K�E����U�[�[��/��7����U�[�[��/��7����U�]�]�5�8�%�@�	
L�
$rIc��[[Q2%fR[OO	Q2%c[
O2%cUOQ2UO[Q2P!)r�znot defined on this platform)r�r�r
�	dragonfly�netbsdrr	)	r
rr�r
rr�linked_to_muslr��
assertHasAttrr!s&r�
test_nodev�PosixTester.test_nodev?sY����w�'�'��\�\�,�,�.7�8�8��*�*�,�,��M�M�8�9����5�'�*rIc�t```�UUU1Qko[O2o[O2oURVV2UVV2URPU2UVV2URUP2UVV2[OQ6XcUQ7oLU]6Ho[
O%cCL3U%cO[OQ6wcQLQoURV�2UV�2URPP2UV�2URVV2UVV2L�[O2Q7c[OQ2gRO[UR]]2UVV2RO[UR]P2UVV2[[Q2%cV][O27c<[O2]6wc"RO[URP]2UVV2[[ 1FDPo	RO["URU	U2U2UVV2RO["URVYU22UVV2JR	P!)	z/Common code for chown, fchown and lchown tests.c�:�RdCRR2oROUOU2ROUOU2P!P!rv)rB�st_uid�st_gid)�uid�gidrv�first_paramr"�	stat_funcs&& ���r�
check_stat�6PosixTester._test_all_chown_common.<locals>.check_statKs@����$� ��-��� � ����c�2�� � ����c�2�%rIr�z1Skipping because of non-standard chown() behaviorr/)rYrRlr�)zHP-UX�SunOS)rkr3r.r�r
r�
is_emscripten�systemrorpr7rr
r/r,�strrwr8)
r"�
chown_funcr�r�r�r�r��is_root�	big_value�ts
f&ff      r�_test_all_chown_common�"PosixTester._test_all_chown_commonIs����	3�
�i�i�k���i�i�k���;��)��3���;��C�(��3���;��R�(��3���<�<�9�$��f�}�G��a�x�G�� � � �
�
�"#&�,�,�)�";���I��{�I�9��y�,��{�B��+��y�,��{�C�-��s� �
�_�_�
�"4�
4��#�#�%/�0�
0�
���g�z�;��1�E��s� ����g�z�;��2�F��s� ��r�;�'�'��B�L�L�N�*�r�z�z�|�q�/@��%�%�g�z�;��A�N��s�(��e��A����i��[�!�C�&�#�N��s� ����i��[�#�q��v�N��s� �	rI�chownzrequires os.chown()�getgid() is a stubc�|�[O[O2UO	[
[O[OPP2[O[O2UO[O[O[O2P!rQ)rkrrrr7rrr��create_empty_filer�rvr!s&r�
test_chown�PosixTester.test_chown�sl��	�	�	�)�"�"�#����'�5�;�;�	�0@�0@�"�b�I�	�#�#�I�$4�$4�5��#�#�E�K�K��1A�1A�5�:�:�NrI�fchownztest needs os.fchown()c	�P�[O[O2[	[OQ2oUO2oUO
[OU[[QP22UO2P!SO2h9h)r�rs)rkrrrrr}r�rr�r5r~)r"�	test_filer�s&  r�test_fchown�PosixTester.test_fchown�sw��	�	�	�)�"�"�#���)�)�3�/�	�	��!�!�#�B��'�'����b�(/��w��(E�
G�
�O�O���I�O�O��s
�AB�B%�lchownztest needs os.lchown()c	��[O[O2[O[
[O2UO
[O[O[[QP22P!)�lstat)
rkrrr�symlink�_DUMMY_SYMLINKr�rr�r5r!s&r�test_lchown�PosixTester.test_lchown�sS��	�	�	�)�"�"�#�
�
�
�>�9�#3�#3�4��#�#�E�L�L�)�2B�2B�$+�E�7�D�$A�	CrIr�ztest needs posix.chdir()c��[O[O2UO	[
[O[O2P!rv)rr�rkrxr7rrrr!s&r�
test_chdir�PosixTester.test_chdir�s.��
���B�I�I�����'�5�;�;�	�0@�0@�ArIc��UO[O[O[
O22P!rv)r�rrr�listdirrkrxr!s&r�test_listdir�PosixTester.test_listdir�s#���
�
�i�&�&��
�
�b�i�i�(@�ArIc�n�UO[O[O22P!rv)r�rrrr�r!s&r�test_listdir_default� PosixTester.test_listdir_default�s��	
�
�
�i�&�&��
�
��8rIc��UO[O[O2[
OQ22P!��.)r�rkr~rrrr�r!s&r�test_listdir_bytes�PosixTester.test_listdir_bytes�s*��	
�
�
�b�k�k�)�"2�"2�3�U�]�]�4�5H�IrIc	���[[1FDEoUO[29^tt^2[O
UQ22PPP2JG	P!)%fhJ\9hr)r��
memoryviewr7r8rr�)r"�clss& r�test_listdir_bytes_like�#PosixTester.test_listdir_bytes_like�sD���j�(�C��"�"�9�-�-��
�
�c�$�i�(�.�-�)�-�-�-�s�A	�A+
�#A+
z)test needs fd support for posix.listdir()c���[O[O2[O2oUO	[O
U2UO
[[OQ22[[OU222UO
[[OQ22[[OU222P!)�.)	rrr'r�rr~rB�sortedr��r"�fs& r�test_listdir_fd�PosixTester.test_listdir_fd�s���
�J�J�u�|�|�~�u�~�~�6��������Q�'�����5�=�=��%�&��5�=�=��#�$�	�
	
����5�=�=��%�&��5�=�=��#�$�	rI�accessztest needs posix.access()c��UO[O[O[
O22P!rv)rwrrrrrk�R_OKr!s&r�test_access�PosixTester.test_access�s#��������Y�%5�%5�r�w�w�?�@rI�umaskztest needs posix.umask()c��[O]2oUOU[2[OU2P!rX)rrrEr')r"�old_masks& r�
test_umask�PosixTester.test_umask�s+���;�;�q�>�����h��,�
���H�rI�strerrorztest needs posix.strerror()c�R�UO[O]22P!rX)rwrrr!s&r�
test_strerror�PosixTester.test_strerror�s��	
������q�)�*rI�pipeztest needs posix.pipe()c��[O2vq[OU2[OU2P!rv)rr"rkr~)r"�reader�writers&  r�	test_pipe�PosixTester.test_pipe�s'��������
�����
����rI�pipe2ztest needs os.pipe2()c��UO[[OQ2UO[[O]]2[O]2vq[OU2[OU2[O[O
[O*2vqUO[OU2UO[OU2UO[OU22UO[OU22UO[OU22UO[OU22UO[[OU]2[OUQ[O*2P![cP!h9h)�DEADBEEFr)r7r8rkr(r~rbrkrrdre�get_blockingrr�r�r�
PIPE_MAX_SIZE)r"�rr�s&  r�
test_pipe2�PosixTester.test_pipe2�sD��	
���)�R�X�X�z�:����)�R�X�X�q�!�4��x�x��{���
�����
������x�x����R�]�]�2�3���������!�$�������!�$�����+�+�A�.�/�����+�+�A�.�/��������+�,��������+�,����'�2�7�7�A�q�1�	��H�H�Q��w�4�4�4�5���	��	�s�,G5�5	H�?H�Hc���]PHoUO[[OUO
]*2UO[[OUO]*2P!rX)�	_testcapir7r�rkr(�INT_MAX�UINT_MAX)r"r1s& r�test_pipe2_c_limits�PosixTester.test_pipe2_c_limitssI��
	����-����9�3D�3D�q�3H�I����-����9�3E�3E��3I�JrIr&ztest needs posix.utime()c�z�[O2o[O[OP2UO[[O[OQ2UO[[O[OUP12UO[[O[OPU12[O[O[U2[U212[O[OV12P!)Nr$r/r0s& r�
test_utime�PosixTester.test_utimes����i�i�k��
���I�$�$�d�+����)�U�[�[�#�*�*�L�	:����)�U�[�[�#�*�*�S�$�K�	9����)�U�[�[�#�*�*�T�3�K�	9�
���I�$�$�s�3�x��S��&:�;�
���I�$�$�s�j�1rIc���[U[2%(o[OU2OoU[O
[O*[O*&*oUV&1-U@UO[OU2OU2[OU2%c"[UQUQ59^tt^2PPP2U[O
[O*[O**oUV&1-U@UO[OU2OU2[OU2%c![UQUQ59^tt^2PPP2UV%2P!)%fhK�9h[cK�h9h)%fhK>9hSX%2h9h)�wb+)�closefd)�
isinstancer'rkrvr��S_IWOTH�S_IWGRPr�rB�S_ISREGrr�)r"�
chmod_func�targetr�r;r��new_modes&&&,   r�check_chmod�PosixTester.check_chmod$sM�� ���-�-���w�w�v��&�&��	%�����t�|�|� ;�d�l�l� J�K�K�H��v�2�6�2����R�W�W�V�_�4�4�h�?��|�|�D�!�!���f�e�W�=�=��>��t�|�|�d�l�l�:�T�\�\�I�J�H��v�2�6�2����R�W�W�V�_�4�4�h�?��|�|�D�!�!��&�%��9�9��:�
�v�$�>�=��&�����:�9��
�v�$�s��BG)�G�'F2�)G�1BG)�G)�G� G)�2G	�;G	�=G�G)�G�	G�G�G)�G�G)�G&	�G&	�!G)�)
G3c�d�UO[O[O2P!rv)rCr�chmodrrr!s&r�test_chmod_file�PosixTester.test_chmod_file:s��������i�&6�&6�7rIc��[OQ*o[OU2UO	[O
U2U!)�d)rrr�mkdirr�rmdir�r"rAs& r�tempdir�PosixTester.tempdir>s5���!�!�C�'��
���F��������V�,��
rIc�h�UO2oUO[OU2P!rv)rNrCrrFrMs& r�test_chmod_dir�PosixTester.test_chmod_dirDs!�������������f�-rIc�>�[[OQ29^tt^2oUO[O
UO
22UO[OUO
22PPP2P!)%fhP!9h)r:)rrrrCr�fchmodr}rFrs& r�test_fchmod_file�PosixTester.test_fchmod_fileIsZ��
�)�"�"�E�
*�
*�a����U�\�\�1�8�8�:�6����U�[�[�!�(�(�*�5�+�
*�
*�
*�s�AB�B	�B	�lchmodztest needs os.lchmod()c���UO[O[O2UO[O
[OP
Q5P!�Fr-)rCrrWrrrFr!s&r�test_lchmod_file�PosixTester.test_lchmod_fileOs;��������y�'7�'7�8�������i�&6�&6���NrIc��UO2oUO[OU2UO[OUP
Q5P!rY)rNrCrrWrFrMs& r�test_lchmod_dir�PosixTester.test_lchmod_dirTs:�������������v�.�������f�e��DrIc��[OU2Oo[OU2OoU[O[O
*[O*&*oUV71-U@UO[OU2OU2UO[OU2OU2U[O[O
*[O**oUV71-U@UO[OU2OU2UO[OU2OU2[OV%2P![OX%2h9hrv)
rkrvr�r�r=r>r�rBrrF�r"r@rA�linkr��target_mode�	link_moderBs&&&&,   r�check_chmod_link�PosixTester.check_chmod_linkZs���g�g�f�o�-�-���H�H�T�N�*�*�	�
	-�"�t�|�|�d�l�l�'B�T�\�\�'Q�%R�R�H��t�0��0����R�W�W�V�_�4�4�h�?����R�X�X�d�^�3�3�Y�?�"�d�l�l�T�\�\�&A�D�L�L�&P�Q�H��t�0��0����R�W�W�V�_�4�4�h�?����R�X�X�d�^�3�3�Y�?��K�K��,��E�K�K��,�s
�EF2�2G
c�6�[OU2Oo[OU2OoU[O[O
*[O*&*oUV71-U@UO[OU2OU2UO[OU2OU2U[O[O
*[O**oUV71-U@UO[OU2OU2UO[OU2OU2P!rv)rkrvr�r�r=r>r�rBr`s&&&&,   r�check_lchmod_link�PosixTester.check_lchmod_linkis����g�g�f�o�-�-���H�H�T�N�*�*�	��������!<�t�|�|�!K�L�L���4�,�V�,���������0�0�+�>�������$��/�/��:�����t�|�|� ;�d�l�l� J�K���4�,�V�,���������0�0�+�>�������$��/�/��:rIc��[Oo[OQ*o[OV2UO	[
OU2[OQ6Xc"UO[
OV2L UO[
OV2UO[
OVP	Q5P!)�-link�ntr-)rrrkr�rrrr:rgrFrd�r"rAras&  r�test_chmod_file_symlink�#PosixTester.test_chmod_file_symlinkus����!�!�����'�)��
�
�
�6� �������d�+�
�7�7�d�?��"�"�5�;�;��=��!�!�%�+�+�v�<����e�k�k�6���NrIc��UO2o[OQ*o[OVP	Q5UO[OU2[OQ6Xc"UO[OV2L UO[OV2UO[OVP	Q5P!)rj)�target_is_directoryrkr-)rNrrrkr�rrrr:rgrFrdrls&  r�test_chmod_dir_symlink�"PosixTester.test_chmod_dir_symlink�s�����������'�)��
�
�
�6�T�:�������d�+�
�7�7�d�?��"�"�5�;�;��=��!�!�%�+�+�v�<����e�k�k�6���NrIc�F�[Oo[OQ*o[OV2UO	[
OU2UO[
OVP
Q5UO[
OV2P!�rjr-)
rrrkr�rrrrgrFrWrls&  r�test_lchmod_file_symlink�$PosixTester.test_lchmod_file_symlink�sj���!�!�����'�)��
�
�
�6� �������d�+����u�{�{�F�%��P����u�|�|�V�:rIc�F�UO2o[OQ*o[OV2UO[OU2UO[OVP
Q5UO[OV2P!rt)rNrrrkr�rrrrgrFrWrls&  r�test_lchmod_dir_symlink�#PosixTester.test_lchmod_dir_symlink�sj����������'�)��
�
�
�6� �������d�+����u�{�{�F�%��P����u�|�|�V�:rIc��[OU2oUOUQ2UO[O*oUV%1-U@[OU2oUOUO[O*UO2[UQ2o	[OV$O2P![
c>oSO[O6wcgQoSOS2Po=K�Po=hh9h[
c5o
SOS
O[O2Po
=
K�Po
=
hh9h[OX$O2h9h)�st_flags�2chflag UF_IMMUTABLE not supported by underlying fsr�)rkrvr�r{�UF_IMMUTABLErr
rr�rBrrr�chflags)r"�chflags_func�target_filer�r�r��errr��new_str�rs&&&,       r�_test_chflags_regular_file�&PosixTester._test_chflags_regular_file�s��
�W�W�[�
!�����2�z�*����d�/�/�/��	���6�v�6�	4��W�W�[�)�F����R�[�[�4�+<�+<�<�f�o�o�N�
7��+�t�,��
�M�M�+�{�{�3���	��y�y�E�,�,�,��F�C��M�M�#����		���
7�� � ����%�+�+�6�6��
7��
�M�M�+�{�{�3�s[�
C�AE$�)D"�	D�!D�"D�D�D�"	E!�,E!�-*E�E$�E!�!E$�$"Fr~ztest needs os.chflags()c�d�UO[O[O2P!rv)r�rr~rrr!s&r�test_chflags�PosixTester.test_chflags�s���'�'��
�
�y�7G�7G�HrI�lchflagsztest needs os.lchflags()c���UO[O[O2UO[O
[OP
Q5P!rY)r�rr�rrr~r!s&r�test_lchflags_regular_file�&PosixTester.test_lchflags_regular_file�s@���'�'����	�8H�8H�I��'�'��
�
�y�7G�7G�8=�	(�	?rIc��[O[O2oUO	UQ2UO[O[2[O[O[2[O[2oQo[OU1FD�oUO[O*oU[U2[O[O2o[O[2o	UO%UOUO2UO%UO[O*U	O2U[UO2J�	P![c?oSO[O 6wcgQoSO#S2Po=CKPo=hh9hS[SO2h9h)r{c�4�[OVP
Q5!rY)rr~)r�r�s&&r�chflags_nofollow�;PosixTester.test_lchflags_symlink.<locals>.chflags_nofollow�s���=�=��e�D�DrIr|)rkrvrrr�rrr�r�r�rr�r{r}rr
rr�rB)
r"�	testfn_st�dummy_symlink_str��fnr�r�r��
new_testfn_st�new_dummy_symlink_sts
&         r�test_lchflags_symlink�!PosixTester.test_lchflags_symlink�sp���G�G�I�,�,�-�	����9�j�1����	�(�(�.�9�
�
�
�9�#�#�^�4��8�8�N�3��	E��>�>�#3�4�B�$�-�-��0A�0A�A�E�
#��>�5�)�
>� "���	�(8�(8� 9�
�')�x�x��'?�$�� � ��!3�!3�]�5K�5K�L�� � �!1�!:�!:�T�=N�=N�!N�!5�!>�!>�@��>�#3�#<�#<�=�%5��
�
#��9�9�� 0� 0�0��J���
�
�c�"�"��	
#���>�#3�#<�#<�=�s1�
F$�(BG0�$	G-�.G-�/G(�G(�(G-�0H	c��[OQ6Xc[oL[o[O
O
2FD;vq#UO[U2U2UO[U2U2J=	P!)rk)	rkr:r�r�rr��itemsrB�type)r"�	item_type�k�vs&   r�test_environ�PosixTester.test_environ�sX��
�7�7�d�?��I��I��M�M�'�'�)�D�A����T�!�W�i�0����T�!�W�i�0�*rIc��UO[29^tt^2[OQQ2PPP2UO[29^tt^2[OQQ2PPP2UO[29^tt^2[OQQ2PPP2[OQ6Xc�UO[29^tt^2[OQQ2PPP2UO[29^tt^2[OQ	Q
2PPP2UO[29^tt^2[OQQ2PPP2P!P!)%fhCK[9h)%fhCK29h)%fhCK	9h)%fhK�9h)%fhK�9h)%fhP!9h)
zFRUITVEGETABLE�cabbage�FRUITzorangeVEGETABLE=cabbagezFRUIT=ORANGE�lemonrsFRUITVEGETABLEscabbagesFRUITsorangeVEGETABLE=cabbagesFRUIT=ORANGEslemon)r7r(rk�putenvr:r!s&r�test_putenv�PosixTester.test_putenv�s,��
�
�
�z�
*�
*��I�I�(�)�4�+�
�
�
�z�
*�
*��I�I�g�:�;�+�
�
�
�z�
*�
*��I�I�n�g�.�+�
�7�7�g���"�"�:�.�.��	�	�-�z�:�/��"�"�:�.�.��	�	�(�$@�A�/��"�"�:�.�.��	�	�/�8�4�/�.��
+�
*�
*��
*�
*�
*��
*�
*�
*��/�.��.�.��.�.�.�sk�F	�F�F1�+G�(G�%G+�	F	�F	�F.	�&F.	�1G	�:G	�G	�G	�G(	�!G(	�+G<	�4G<	r'ztest needs posix.getcwd()c�`�Qo[O2o[OO[O
2Q*o[OU2[OU2[OU2[OU2P!S2[OS2P!9h[OS2[OS2h9h)z8getcwd-test-directory-0123456789abcdef-01234567890abcdefz.getcwd)	rkr'r��abspathrrrKr��rmtree)r"�dirnamerx�	base_path�_create_and_do_getcwds&   @r�test_getcwd_long_pathnames�&PosixTester.test_getcwd_long_pathnames�s����L��������G�G�O�O�I�$4�$4�5�	�A�	�	(��H�H�Y���H�H�Y��2
�H�H�V�����Y�'��3	+�
�(
�H�H�V�����Y�'��
�H�H�V�����Y�'�s�,B*�*C�,C�C�.D�getgrouplistztest needs posix.getgrouplist()r3ztest needs os.getuid()c��[O[O22]*o[O[O22]*oUO	U[
OV22P!rX)rlrgrkr3r�rr�)r"�user�groups&  r�test_getgrouplist�PosixTester.test_getgrouplist sO���|�|�B�I�I�K�(��+�����R�Y�Y�[�)�!�,���
�
�e�U�/�/��<�=rIr,ztest needs os.getegid()�popenztest needs os.popen()c���[OQ29^tt^2oUO2O2oUO	2oPPP2[
9PIc!.QWO
22DjJ	LQWO
222oWe	U%f[OQ2g[OQ6Xc�]PH2oUOQ29%fQo[9PIc*,QUO
Q2Q*2DMJ	3L"QUO
Q2Q*22Q
6c[OQ	2gUO[ O"22oSO%U%(9%fU[ O&2.6H2P!)%fhCK}9h[c[2oCKQh9h)zid -G 2>/dev/nullc3�D�SF �Do[U2w�	J	P!3hrv�r')�.0�gs& r�	<genexpr>�-PosixTester.test_getgroups.<locals>.<genexpr>2s��^���^��S��V�V�^��� zneed working 'id -G'�darwin�MACOSX_DEPLOYMENT_TARGETz10.3c3�D�SF �Do[U2w�	J	P!3hrvr�)r�r�s& rr�r�<s��%7���%7��S��V�V�%7�r�r:rYr�Nz$getgroups(2) is broken prior to 10.6)�
�)rkr�r��stripr~�setr�r(rorpr�r
�	sysconfig�get_config_var�tuple�symmetric_differencerr/rwr,)r"�idg�groups�ret�
idg_groupsr��dt�symdiffs&       r�test_getgroups�PosixTester.test_getgroups)s[���X�X�)�
*�
*�c��X�X�Z�%�%�'�F��)�)�+�C�+�	���<�V�\�\�^�<���<�V�\�\�^�<�<�J��?�*��#�#�$:�;�;��<�<�8�#���)�)�*D�E�O�O��B��u�8�R�X�X�c�]�3�%7�8�u�u�8�R�X�X�c�]�3�%7�8�8�7�B��'�'�(N�O�O��1�1�%�/�/�2C�D�����G��C�C�w�5�=�=�?�2C�'C�D�/+�
*�
*���	���J�	�s/�/G�
G�#;G�G	�G	�	G0�!G0�/G0�SIGCHLDz2CLD_XXXX be placed in si_code for a SIGCHLD signal�
waitid_resultztest needs os.waitid_resultc���[O[O[O[O[O
[OP!rv)rk�
CLD_EXITED�
CLD_KILLED�
CLD_DUMPED�CLD_TRAPPED�CLD_STOPPED�
CLD_CONTINUEDr!s&r�test_cld_xxxx_constants�#PosixTester.test_cld_xxxx_constantsFs0��	�
�
�
�
�
�
�
�
�
���
���
��rI�sched_yieldzdon't have scheduling support�sched_setaffinityz!don't have sched affinity supportc�2�[O2P!rv)rr�r!s&r�test_sched_yield�PosixTester.test_sched_yieldUs��	���rI�sched_get_priority_maxz!requires sched_get_priority_max()c��[Oo[OU2o[OU2oUO	U[
2UO	U[
2UO
V22[%fMUO[[OQ2UO[[OQ2P!P!)�i��)
r�SCHED_RR�sched_get_priority_minr�rEr'rDrr7r)r"�pol�lo�his&   r�test_sched_priority�PosixTester.test_sched_priorityZs���
�n�n��
�
)�
)�#�
.��
�
)�
)�#�
.�����b�#�&����b�#�&�����'��x����g�u�'C�'C�S�I����g�u�'C�'C�S�I�rIc��[OO2TTt,tFD vqUOQ2%fJUMJ"	ooo[O]2oUOVC2[O[O22oUOVS2UO[[OP2UO[[OP2[O]2oUOUO[2[O OQ2%fV[O"]VF2[O$]U2UO[[O$PU2UO[[O"PVF2UO[&[O"]UP2UO[&[O$]]+2[O(P2oUO[&[O$]U2Qo[O(U2oUO[*[O$]U2[O(U'Q5oUO[*[O$]U2P!ttooh[cCK;h9h[cCKyh9h)�SCHED_l�����sched_priority�r
r�)r�__dict__r�rr	r�rkr2r�r7r�sched_getparamrEr�r'r�r
�sched_setscheduler�sched_setparamr8�sched_paramr�)r"r:�sched�possible_schedulers�mine�parent�param�larges&       r�$test_get_and_set_scheduler_and_param�0PosixTester.test_get_and_set_scheduler_and_paramjs5��8=���8L�8L�8N�=�8N���"&�/�/�(�";� %�u�8N��=��'�'��*���
�
�d�0�	7��-�-�b�j�j�l�;�F�
�M�M�&�6����'�5�#;�#;�R�@����'�5�#7�#7��<��$�$�Q�'�����e�2�2�C�8�
�|�|�&�&�'<�=�=�
��(�(��D�8��$�$�Q��.�
���g�u�';�';�R��G����'�5�#;�#;�R��M����)�U�%=�%=�q�$��M����)�U�%9�%9�1�b�A��!�!�$�'�����)�U�%9�%9�1�e�D����!�!�%�(�����-��)=�)=�q�%�H��!�!�%��8�����-��)=�)=�q�%�H��K=���	�
�	��$#�
��
�s;�K�K�5)K�.K.�	K+�&K+�*K+�.	K=�8K=�<K=c���[O]2o[[O]*2FD>o[O
[OV22oUOV12J@	[OU2oUOV12UOV12[OU2oUOV12UOV12[OU2oUOV12UOV12[OU]Q5oUOV12UOUO]2P!)rRr�)rr��range�pickle�HIGHEST_PROTOCOL�loads�dumpsrB�copy�assertIsNot�deepcopy�replace�assertNotEqualr�)r"r��proto�newparams&   r�test_sched_param�PosixTester.test_sched_param�s���!�!�!�$���6�2�2�1�4�5�E��|�|�F�L�L��$>�?�H����X�-�6��9�9�U�#������)�����)��=�=��'������)�����)��<�<��&������)�����)��<�<��a�8�����H�,�����0�0�!�4rIc��[Q2o[OU2oUO2==[O
2P!)�inf)rwrr��
__reduce__r�
gc_collect)r"r�r�s&  r�test_bug_140634�PosixTester.test_bug_140634�s8���u����!�!�.�1��
�����E����rI�sched_rr_get_intervalzno functionc�<�[O]2oUO
W[2UOUQ2UOUQ2P![c<oSO[O6wcgSOQ2Po=K}Po=hh9h)rYz only works on SCHED_RR processesgg�?)
rrrr
r�r�rErwrD�
assertLess)r"�intervalrs&  r�test_sched_rr_get_interval�&PosixTester.test_sched_rr_get_interval�s~��	>��2�2�1�5�H�	
���h��.�����"�-�����"�%���	>��w�w�%�,�,�&���M�M�<�=�=��	>�s#�A�	B�B� B�?B�Bc��[O]2oUOU[2UO	[U2]2[OOQ2%f&UO[[OP2SFD=oUOU[2UO	U]2UOUQ2J?	P!)rYr
r�)
r�sched_getaffinityrEr�rDrCr�r
rr7rr'r)r"�mask�cpus&  r�test_sched_getaffinity�"PosixTester.test_sched_getaffinity�s����&�&�q�)�����d�C�(�����D�	�1�-��|�|�&�&�y�1�1����g�u�'>�'>��C��C��!�!�#�s�+��#�#�C��+��O�O�C��)�rIc	�@�[O]2oUO[O][	U22[U2]6�cUO
2[O]U2UO[O]2U2[O],2UO[[O]Q,2UO[[O][[Q22UO[[O]]]�*,2[OO!Q2%f)UO[[OPU2P!P![cK�h9h)rY�0Xr
i����)rrrr�r�rC�poprBrr7r(�mapr'r�r�r
r)r"rs& r�test_sched_setaffinity�"PosixTester.test_sched_setaffinity�s(���&�&�q�)������/�/��D��J�?��t�9�q�=��H�H�J�
����4�(�����0�0��3�T�:�	��#�#�A�r�*�	
���*�e�&=�&=�q�3�%�H����*�e�&=�&=�q�#�c�4�.�Q����-��)@�)@�!�a��f�X�N��|�|�&�&�y�1�1����g�u�'>�'>��D�I�2���	�
�	�s� F�	F�F�FzNo dynamic linking on WASIrzPOSIX-only testc��[O[O[O[OP!rv)r�	RTLD_LAZY�RTLD_NOW�RTLD_GLOBAL�
RTLD_LOCALr!s&r�test_rtld_constants�PosixTester.test_rtld_constants�s$��	���
���
���
��rI�	SEEK_HOLEz(test needs an OS that reports file holesc� �[[OQ29^tt^2oUOQ2UO	2UO2oUO
2o[U2FDmoUOU[OV4[O22UOU[OV4[O22Jo	UO[[OV2[O2UO[[OV2[O2PPP2P![c[ O"Q2gh9h)%fhP!9h)zr+bshellozOSError raised!)rrrr�r��tellr}r�rBrkr��	SEEK_DATA�assertLessEqualr*r7rrorp)r"r�r6�fnor�s&    r�
test_fs_holes�PosixTester.test_fs_holes�s���)�"�"�E�
*�
*�b��H�H�X���H�H�J��7�7�9�D��)�)�+�C�
;��t��A��$�$�Q��������(F�G��(�(��r�x�x�����/M�N�%��!�!�'�2�8�8�S����M��!�!�'�2�8�8�S����M�+�
*���
;�
�'�'�(9�:�:�
;��+�
*�
*�s+�AE<�'C%E�	E9�!E9�9E<�<F
	�F
	c�L�QFDVo[[UP2oUeJQ[O1FD
oUQU2J	UOQU*2JX	P![c8oSOQO
S2[S22Po=J�Po=hh9h)zV
Test functions that call path_error2(), providing two filenames in their exceptions.
�noodly2�doesnotexistfilenamez'doesnotexistfilename' -> '{}'z#No valid path_error2() test for os.)�renamerra)	r5rkrrrr��formatr�rq)r"r:�function�dstrs&    r�test_path_error2�PosixTester.test_path_error2	s���2�D��r�4��.�H����!�9�#3�#3�4����3�S�9�5��	�	�?�$�F�G�2�����M�M�"B�"I�"I�#�"N�PS�TU�PV�W����s�	A!�!	B#�+B#�,*B�B#c��[OoUQ*oUO[OU2[OU2PoUO	[
29^tt^2[OU[O[O*2oPPP2Ud[OU2UO[OOU22UO	[
[OU2UO[OOU22[UQ2O2UO	[
[OU2P!)%fhK�9hSd[OS2hh9h)�r)rrrrr7r(rkrr�r�r~rdr��existsrKrv�r"r��fn_with_NULr�s&   r�test_path_with_null_character�)PosixTester.test_path_with_null_characters��
�
�
���4�i�����	�(�(�"�-������
��	��"�"�:�.�.��W�W�[�"�+�+��
�
�*B�C��/��~���������������+�,����*�b�h�h��<����������+�,��R���������*�b�g�g�{�;�/�.���~�������s0�F#�1;F�,F#�F 	�F 	�F#�#G�(Gc��[O[O2oUQ*oUO	[O
U2[O
U2PoUO
[29^tt^2[OU[O[O*2oPPP2Ud[OU2UO[OOU22UO
[[OU2UO[OOU22[UQ2O2UO
[[O U2P!)%fhK�9hSd[OS2hh9h)r�r)rkr~rrrrr7r(rr�r�r~rdr�r=rKrvr>s&   r�test_path_with_null_byte�$PosixTester.test_path_with_null_byte-s%��
�[�[��)�)�
*���5�j�����	�(�(�"�-������
��	��"�"�:�.�.��W�W�[�"�+�+��
�
�*B�C��/��~���������������+�,����*�b�h�h��<����������+�,��R���������*�b�g�g�{�;�/�.���~�������s0�(F7�;F$�F7�$F4	�-F4	�/F7�7G�<G�
pidfd_openzpidfd_open unavailablec�|�UO[29^tt^2o[OP2PPP2WOO
[
O6XcUOQ2[UO[2%c UOQUO802UOUOO
[
O2[O[O[O2]22P!)%fhK�9h)rRz"system does not support pidfd_openzpidfd_open syscall blocked: )r7rrkrEr�r
rr�r<r�rBr�r~r0)r"r�s& r�test_pidfd_open�PosixTester.test_pidfd_open?s���
�
�
�w�
'�
'�2��M�M�"��(�
�<�<������-��M�M�>�?��b�l�l�O�4�4��M�M�8����8H�I�J�������+�+�U�\�\�:�
������r�y�y�{�A�.�/�(�
'�s�D+�+D;	�4D;	c��[OOQ	2o[OOQ
2o[OoUQ*o[
OV42UO[OU2UOQ29^tt^2UQ*o[
OVE2UO[OU2[O[O7f	U%c<UO[
OU2[
OU22LBU%c;UO[
OU2[
OU22PPP2UOQ29^tt^2UQ*o[
OVEP
Q5UO[OU2UO[
OU2[
OU22PPP2UOQ29^tt^2UQ*o[
OVEP	Q5UO[OU2UO[
OU2[
OU22PPP2P!)%fhCKO9h[c0[O[O7f	S%cgK�h9h)%fhCK9h[c0[O[O7f	S%cgK�h9h)%fhP!9h)r�r�zno follow_symlinksrazfollow_symlinks=False�
link_nofollowr-zfollow_symlinks=True�link_following)r�r
r�rr��sunos5)�win32r�)r�r
rrrrr�rrr6rark�supports_follow_symlinksrBr�r�)r"�default_follow�default_no_follow�origr�ras&     r�test_link_follow_symlinks�%PosixTester.test_link_follow_symlinksJs]�����0�0�M�O���L�L�3�3�4F�G��������"��
�
�
�d�$����	�(�(�'�2�
�\�\�.�
/�
/��&�=�D��J�J�w�%��O�O�I�,�,�d�3��w�w�"�5�5�5��� � ����T�!2�E�K�K��4E�F�"�� � ����T�!2�E�K�K��4H�I�0��\�\�1�
2�
2��/�)�D�
J��
�
�7�%�@�
���	� 0� 0�$�7�� � ����T�!2�E�K�K��4H�I�3��\�\�0�
1�
1��*�*�D�
G��
�
�7�$�?�
���	� 0� 0�$�7�� � ����T�!2�E�K�K��4E�F�2�
1�-0�
/�
/��'�
��7�7�b�9�9�9�=N��>O�
��3�
2�
2��"'�
��7�7�b�9�9�9�^��>L�
��2�
1�
1�s��(A"K�K�AK�:K�1
L'�<K*�AL'�
M8�L;�2AM8�K'	�K'	�*	L$�4#L$�L$� L$�!L'�#L$�$L'�'L8	�0L8	�;	M5�#M5�)M5�1M5�2M8�4M5�5M8�8N		�N		r�)��__name__�
__module__�__qualname__�__firstlineno__r#r<ro�
skipUnlessr
rrGrMrUr[r`rdrlrrryr�r�r�r5rk�supports_fdr�
requires_forkr�r�r�r�r�r�r��requires_32br�r�r�r�rrrrrr&r*rNr1r7r:r>rA�skipIf�is_wasirFrRrZr`�requires_linux_version�requires_subprocessrfrlrqrxrvr{r�r�r�r�r�r�r�r�r�r�r�r�skip_unless_working_chmodr�r�r�r�rrrr�rrrr r&r.�cpython_onlyr4r7rCrGrNrQrUrZr]rdrg�skip_unless_symlinkrmrqrurxr�r�r�r�r�r�r�r�r��signalr��requires_sched_h�requires_sched_affinityr�r��requires_schedr�r	rrrr!r:r(r0r9r@rCrG�skip_unless_hardlinkrR�__static_attributes__�__classdictcell__��
__classdict__s@rrr9s����0�@� ������4�7�9�,�9�,�������4�7�9�,�9�,�������4�7�9�7�9�7�������4�7�9�G�9�G�������4�7�9�7�9�7�������4�7�9�H�9�H�������5�5�7�
�����j�1�3N�O�I�P�7�I�.�����	�2�5�7�2�7�2������
�3�6�8��8��������4�7�9��9�������
�3�5R�S�,�T�,������X�t�4����F�Hy�z�����
��{�
�������1�3N�O�����.��P�.�
����=%��=%�~������0�2L�M�	�N�	�������0�2L�M�	�N�	�������1�3N�O��P��������1�3N�O�
������4�6R�S��T�P��(������1�3N�O��	��P�	�������1�3N�O��P�������	�2�4P�Q��R�������	�2�4P�Q�
�����
�6�8P�Q��R�R�������	�2�4P�Q����R�������(9�:�,�.��.��,�����(9�:�,�.��.��������8�*�,��,��������8�*�,��,��������R�^�^�3�5X�Y��Z��(������R�%@�%@�@�Br�s�=�t�=�������1�3N�O��P��*������1�3N�O����P��������0�2L�M��N��*������0�2L�M��	��N�	�������.�1�3�
�_�_�W�_�_�&@�A��B�3�������	�2�5�7�
N�7�
N������	�2�5�7�G�7�G� ������/�2�4�
�_�_�W�_�_�&A�B��C�4�������[�1�3G�H��#�#�A�q�"�-�� � �"�1�#�.�I�1�
�����
�3�4�6��6�������
�3�4�6�
�6�
�������0�3�5�
�5�
�������/�2�4�
������B�$?�$?�?�J�L�1�L�4�1�;�$-�������0�2L�M�'�N�'�
������0�2L�M�@�N�@�@������1�3H�I�F�J�F�������0�M�M�W�T�9�5M�5�7�N�7�N�,�����	�2�4P�Q�,A�R�,A�\+�I!�V�����W�-�/D�E�
�_�_�W�*�*�,@�A�O�B�F�O��(�(�
������1�3K�L�
�_�_�W�*�*�,@�A�
�B�M�)�
��(�(�
������1�3K�L�C�M�)�C�������0�2L�M�B�N�B�B�9�
J�
)�
������"�.�.�8�D�F��F��������1�3N�O�A�P�A�������0�2L�M��N��
�����
�3�6�8�+�8�+�������/�1J�K��L��
�����W�-�/F�G��#�#�A�q�"�-��.�H��4
���
�����W�-�/F�G��#�#�A�q�"�-�K�.�H��K�������0�2L�M�
2�N�
2�%�,�(�(�8�)�8���(�(�.�)�.��(�(�6�)�6�
������1�3K�L�O�M�O�������1�3K�L�E�M�E�

-�
;��"�"�	O�#�	O��"�"�	O�#�	O�������1�3K�L��"�"�;�#�M�;�������1�3K�L��"�"�;�#�M�;�4�0�����	�2�4M�N�I�O�I������
�3�5O�P�?�Q�?�
�����
�3�5O�P�>�Q�>�@1�
5�������1�3N�O�!(�P�!(�F������7�9Z�[�
�����j�1�3N�O�
�����X�.�0H�I�>�J�P�\�>������Y�/�1J�K�
�����W�-�/F�G�� � �"�E�#�H�L�E�4������3�5i�j�
�����_�5�7T�U��V�k�� �*�*�7�5�-�+H�+J�L��&�1�1�'�%�AT�2U�2U�W�������
�����(@�A�<�>�J�>��J��&I��&I�P�5��5�$�����
�����(?�@�-�P�&�Q��&��
*��
*��J��J�2�_�_�W�_�_�&B�C�
������G�+�->�?��@�D�������[�1�C�E�;�E�;�2H�$<�$<�$�����\�2�4L�M�0�N�0��#�#��"�"�)G�#�$�)GrIrc�`�\sQsQsn]s\Q2s\Q2s\O\
O\
O7Q2Q2s
\O\
O\
O7Q2Q2s\O\\
Q29%c\
O"\
O7Q	2\O$\O(Q
2Q22sQs\O\
O.\
O7Q
2Q2s\O\\Q2Q2Q2s\O\
O6\
O7Q2Q2s\O$\O:Q2\O\\
Q29%c\
O<\
O7Q2Q22s\O\
O@\
O7Q2Q2s!\O\\
Q29%c+\
OD\
O79%c
\\Q2Q2Q2s#\O\
OH\
O7Q2Q2s%\O\\
Q 29%c\
OL\
O7Q!2Q"2s'\O\
OP\
O7Q#2Q$2s)\O\
OT\
O7Q%2Q&2s+\O\
OX\
O7Q'2Q(2s-\O\\
Q)29%c\
O\\
O7Q*2Q+2s/Q,s0Us1P!)-�TestPosixDirFdiyc#�D �[9O]*
tm[OQUO0o[OQUOQ0o[O
U2UO
[OU2[OOV!2o[OOU2%cPg[OU29^tt^2oVAU1w�PPP2P!)%fhP!9h3h)rR�_�base)
rm�countrrrrKrrLrkr�r�r=�open_dir_fd)r"r:�base_dir�fullnamer�s&    r�prepare�TestPosixDirFd.prepare|s��������!���"�"�#�1�T�Z�Z�L�1���&�&�'�q�����D�9��
���H��������X�.��7�7�<�<��/���7�7�>�>�(�+�+�+�+�
�
"�
"�8�
,�
,����*�*�-�
,�
,�
,�s*�CD � D �:D�
D �D	�D	�	D c#� �UO29^tt^2vqo[OU2UO[O
U2VU1w�PPP2P!)%fhP!9h3hrv)rurr�rrr�r"r�r:rts&   r�prepare_file�TestPosixDirFd.prepare_file�sM���
�\�\�^�^�7��h��'�'��1��O�O�E�L�L�(�3���*�*��^�^�^�s#�A;�AA'�
A;�'A8	�0A8	�2	A;z)test needs dir_fd support for os.access()c
���UO29^tt^2vqoUO[OU[O
UQ52PPP2P!)%fhP!9h��r�)ryrwrrrkrrxs&   r�test_access_dir_fd�!TestPosixDirFd.test_access_dir_fd�sD��
�
�
�
 �
 �$<�V�8��O�O�E�L�L��r�w�w�v�F�G�!�
 �
 �
 �s�:A�A/	�'A/	z'test needs dir_fd support in os.chmod()c��UO29^tt^2vqo[OU[O2[OU[O[O
*UQ5[OU2oUO
UO[O*[O[O
*2PPP2P!)%fhP!9hr|)	ryrrFrvr�r�rBr��S_IRWXU)r"r�r:rt�ss&    r�test_chmod_dir_fd� TestPosixDirFd.test_chmod_dir_fd�s���
�
�
�
 �
 �$<�V�8��K�K��$�,�,�/��K�K��d�l�l�T�\�\�9�&�I��
�
�8�$�A����Q�Y�Y����5�!�\�\�D�L�L�8�
:�	!�
 �
 �
 �s�CC3�3D	�<D	r�z'test needs dir_fd support in os.chown()r�c	��UO29^tt^2vqo[OU[O2[O
2UQ5PPP2P!)%fhP!9hr|)ryrr�rkr3r.rxs&   r�test_chown_dir_fd� TestPosixDirFd.test_chown_dir_fd�sG���
�
�
 �
 �$<�V�8��K�K��b�i�i�k�2�9�9�;�v�F�!�
 �
 �
 �s�AA(�(A9	�1A9	c
�b`�UO29^tt^2vq4o[UQ29^tt^2oUOQ2PPP2UO[O
U2U1QkoUU2oUVCQ5o	UO
UUQ2UUQ21UU	Q2UU	Q212UUPQ5o	UO
UUQ2UUQ21UU	Q2UU	Q212UO[QV[O2Q5UO[QV[U2Q5UO[VQ	Q5Q
FDzo
UO[Q29^tt^2oUO[29^tt^2UQU
Q5PPP2PPP2UO
WO ["2J|	PPP2P!)%fhCK�9h)%fhKZ9h)%fhKe9h)%fhP!9h)r�z	testline
c�,:�[URU*2!rv)r5)�result�attr�prefixs&&�r�get�1TestPosixDirFd.check_statlike_dir_fd.<locals>.get�s����v�v��}�5�5rIr}r��inozshould be integer or None, notz!bool is used as a file descriptor�nonexistingl F�x:^V)FT)rurr�rrrrBrOr8r'rwr7r��assertWarnsRegexr r�filename�__file__)r"r�r�r�r:rt�outfiler��s1�s2r�r�s&&f         r�check_statlike_dir_fd�$TestPosixDirFd.check_statlike_dir_fd�s����
�\�\�^�^�7��h��h��$�$���
�
�l�+�%��O�O�E�L�L�(�3�
6��h��B��d�*�B����c�"�e�n�c�"�e�n�=�!�"�e�n�c�"�e�n�=�
?��h�t�,�B����c�"�e�n�c�"�e�n�=�!�"�e�n�c�"�e�n�=�
?�
�"�"�9�.N��u�|�|�~�
#�
7��"�"�9�.N��u�V�}�
#�
6����m��v�
�
/�"���*�*�>�;�=�=�@B��*�*�7�3�3��]�2�6�4�=�� � ����h�7�"�/�^�$�$�$��24�3��=�=��1�^�^�sk�H�G#	�D7H�<H

�G7�%H

�-,H�#G4
�,G4
�.	H�7H�H�H

�
H�H�H�H.	�&H.	z&test needs dir_fd support in os.stat()c�J�UO[OQQ5P!)�st_�r�)r�rrvr!s&r�test_stat_dir_fd�TestPosixDirFd.test_stat_dir_fd�s���"�"�5�:�:�e�"�<rIr�ztest needs os.statx()c�4�QoUOUQQ5P!)c�R�[OU[O1-U@!rv)rr�rk�	STATX_INOr�s&,rr��.TestPosixDirFd.test_statx_dir_fd.<locals>.func�s���;�;�t�R�\�\�<�V�<�<rI�stx_r�)r�r�s& r�test_statx_dir_fd� TestPosixDirFd.test_statx_dir_fd�s��	=��"�"�4��"�7rIz'test needs dir_fd support in os.utime()c
���UO29^tt^2vqo[O2o[OUPUQ5[OV!Q5UO	[
[OUVAQ5UO	[
[OUQUQ5UO	[
[OUUP1UQ5UO	[
[OUPU1UQ5UO	[
[OUUQ1UQ5[OU[
U2[
U21UQ5[OV$U1UQ5[OU[
U2[
U[
U2*
Q*21UQ5[OV![
U2[
U[
U2*
Q*21Q5[O[O7c[OUP
UQ5PPP2P![cKh9h)%fhP!9h)Nr}r�r#)r�r*)r.r�r$)
ryr%rr&r7r8r'rkrNr()r"r�r:rtr)s&    r�test_utime_dir_fd� TestPosixDirFd.test_utime_dir_fd�s���
�
�
�
 �
 �$<�V�8��)�)�+�C��K�K��d�6�2��K�K��,����i����d�!�
�
2����i����d�*�6�
�
;����i����d�"�D�k�&�
�
:����i����d�#�S�k�&�
�
:����i����d�"�C�j��
�
9��K�K��s�3�x��S��2�6�B��K�K��C�j��8��K�K����X�s�C�#�c�(�N�c�#9�:�;�F�
L��K�K��#&�s�8�S�#��C��.�C�1G�-H�"I�
K��x�x�2�6�6�6���K�K��e�F�K�1!�
 ��2"�����3!�
 �
 �s6�HI�"I�	I�I�I�I�I�I'	�I'	z5WASI: symlink following on path_link is not supportedraz&test needs dir_fd support in os.link()c�H�UO29^tt^2vqoUO29^tt^2vqEo[OV%VQ5UO
[OU2UO[OU2]*[OU2]*2PPP2PPP2P![c#oSOQS*2Po=K�Po=hh9h)%fhKJ9h)%fhP!9h)��
src_dir_fd�
dst_dir_fdzposix.link(): %s)
ryrurrar�r�rrrBrv)r"r�r:rt�dir_fd2�linkname�fulllinknamers&       r�test_link_dir_fd�TestPosixDirFd.test_link_dir_fd�s����
�
�
 �
 �$<�V�8�
�\�\�^�^�@��<�
6��
�
�4�f�Q�
�O�O�E�L�L�,�7����U�Z�Z��1�!�4��
�
�<�(��+�
-��!�
 ��#�
6��
�
�0�1�4�5�5��
6���^��!�
 �
 �s^�D�C=	�C
�A(C=	�;D�
	C:�C:�C5�0C=	�5C:�:C=	�=D

�D

�D�D!	�D!	z'test needs dir_fd support in os.mkdir()c��UO29^tt^2vqo[OV!Q5UO[OU2[O
U2PPP2P!)%fhP!9hr|)rurrKrrLrvrxs&   r�test_mkdir_dir_fd� TestPosixDirFd.test_mkdir_dir_fdsJ��
�\�\�^�^�7��h��K�K��,��O�O�E�K�K��2��J�J�x� ��^�^�^�s�AA5�5B	�>B	r�r�zAtest requires both stat.S_IFIFO and dir_fd support for os.mknod()c	��UO29^tt^2vqo[O[O*[O*o[
OV$]UQ5UO[
OU2UO[O[
OU2O22PPP2P![cToSOSO[O[O [O"12Po=KcPo=hh9h)%fhP!9h)rYr})rurvr�r�r�rr�rrrwr�r�rr�r
rr�r�)r"r�r:rtr�rs&     r�test_mknod_dir_fd� TestPosixDirFd.test_mknod_dir_fds����\�\�^�^�7��h��<�<�$�,�,�.����=�D�
M����D��&�9�������h�7�����
�
�e�j�j��.B�.J�.J� K�L��^���
R��
�
�a�g�g����U�\�\�5�<�<�'P�Q�Q��
R��	�^�^�sC�>E�C�2A#E�	D=�)D=�*A	D8�3E�8D=�=E�E	�	E	z&test needs dir_fd support in os.open()c	�@�UO29^tt^2vqo[UQ29^tt^2oUOQ2PPP2UO[O
U2[OU[OUQ5o[OU]	2oUOQU2[OU2PPP2P!)%fhK�9h[OS2h9h)%fhP!9h)rs	testline
r})
rurr�rrrr�r�rBr~)r"r�r:rtr�r�r�s&      r�test_open_dir_fd�TestPosixDirFd.test_open_dir_fds���
�\�\�^�^�7��h��h��%�%���
�
�m�,�&��O�O�E�L�L�(�3����D�%�.�.��@�B�
 ��j�j��Q�'��� � ���4����B���^�%�%�����B����^�^�sG�D�C	�AD�)C1�=D�C.
�'C.
�)D�1D	�	D�D	�D	�readlinkz*test needs dir_fd support in os.readlink()c	�4�UO29^tt^2vqo[OQU2UO[O
U2UO
[OV!Q5Q2PPP2P!)%fhP!9h�r�r})rurkr�rrrrBr�rxs&   r�test_readlink_dir_fd�#TestPosixDirFd.test_readlink_dir_fd's[���\�\�^�^�7��h��J�J�y�(�+��O�O�E�L�L�(�3����U�^�^�D�@�)�L��^�^�^���A"B�B	�B	z(test needs dir_fd support in os.rename()c�n�UO29^tt^2vqoUO29^tt^2vqEo[OV%VQ5[OU2[OVc2PPP2PPP2P!)%fhK9h)%fhP!9h)r�)ryrurr5rv)r"r�r:rtr��name2�	fullname2s&      r�test_rename_dir_fd�!TestPosixDirFd.test_rename_dir_fd/ss��
�
�
�
 �
 �$<�V�8�
�\�\�^�^�:��	��L�L��$*�
@��J�J�y�!��L�L��-�	�!�
 �
�^��!�
 �
 �s/�B#�AB	�>B#�B 
�B 
�B#�#B4	�,B4	z)test needs dir_fd support in os.symlink()c�4�UO29^tt^2vqo[OQV!Q5UO[OU2UO[OU2Q2PPP2P!)%fhP!9hr�)rurr�rrrBr�rxs&   r�test_symlink_dir_fd�"TestPosixDirFd.test_symlink_dir_fd8sY��
�\�\�^�^�7��h��M�M�)�T�9��O�O�E�L�L�(�3����U�^�^�H�5�y�A��^�^�^�r�z(test needs dir_fd support in os.unlink()c��UO29^tt^2vqo[OU2[OU2[O
V!Q5UO
[[OU2PPP2P!SO[O
S2g9h)%fhP!9hr|)	rurr�rrvrr7rrrxs&   r�test_unlink_dir_fd�!TestPosixDirFd.test_unlink_dir_fd?s���
�\�\�^�^�7��h��'�'��1��J�J�x� �
����T�1��!�!�'�5�:�:�x�@��^��
�������h�7����^�^�s#�0B8�<B�#B5�5B8�8C		�C		r�z(test needs dir_fd support in os.mkfifo()c	��UO29^tt^2vqo[OU[O[O
*UQ5UO[OU2UO[O[OU2O22PPP2P![c#oSOQS*2Po=K�Po=hh9h)%fhP!9h)r}r�)
rurr�rvr�r�r�r�rrrwr�r�)r"r�r:rtrs&    r�test_mkfifo_dir_fd�!TestPosixDirFd.test_mkfifo_dir_fdKs���
�\�\�^�^�7��h�
8����T�4�<�<�$�,�,�#>�v�N�
�O�O�E�L�L�(�3��O�O�D�M�M�%�*�*�X�*>�*F�*F�G�H�
�^��#�
8��
�
�2�Q�6�7�7��
8���^�^�sA�C8�<C�A#C8�	C5�C5�C0�+C8�0C5�5C8�8D		�D		r�)2rTrUrVrWrqrruryrorXrkr�supports_dir_fdr~rFr�r
r�r\rr�r�r�rvr�rr�r&r�r]rar�rKr�r�r�rr�r�r�r5r�r�r�rr�r�r�rhrirjs@rrmrmys�����
�E��	+��	+��+��+�������b�&8�&8�8�:e�f�H�g�H�������R�%7�%7�7�9b�c�:�d�:������W�-�R�R�2�8�8�r�?Q�?Q�3Q�B�D�
�_�_�W�*�*�,@�A�G�B�D�G�8�>������B�$6�$6�6�8`�a�=�b�=�������0�2I�J�8�K�8�
������R�%7�%7�7�9b�c��d��<�_�_����?�������F��=�=����2�+=�+=� =�0��
-�	�	�
-�������R�%7�%7�7�9b�c�!�d�!������W�-�6�6� �h�h�"�*<�*<�<�6�6�$�T�9�5�\�^�
M�	^�
M�������B�$6�$6�6�8`�a�
 �b�
 ������Z�0�X�X�b�k�k�R�EW�EW�6W�E�G�M�G�M�������b�&8�&8�8�:d�e�.�f�.�������r�'9�'9�9�;f�g�B�h�B�������b�&8�&8�8�:d�e�	�f�	������X�.�R�R�2�9�9��@R�@R�3R�T~��I�@�IrIrmc�`�\sQsQsnQsQs\O\\	Q2Q2Q2s
\O\\	Q2Q2Q	2sQ
sUs
P!)�PosixGroupsTesteriVc�J�[O2]6wc[OQ2g[	[Q2%f[OQ2g[
OQ6Xc[OQ2g[O2UmP!)rYznot enough privilegesr/zneed posix.getgroupsr�zgetgroups(2) is broken on OSX)	rr3rorpr
r�r
r/�saved_groupsr!s&rr#�PosixGroupsTester.setUpXsn���<�<�>�Q���#�#�$;�<�<��u�k�*�*��#�#�$:�;�;��<�<�8�#��#�#�$C�D�D�!�O�O�-��rIc�\�[[Q2%c#[OUO2P![[Q2%c][O
[O22Oo[OVO]*2P!P!)�	setgroupsrf)	r
rr�r�rlrgr3rmrf�r"r:s& r�tearDown�PosixGroupsTester.tearDownasf���5�+�&�&��O�O�D�-�-�.�
�U�L�
)�
)��<�<�����/�7�7�D����T�#4�#4�Q�#7�8�*rIrfztest needs posix.initgroups()c�2�[UO9%f],2]*o[O[O
22Oo[OV!2UOU[O22P!rX)
�maxr�rlrgrr3rmrfr�r/)r"r�r:s&  rrr�!PosixGroupsTester.test_initgroupshs`��

��!�!�(�(�a�S�)�A�-���|�|�E�L�L�N�+�3�3��
����!��
�
�a����*�+rIr�ztest needs posix.setgroups()c��],[[]221FD>o[OU2UO	U[O
22J@	P!rX)r�r�rr��assertListEqualr/)r"r�s& r�test_setgroups� PosixGroupsTester.test_setgroupsrs@���s�D��r��O�,�F��O�O�F�#�� � �����):�;�-rI)r�)rTrUrVrWr#r�rorXr
rrrr�rhrirjs@rr�r�Vse����.�9�������5�8�:�,�:�,�������4�7�9�<�9�<rIr�c�<`�\sQsQsn\O
QQQQ1sPsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQs\O(\\Q2Q2Q2sQsQs\O(\\Q2Q2Q2sQsQs\O<Q\2]]],,2Q2s \!\OD\OFOIQ&2Q2Q22s%\!\OD\OFOIQ&2Q2\OD\#OL2]*Q6H9%c7\'OP]2\'OR\'OT\'OV17Q2Q222s,Q s-Q!s.Q"s/Q#s0Q$s1Q%s2Us3P!)'�_PosixSpawnMixiniz�-I�-Sr�r�c�0�[OQQ,UN3!)r�r�)r�r��r"�argss&*r�python_args�_PosixSpawnMixin.python_argss������d�2�T�2�2rIc���[OoUO[OU2QU8Q0oUO	QU2oUOU]*U[O2o[OU]Q5[UQQ59^tt^2oUOUO2[U22PPP2P!)%fhP!9h)�2if 1:
            import os
            with open(zO, "w") as pidfile:
                pidfile.write(str(os.getpid()))
            r�r��utf-8��encoding)rrrrr��
spawn_funcrkr�rr�rrBr�r�)r"�pidfile�scriptr�r�rs&     r�test_returns_pid�!_PosixSpawnMixin.test_returns_pid�s����"�"�����	�(�(�'�2���k�"
���
����f�-���o�o�d�1�g�t�R�Z�Z�8�����S�1�-�
�'�G�
,�
,�����Q�V�V�X�s�3�x�0�-�
,�
,�
,�s� *C�C%	�C%	c�@�QoUOUU,[O2o[OU]2vq4UO	V22UOU]2P![[1c(oSO	SOS2Po=P!Po=hh9h)�no_such_executable)	r�rkr��waitpidrBr�FileNotFoundErrorr�r�)r"r�r��pid2�status�excs&     r�test_no_such_executable�(_PosixSpawnMixin.test_no_such_executable�s���1��	+��/�/�"4�#5�"6�"$�*�*�.�C��:�:�c�1�-�L�D����T�'������*��"�?�3�	?����S�\�\�+=�>�>��	?�s�"A%�%B�5B�6B�Bc���[OoUO[OU2QU8Q0oUO	QU2oUOU]*U-[OAQQ-A2o[OU]Q5[UQQ59^tt^2oUOUO2Q2PPP2P!)%fhP!9h)r�z^, "w", encoding="utf-8") as envfile:
                envfile.write(os.environ['foo'])
        r�ri�barr�r�r�)
rrrrr�r�rkr�rr�rrBr�)r"�envfiler�r�r�rs&     r�test_specify_environment�)_PosixSpawnMixin.test_specify_environment�s����"�"�����	�(�(�'�2���k�"	���
����f�-���o�o�d�1�g�t�:����:�U�E�:�<�����S�1�-�
�'�G�
,�
,�����Q�V�V�X�u�-�-�
,�
,�
,�s�&!C�C"	�C"	c��UOUO]*UO[OPQ5o[O
U]Q5P!�rY��file_actionsr��r��NOOP_PROGRAMrkr�rr��r"r�s& r�test_none_file_actions�'_PosixSpawnMixin.test_none_file_actions�sH���o�o����a� �����J�J��	�
��	���S�1�-rIc��UOUO]*UO[O,Q5o[O
U]Q5P!rrrs& r�test_empty_file_actions�(_PosixSpawnMixin.test_empty_file_actions�sH���o�o����a� �����J�J��	�
��	���S�1�-rIc��UO[O[OQQ,[OP
Q5o[
OU]Q5P!�r�r�)�resetidsr��r�r�r�rkr�rr�rs& r�test_resetids_explicit_default�/_PosixSpawnMixin.test_resetids_explicit_default�sF���o�o��N�N�
�^�^�T�6�*��J�J��	�
��	���S�1�-rIc��UO[O[OQQ,[OP	Q5o[
OU]Q5P!rrrs& r�
test_resetids�_PosixSpawnMixin.test_resetids�sF���o�o��N�N�
�^�^�T�6�*��J�J��	�
��	���S�1�-rIc���UO[O[OQQ,[O[O
2Q5o[OU]Q5P!)r�r���	setpgroupr�)r�r�r�rkr�r1rr�rs& r�test_setpgroup�_PosixSpawnMixin.test_setpgroup�sL���o�o��N�N�
�^�^�T�6�*��J�J��j�j�l�	�
��	���S�1�-rIc��UO]*UOq!UOV[OPQ5o[O
U]Q5P!)rYrr��rr�rkr�rr��r"r�r�r�s&   r�test_setpgroup_allow_none�*_PosixSpawnMixin.test_setpgroup_allow_none��B���&�&�q�)�4�+<�+<�d��o�o�d�"�*�*��o�E�����S�1�-rIc	��UO[29^tt^2UO[O[OQQ,[
OQQ5PPP2P!)%fhP!9h)r�r��023r)r7r8r�r�r�rkr�r!s&r�test_setpgroup_wrong_type�*_PosixSpawnMixin.test_setpgroup_wrong_type�sP��
�
�
�y�
)�
)��O�O�C�N�N� �^�^�T�6�:��J�J�%�
�
9�*�
)�
)�
)�s�AA,�,A=	�5A=	�pthread_sigmaskzneed signal.pthread_sigmask()c��[OQ2oUO[O[OQU,[
O[O,Q5o[OU]Q5P!)�I            import signal
            signal.raise_signal(signal.SIGUSR1)r���
setsigmaskr�)�textwrap�dedentr�r�r�rkr�rc�SIGUSR1rr�)r"r�r�s&  r�test_setsigmask� _PosixSpawnMixin.test_setsigmask�sd����� 3�4���o�o��N�N�
�^�^�T�4�(��J�J����'�	�
��	���S�1�-rIc
�:�UO[29^tt^2UO[O[OQQ,[
O]"Q5PPP2UO[29^tt^2UO[O[OQQ,[
OQ,Q5PPP2UO[29^tt^2UO[O[OQQ,[
O[O[O]*,Q5PPP2P!)%fhCK	9h)%fhK�9h)%fhP!9h)r�r�r(�j�
r7r8r�r�r�rkr�r(rc�NSIGr!s&r�test_setsigmask_wrong_type�+_PosixSpawnMixin.test_setsigmask_wrong_type�s��
�
�
�y�
)�
)��O�O�C�N�N� �^�^�T�6�:��J�J�2�
�
7�*��
�
�y�
)�
)��O�O�C�N�N� �^�^�T�6�:��J�J�C�5�
�
:�*��
�
�z�
*�
*��O�O�C�N�N� �^�^�T�6�:��J�J�F�K�K�4:�K�K��M�4C�
�
D�+�
*�*�
)�
)��*�
)��+�
*�
*��8�AE"�AE6�0A(F	�"E3	�+E3	�6F	�?F	�	F	�F	c�T�[O2vqUO[OU2[OUP	2[
OQUQ02oUO[O[OQU,[OP	Q5o[OU2[OW]Q5[O U]d2o[#U2o[O$[O&22oUO)V�2P![c oSOQS802Po=K�Po=h[c oSOQS802Po=K�Po=hh9h[OS2h9h)Tz0
                import os
                fd = z`
                sid = os.getsid(0)
                os.write(fd, str(sid).encode())
            r�)�setsidzsetsid is not supported: zsetsid failed with: r�)rkr"rr~�set_inheritabler*r+r�r�r�r�r�r�r�rr�r�r'�getsidr0r)	r"�rfd�wfdr�r�r��output�	child_sid�
parent_sids	&        r�test_setsid�_PosixSpawnMixin.test_setsid	s=���7�7�9���������#�&�	����s�D�)��?�?�(��U�
�$��D�
>��o�o�c�n�n�'*�~�~�t�T�&B�&(�j�j��&�?��
�H�H�S�M����S�1�-�����c�"����K�	��Y�Y�r�y�y�{�+�
����J�2��'�
C��
�
� 9�#��A�B�B��"�
>��
�
� 4�S�G�<�=�=��
>��
�H�H�S�M�sN�1F�,AD:�:	F�F�E�F�F�,F�-F�F�F�F�F'c�*�[O[O[O2o[OQ2oUO[O[OQU,[O[O,Q5o[O[OU2[OU[O'Q5P![O[OS2h9h)r'r���	setsigdefr�)rcr,�SIG_IGNr*r+r�r�r�rkr�rr�)r"�original_handlerr�r�s&   r�test_setsigdef�_PosixSpawnMixin.test_setsigdef(s���"�=�=�������H����� 3�4��	<��/�/��������t�,��
�
�!�>�>�*�	"��C�
�M�M�&�.�.�*:�;����S�F�N�N�?�;��
�M�M�&�.�.�*:�;�s
�AC+�+'Dc
�:�UO[29^tt^2UO[O[OQQ,[
O]"Q5PPP2UO[29^tt^2UO[O[OQQ,[
OQ,Q5PPP2UO[29^tt^2UO[O[OQQ,[
O[O[O]*,Q5PPP2P!)%fhCK	9h)%fhK�9h)%fhP!9h)r�r�rBr0r1r!s&r�test_setsigdef_wrong_type�*_PosixSpawnMixin.test_setsigdef_wrong_type;s
��
�
�
�y�
)�
)��O�O�C�N�N� �^�^�T�6�:��J�J�"�
�
6�*��
�
�y�
)�
)��O�O�C�N�N� �^�^�T�6�:��J�J�3�%�
�
9�*��
�
�z�
*�
*��O�O�C�N�N� �^�^�T�6�:��J�J�6�;�;����A�
�2N�
�
P�+�
*�*�
)�
)��*�
)��+�
*�
*�r5c��UO]*UOq!UOV[OPQ5o[O
U]Q5P!)rY��	schedulerr�rrs&   r�test_scheduler_allow_none�*_PosixSpawnMixin.test_scheduler_allow_noneIr rIrMc	��UO]*UOq2UO[Q29^tt^2UOV#[O
UQ5PPP2P!)%fhP!9h)rYz!scheduler must be a tuple or NonerL)rrOr8r�rkr�)r"rMr�r�s&&  r�test_scheduler_wrong_type�*_PosixSpawnMixin.test_scheduler_wrong_typeNs`���&�&�q�)�4�+<�+<�d�
�
#�
#��/�
�
�
�O�O�D��
�
�i�O�H�	
�
�
�
�s�#A+�+A<	�4A<	zbpo-34685: test can fail on BSDc	�z�[O]2o[OU2o[OQUQUQ02oUO[O[OQU,[OP[OU21Q5o[OU]Q5P!�rYzF            import os, sys
            if os.sched_getscheduler(0) != zV:
                sys.exit(101)
            if os.sched_getparam(0).sched_priority != z:
                sys.exit(102)r�rLr��rkr	r�r*r+r�r�r�r�r�rr��r"�policy�priorityr�r�s&    r�test_setscheduler_only_param�-_PosixSpawnMixin.test_setscheduler_only_paramWs����&�&�q�)���,�,�V�4�����$,�,2�8�47�7?�j�A�	 !�"���o�o��N�N�
�^�^�T�4�(��J�J��R�^�^�H�5�6�	�
��	���S�1�-rI�glibcz)Skip test due to glibc posix_spawn policyc	�z�[O]2o[OU2o[OQUQUQ02oUO[O[OQU,[OU[OU21Q5o[OU]Q5P!rTrUrVs&    r�test_setscheduler_with_policy�._PosixSpawnMixin.test_setscheduler_with_policyks����&�&�q�)���,�,�V�4�����$,�,2�8�47�7?�j�A�	 !�"���o�o��N�N�
�^�^�T�4�(��J�J��r�~�~�h�7�8�	�
��	���S�1�-rIc��[O][OO[2[O
]1[O]1[O]]1,oUOUO]*UO[OUQ5o[OU]Q5P!)rArr�)
rk�POSIX_SPAWN_OPENr��realpathr�r��POSIX_SPAWN_CLOSE�POSIX_SPAWN_DUP2r�rr�rr�)r"rr�s&  r�test_multiple_file_actions�+_PosixSpawnMixin.test_multiple_file_actions�s���
�
 �
 �!�R�W�W�%5�%5�h�%?����a�P�
�
!�
!�1�%�
�
 �
 �!�Q�'�
��
�o�o�d�/�/��2�"�/�/� �j�j�+7��9��	���S�1�-rIc�(�UOoUO[29^tt^2UOU]*U[O
P,Q5PPP2UO[29^tt^2UOU]*U[O
Q,Q5PPP2UO[29^tt^2UOU]*U[O
Q,Q5PPP2UO[29^tt^2UOU]*U[O
Q,Q5PPP2UO[29^tt^2UOU]*U[O
[O1,Q5PPP2UO[29^tt^2UOU]*U[O
[O]]1,Q5PPP2UO[29^tt^2UOU]*U[O
[OP1,Q5PPP2UO[29^tt^2UOU]*U[O
[O][Q*[O]1,Q5PPP2P!)%fhCK�9h)%fhCKi9h)%fhCK,9h)%fhCK�9h)%fhCK�9h)%fhCKU9h)%fhCK9h)%fhP!9h)rYrr<r�rv)i90)rr7r8r�rkr�rbr(r`r�r�r�s& r�test_bad_file_actions�&_PosixSpawnMixin.test_bad_file_actions�s���� � ��
�
�
�y�
)�
)��O�O�D��G�T�2�:�:�*.��
�
1�*��
�
�y�
)�
)��O�O�D��G�T�2�:�:�*,��
�
/�*��
�
�y�
)�
)��O�O�D��G�T�2�:�:�*1��
�
4�*��
�
�y�
)�
)��O�O�D��G�T�2�:�:�*2��
�
5�*��
�
�y�
)�
)��O�O�D��G�T�2�:�:�+-�+?�+?�*A�)B�
�
D�*��
�
�y�
)�
)��O�O�D��G�T�2�:�:�+-�+?�+?��A�*F�)G�
�
I�*��
�
�y�
)�
)��O�O�D��G�T�2�:�:�+-�+?�+?��*F�)G�
�
I�*��
�
�z�
*�
*��O�O�D��G�T�2�:�:�+-�+>�+>�+,�h��o�+-�;�;��+;�*<�
�
=�+�
*�+*�
)�
)��*�
)�
)��*�
)�
)��*�
)�
)��*�
)�
)��*�
)�
)��*�
)�
)��+�
*�
*�s��,K4�<,L�
,L�,L0�/;M�=M�1<M,�AN�4L	�=L	�L	�L	�L-	�%L-	�0M	�9M	�M	�
M	�M)	�!M)	�,M=	�5M=	�N	�	N	c��[OoUO[OU2Qo[O
]U[O[O*[O*[O[O*1,oUOQU2oUOU]*U[OUQ5o[O U]Q5[#UQQ59^tt^2oUO%UO'2Q2PPP2P!)%fhP!9h)�Oif 1:
            import sys
            sys.stdout.write("hello")
            r�rr�r�r��hello)rrrrrkr`r�r��O_TRUNCrvr�r�r�r�r�rr�rrBr�)r"r�r�rr�r�rs&      r�test_open_file�_PosixSpawnMixin.test_open_file�s����"�"�����	�(�(�'�2���
�
 �
 �!�W����b�j�j�(�2�:�:�5����t�|�|�+�
-�
��
����f�-���o�o�d�1�g�t�R�Z�Z�+7��9��	���S�1�-�
�'�G�
,�
,�����Q�V�V�X�w�/�-�
,�
,�
,�s�!D9�9E
	�E
	c��[OoUO[OU2QU8Q0oUO	QU2oUOU]*U[O[O]1,Q5o[OU]Q5[UQQ59^tt^2oUOUO2Q[O*2PPP2P!)%fhP!9h)z�if 1:
            import os
            try:
                os.fstat(0)
            except OSError as e:
                with open(zq, 'w', encoding='utf-8') as closefile:
                    closefile.write('is closed %d' % e.errno)
            r�rr�r�r�zis closed %d)rrrrr�r�rkr�rbrr�rrBr�r
r)r"�	closefiler�r�r�rs&     r�test_close_file� _PosixSpawnMixin.test_close_file�s����$�$�	����	�(�(�)�4��
%�-�(
�������f�-���o�o�d�1�g�t�R�Z�Z�-/�-A�-A�1�,E�+F��H��	���S�1�-�
�)�g�
.�
.�!����Q�V�V�X�~����'C�D�/�
.�
.�
.�s�36C3�3D	�<D	c	�\�[OoUO[OU2Qo[	UQ29^tt^2o[
OUO2]1,oUOQU2oUOU]*U[
OUQ5o[OU]Q5PPP2[	UQQ59^tt^2oUOUO2Q2PPP2P!)%fhKP9h)%fhP!9h)rjrr�rr�r�r�rk)rrrrrrkrcr}r�r�r�rr�rBr�)r"�dupfiler��	childfilerr�r�rs&       rr`�_PosixSpawnMixin.test_dup2�s����"�"�����	�(�(�'�2����'�4�
 �
 �I��$�$�i�&6�&6�&8�!�<��L��#�#�D�&�1�D��/�/�$�q�'�4����/;�"�=�C�� � ��q�1�!��'�G�
,�
,�����Q�V�V�X�w�/�-�
,�!�
 ��-�
,�
,�s%�A7D�!D�D	�D	�D+	�#D+	r�r�)4rTrUrVrWr�r�rr�r�r�r�r�rrrrrrr#rorXr
rcr-r3r?rFrIrNr�subTestsrjrQrfr\r
rrY�libc_verrkr	�SCHED_BATCH�
SCHED_IDLE�SCHED_DEADLINEr]rdrgrmrqr`rhrirjs@rr�r�zs������N�N�D�$��f�=�L��J�3�1�
+�
.�.�.�.�.�.�.�
9������):�;�:�<�.�<�.�
D�3�>�����):�;�8�:�<�:�<�"P�.�

���k�F�H�a�!�Q��#8�9�I�:�I��
�_�_�S�\�\�,�,�-B�C�6�8�.�8��.�"�
�_�_�S�\�\�,�,�-B�C�6�8�
�_�_�X�&�&�(��+�w�6�+�+��*�*�1�-�����
�
��)�)�2+�+�A�B�.�
B�8��.�"
.�=�:0�(E�&0�0rIr��posix_spawnztest needs os.posix_spawnc�,�\sQsQs\\QP2sQsP!)�TestPosixSpawni�r|r�)rTrUrVrWr5rr�rhr�rIrr~r~�s����
�t�4�JrIr~�posix_spawnpztest needs os.posix_spawnpc�Z`�\sQsQsn\\QP2s\OQ2s	Qs
UsP!)�TestPosixSpawnPi�rc��[O2oUO[OU2Qo[
OOV2o[
O[OU2[
OOU[
OQ*12oUQQQQ1o[OQU8Q02oQU1o[!UQU-P![cSoKCh9h)zposix_spawnp_test_program.exe�PATHr�r�r�r�zP
            import os
            from test import support

            args = zy
            pid = os.posix_spawnp(args[0], args, os.environ)

            support.wait_process(pid, exitcode=0)
        )�tempfile�mkdtemprrr�rkr�r�r�r�r��pathsepr�rnr*r+r)r"�temp_dir�program�program_fullpathr��
spawn_argsr�r�s&       r�test_posix_spawnp�!TestPosixSpawnP.test_posix_spawnp�s����#�#�%�����	�(�(�(�3�1���7�7�<�<��:��
�
�
�3�>�>�#3�4�	��:�:�?�?�H�b�j�j��.@�#A�B�D��t�T�4��8�
����� ����d�|���$�*�T�*��%�	��D�	�s�>6C(�(	C8�2C8�7C8r�)rTrUrVrWr5rr�rrbr�rhrirjs@rr�r��s-��������5�J��"�"�+�#�+rIr�r�ztest weak linking on macOSc�`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sQ
sQs
QsQ
sQsQsQsQsQsQsQsQsUsP!)�TestPosixWeaklinkingi	c���]PHo]PHoUO2oSTt.tFD-pDOQ2%fJV4*%fJ+UjJ/	toUm[
9PIc@,QUO2]*OQ22DMJ	3UmP!QUO2]*OQ222UmP!ttoh)rY�HAVE_c3�D�SF �Do[U2w�	J	P!3hrvr�)r��parts& rr��-TestPosixWeaklinking.setUp.<locals>.<genexpr>!	s��3S���3S�4�S��Y�Y�3S�r�r)r�r
�get_config_varsr�	availabler��mac_verr�)r"r�r
�config_vars�nms&    rr#�TestPosixWeaklinking.setUp	s������/�/�1��(3�c��"�}�}�W�7M�2�R]�Ra�Ra�2�2��c����u�T�8�3C�3C�3E�a�3H�3N�3N�s�3S�T�u�u���u�T�8�3C�3C�3E�a�3H�3N�3N�s�3S�T�T����ds�C�C�Cc�Z�VO7c[OUQ02gP!)z not weak-linked)r�rorpr�s&&r�_verify_available�&TestPosixWeaklinking._verify_available#	s*���~�~�%��#�#�t�f�,<�$=�>�>�&rIc��UOQ2UOQ6�c/UO[Q2UO[Q2P!UO	[Q2UO	[Q2P!)�HAVE_PWRITEVr�r�)r��)r�r�r�rk�assertNotHasAttrr!s&rr��!TestPosixWeaklinking.test_pwritev'	s^�����~�.��<�<�8�#����r�9�-����r�8�,�
�!�!�"�i�0��!�!�"�h�/rIc�v�UOQ2UOQ6�c#UOQ[O2P!UOQ[O2UO
[Q29^tt^2[OQ]Q5PPP2P!)%fhP!9h)�HAVE_FSTATAT�dir_fd unavailable�filer}�r�r�)
r�r�r�r�_have_functions�assertNotInrOr�rkrvr!s&rr��TestPosixWeaklinking.test_stat1	s{�����~�.��<�<�8�#��M�M�.�%�*?�*?�@�
���^�U�-B�-B�C��'�'�(;�=Q�R�R�����q�)�S�R�R�R���B'�'B8	�0B8	c���UOQ2UOQ6�c#UOQ[O2P!UOQ[O2P!)�HAVE_PTSNAME_R)r��
�)r�r�r�rr�r�r!s&r�test_ptsname_r�#TestPosixWeaklinking.test_ptsname_r<	sI�����/�0��<�<�;�&��M�M�*�E�,A�,A�B����-�u�/D�/D�ErIc��UOQ2UOQ6�c#UOQ[O2P!UOQ[O2UO
[Q29^tt^2[OQ[O]Q5PPP2UO
[Q29^tt^2[OQ[OP
Q5PPP2UO
[Q29^tt^2[OQ[OP	Q5PPP2P!)%fhK�9h)%fhKs9h)%fhP!9h)	�HAVE_FACCESSATr�r�r}zfollow_symlinks unavailabler-zeffective_ids unavailable)�
effective_idsr�)r�r�r�rr�r�rOr�rkrrr!s&rr� TestPosixWeaklinking.test_accessC	s�����/�0��<�<�8�#��M�M�*�E�,A�,A�B�
���-�u�/D�/D�E��'�'�(;�=Q�R�R��	�	�&�"�'�'�!�4�S��'�'�(;�=Z�[�[��	�	�&�"�'�'�5�A�\��'�'�(;�=X�Y�Y��	�	�&�"�'�'��>�Z�Y�
S�R��\�[��Z�Y�Y�s6�(E�(E%� (E8�E"	�E"	�%E5	�.E5	�8F		�F		c��UOQ2UOQ6�c#UOQ[O2P!UOQ[O2UOQ[O2UO
[Q29^tt^2[OQQ]Q5PPP2P!)%fhP!9h)�
HAVE_FCHMODAT�HAVE_LCHMODr�r��r}r�)
r�r�r�rr�r�rOr�rkrFr!s&r�
test_chmod�TestPosixWeaklinking.test_chmodT	s�������/��<�<�8�#��M�M�/�5�+@�+@�A�
���_�e�.C�.C�D��M�M�-��)>�)>�?��'�'�(;�=Q�R�R������q�1�S�R�R�R�s�$C�C	�C	c	��UOQ2UOQ6�c#UOQ[O2P!UOQ[O2UOQ[O2UO
[Q29^tt^2[OQ]]]Q5PPP2P!)%fhP!9h)�
HAVE_FCHOWNAT�HAVE_LCHOWNr�r�r}r�)
r�r�r�rr�r�rOr�rkr�r!s&rr��TestPosixWeaklinking.test_chown`	s�������/��<�<�8�#��M�M�/�5�+@�+@�A�
���_�e�.C�.C�D��M�M�-��)>�)>�?��'�'�(;�=Q�R�R������A�a�0�S�R�R�R�s�$C	�	C	�C	c
���UOQ2UOQ6�c#UOQ[O2P!UOQ[O2UO
[Q29^tt^2[OQQ]Q5PPP2UO
[Q29^tt^2[OQQ]Q5PPP2UO
[Q29^tt^2[OQQ]]Q5PPP2[O29^tt^2o[OOUQ2o[OOUQ2o[OOUQ2o[UQ	29^tt^2oUOQ
2PPP2[O QU2UO#[$29^tt^2[OVBP	Q5PPP2UO#[$29^tt^2[OVBP
Q5PPP2PPP2P!)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhK�9h)%fhK�9h)%fhK|9h)%fhP!9h)
�HAVE_LINKATzsrc_dir_fd unavailable�sourcerA�r�zdst_dir_fd unavailable�r�r�rar��datar-r�)r�r�r�rr�r�rOr�rkrarr�r�r�rr�r�r7�FileExistsError)r"r��	link_path�target_path�source_pathr�s&     r�	test_link�TestPosixWeaklinking.test_linkl	s������}�-��<�<�8�#��M�M�-��)>�)>�?�
���]�E�,A�,A�B��'�'�(;�=U�V�V�����(��:�W��'�'�(;�=U�V�V�����(��:�W��'�'�(;�=U�V�V�����(��a�H�W��#�#�%�%���G�G�L�L��F�;�	� �g�g�l�l�9�h�?�� �g�g�l�l�9�h�?���+�s�+�+�r��H�H�V�$�,��
�
�8�Y�/��&�&��7�7��G�G�K�D�I�8��&�&��7�7��G�G�K�E�J�8�#&�%�W�V�V��W�V�V��W�V�V��,�+��8�7��8�7��#&�%�%�s��I0�J�J�A5K%�9J,	�<K%�J?	� %K%�K	�K%�0J	�9J	�J	�
J	�J)	�!J)	�,J<
�5J<
�7K%�?K
�K
�
K%�K"
�K"
�K%�%K6	�.K6	c��UOQ2UOQ6�c#UOQ[O2P!UOQ[O2UO
[Q29^tt^2[O]2PPP2UO
[Q29^tt^2[O]2PPP2P!)%fhKO9h)%fhP!9h)�HAVE_FDOPENDIRzClistdir: path should be string, bytes, os.PathLike or None, not intzCscandir: path should be string, bytes, os.PathLike or None, not intr�)r�r�r�rr�r�rOr8rkr��scandirr!s&r�test_listdir_scandir�)TestPosixWeaklinking.test_listdir_scandir�	s������/�0��<�<�8�#��M�M�*�E�,A�,A�B�
���-�u�/D�/D�E��'�'�	�3x�y�y��
�
�1�
�z��'�'�	�3x�y�y��
�
�1�
�z�y�z�y��z�y�y�s$�C"�C5�"C2	�+C2	�5D	�>D	c�v�UOQ2UOQ6�c#UOQ[O2P!UOQ[O2UO
[Q29^tt^2[OQ]Q5PPP2P!)%fhP!9h)�HAVE_MKDIRATr��dirr}r�)
r�r�r�rr�r�rOr�rkrKr!s&r�
test_mkdir�TestPosixWeaklinking.test_mkdir�	s{�����~�.��<�<�8�#��M�M�.�%�*?�*?�@�
���^�U�-B�-B�C��'�'�(;�=Q�R�R�����q�)�S�R�R�R�r�c�v�UOQ2UOQ6�c#UOQ[O2P!UOQ[O2UO
[Q29^tt^2[OQ]Q5PPP2P!)%fhP!9h)�
HAVE_MKFIFOATr�r�r}�r�rY)
r�r�r�rr�r�rOr�rkr�r!s&rr�� TestPosixWeaklinking.test_mkfifo�	s{������/��<�<�7�"��M�M�/�5�+@�+@�A�
���_�e�.C�.C�D��'�'�(;�=Q�R�R��	�	�&��+�S�R�R�R�r�c�v�UOQ2UOQ6�c#UOQ[O2P!UOQ[O2UO
[Q29^tt^2[OQ]Q5PPP2P!)%fhP!9h)�HAVE_MKNODATr�r�r}r�)
r�r�r�rr�r�rOr�rkr�r!s&rr��TestPosixWeaklinking.test_mknod�	s{�����~�.��<�<�7�"��M�M�.�%�*?�*?�@�
���^�U�-B�-B�C��'�'�(;�=Q�R�R������*�S�R�R�R�r�c�j�UOQ2UOQ6�c#UOQ[O2P!UOQ[O2UO
[Q29^tt^2[OQQ]Q5PPP2UO
[Q29^tt^2[OQQ]Q5PPP2UO
[Q29^tt^2[OQQ]Q5PPP2UO
[Q29^tt^2[OQQ]Q5PPP2P!)%fhK�9h)%fhK�9h)%fhKx9h)%fhP!9h)�
HAVE_RENAMEATz%src_dir_fd and dst_dir_fd unavailable�a�br�r�r�)r�r�r�rr�r�rOr�rkr5rr!s&r�test_rename_replace�(TestPosixWeaklinking.test_rename_replace�	s(������/��<�<�8�#��M�M�/�5�+@�+@�A�
���_�e�.C�.C�D��'�'�(;�=d�e�e��	�	�#�s�q�1�f��'�'�(;�=d�e�e��	�	�#�s�q�1�f��'�'�(;�=d�e�e��
�
�3���2�f��'�'�(;�=d�e�e��
�
�3���2�f�e�f�e��f�e��f�e��f�e�e�sH�E(�E;�F�F!�(E8	�1E8	�;F	�F	�F	�F	�!F2	�*F2	c��UOQ2UOQ6�c#UOQ[O2P!UOQ[O2UO
[Q29^tt^2[OQ]Q5PPP2UO
[Q29^tt^2[OQ]Q5PPP2P!)%fhKQ9h)%fhP!9h)�
HAVE_UNLINKATr�r�r}r�)r�r�r�rr�r�rOr�rkrrLr!s&r�test_unlink_rmdir�&TestPosixWeaklinking.test_unlink_rmdir�	s�������/��<�<�8�#��M�M�/�5�+@�+@�A�
���_�e�.C�.C�D��'�'�(;�=Q�R�R��	�	�&��+�S��'�'�(;�=Q�R�R������*�S�R�S�R��S�R�R�s$�C&�C9�&C6	�/C6	�9D
	�D
	c��UOQ2UOQ6�c#UOQ[O2P!UOQ[O2UO
[Q29^tt^2[OQ[O]Q5PPP2P!)%fhP!9h)�HAVE_OPENATr�r�r}r�)r�r�r�rr�r�rOr�rkrr�r!s&r�	test_open�TestPosixWeaklinking.test_open�	s������}�-��<�<�8�#��M�M�-��)>�)>�?�
���]�E�,A�,A�B��'�'�(;�=Q�R�R��������A�6�S�R�R�R�s�(B6�6C	�?C	c�v�UOQ2UOQ6�c#UOQ[O2P!UOQ[O2UO
[Q29^tt^2[OQ]Q5PPP2P!)%fhP!9h)�HAVE_READLINKATr�r�r}r�)
r�r�r�rr�r�rOr�rkr�r!s&r�
test_readlink�"TestPosixWeaklinking.test_readlink�	s~�����0�1��<�<�8�#��M�M�+�U�-B�-B�C�
���.��0E�0E�F��'�'�(;�=Q�R�R����F�A�.�S�R�R�R�r�c�x�UOQ2UOQ6�c#UOQ[O2P!UOQ[O2UO
[Q29^tt^2[OQQ]Q5PPP2P!)%fhP!9h)�HAVE_SYMLINKATr�r�r�r}r�)
r�r�r�rr�r�rOr�rkr�r!s&r�test_symlink�!TestPosixWeaklinking.test_symlink�	s������/�0��<�<�8�#��M�M�*�E�,A�,A�B�
���-�u�/D�/D�E��'�'�(;�=Q�R�R��
�
�3��Q�/�S�R�R�R�s�B(�(B9	�1B9	c��UOQ2UOQ2UOQ6�cCUOQ[O2UOQ[O2P!UOQ[O2UOQ[O2UO
[Q29^tt^2[OQ]Q5PPP2P!)%fhP!9h)�
HAVE_FUTIMENS�HAVE_UTIMENSATr�r�r})r�r�)
r�r�r�rr�r�rOr�rkr&r!s&rr7�TestPosixWeaklinking.test_utime
s�������/����/�0��<�<�8�#��M�M�/�5�+@�+@�A��M�M�*�E�,A�,A�B�
���_�e�.C�.C�D����-�u�/D�/D�E��'�'�(;�=Q�R�R������*�S�R�R�R�s�C8�8D		�D		)r�r�)rTrUrVrWr#r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r�r�r7rhrirjs@rr�r�	sm����U�?�0�	*�F�?�"
2�
1�$K�N�	*�	,�	+�3�(+�	7�	/�	0�+�+rIr�c�,`�\sQsQsnQs\O\\Q2Q2\O\\Q2Q2\O\OOQ2Q2\O]]]2Q	2222s
Q
sUsP!)�NamespacesTestsi
z&Tests for os.unshare() and os.setns().�unsharezneeds os.unshare()�setnszneeds os.setns()z/proc/self/ns/utszneed /proc/self/ns/utsc�$�Qo[QU2P!)a�if 1:
            import errno
            import os
            import sys
            fd = os.open('/proc/self/ns/uts', os.O_RDONLY)
            try:
                original = os.readlink('/proc/self/ns/uts')
                try:
                    os.unshare(os.CLONE_NEWUTS)
                except OSError as e:
                    if e.errno == errno.ENOSPC:
                        # skip test if limit is exceeded
                        sys.exit()
                    raise
                new = os.readlink('/proc/self/ns/uts')
                if original == new:
                    raise Exception('os.unshare failed')
                os.setns(fd, os.CLONE_NEWUTS)
                restored = os.readlink('/proc/self/ns/uts')
                if original != restored:
                    raise Exception('os.setns failed')
            except PermissionError:
                # The calling process did not have the required privileges
                # for this operation
                pass
            except OSError as e:
                # Skip the test on these errors:
                # - ENOSYS: syscall not available
                # - EINVAL: kernel was not configured with the CONFIG_UTS_NS option
                # - ENOMEM: not enough memory
                if e.errno not in (errno.ENOSYS, errno.EINVAL, errno.ENOMEM):
                    raise
            finally:
                os.close(fd)
            r�rr�s& r�test_unshare_setns�"NamespacesTests.test_unshare_setns
s��
"��H	��t�$rIr�)rTrUrVrW�__doc__rorXr
rkr�r=rr^r�rhrirjs@rr�r�
s�����0�
�����Y�/�1E�F�
�����W�-�/A�B�
��������(;�<�>V�W��#�#�A�q�!�,�%%�-�X�C�G�%%rIr�c�2�[O2P!rv)r�
reap_childrenr�rIr�tearDownModulerC
s�����rI�__main__r�)6r�r�r�test.supportrrr�test.support.script_helperrrr
r�rcr%rkr
r�rvr�rorr*�
contextlibrr�ImportErrorrkrlr�r��
gettempdirrr�rX�maxsizer�r]r[rrf�TestCaserrmr�r�r
r_r~r�r�r�rrT�mainr�rIr�<module>r
sX����!�"�(�7���
�
��	��
������%����������h�1�1�3�'�.�.�1A�A�C���"�"��K�K�%��J�J��!6�!6�!I�!I�'�/�/�J�.���	��$�$�_�%6�8V�W��|G�(�#�#�|G�@2ZI�X�&�&�ZI�z!<��)�)�!<�Hk0�k0�\
���W�R��/�1L�M�����5�X�&�&�(8�5��N�5�
���W�R��0�2N�O�����!+�h�'�'�)9�!+��P�!+�H
���S�\�\�X�-�/K�L�|+�8�,�,�|+�M�|+�~,%�h�'�'�,%�^��z���M�M�O���[Q�����
��
�C��s0�I
�"I�
I�I�I�I,�%I,�+I,

Youez - 2016 - github.com/yon3zu
LinuXploit