HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/test/__pycache__/test_ioctl.cpython-310.opt-2.pyc
o

�i��@s2ddlZddlZddlmZddlmZddlZddlZed�Zed�Z	ee	d�ze
dd�ZWney<e�
d	��we�e�ee	jd
�ZWd�n1sRwYe�de�dZee��e�d�fvroe�
d��[[[zddlZWney�dZYnwGd
d�dej�Zedkr�e��dSdS)�N)�
get_attribute)�
import_module�fcntl�termios�	TIOCGPGRP�/dev/tty�rbzUnable to open /dev/tty�    �izBNeither the process group nor the session are attached to /dev/ttyc@s>eZdZdd�Zddd�Zdd�Zdd	�Zd
d�Zdd
�ZdS)�
IoctlTestscCsnt��t�d�f}tdd��}t�|tjd�}t�	d|�d}|�
||�Wd�dS1s0wYdS)Nrrrr	r
)�os�getpgrp�getsid�openr�ioctlrr�struct�unpack�assertIn)�self�ids�tty�r�rpgrp�r�,/usr/local/lib/python3.10/test/test_ioctl.py�
test_ioctls"�zIoctlTests.test_ioctlNc	Cs�t�d�}|j}t��t�d�f}d}|dur,|�|g||�|�t|�||�n|�|�t	dd��}t
�|tj
|d�}Wd�n1sJwY|d}|�|d�|�||�dS)Nr
ri���rrT)�array�itemsizerr
r�extendZassertEqual�len�appendrrrrrr)	r�nbytes�bufZintsizer�fillrrrrrr�_check_ioctl_mutate_len's

�z"IoctlTests._check_ioctl_mutate_lencCs|��dS�N�r$�rrrr�test_ioctl_mutate9szIoctlTests.test_ioctl_mutatecC�|�d�dS)Nir&r'rrr�test_ioctl_mutate_1024<sz!IoctlTests.test_ioctl_mutate_1024cCr))Nir&r'rrr�test_ioctl_mutate_2048Asz!IoctlTests.test_ioctl_mutate_2048c	Cs�tst�d��t��\}}zAtjdkrtj}tjd@}ntj}t�dt�dtj��\}t�ddddd�}t	�
|||�}t	�
|||�}Wt�|�t�|�dSt�|�t�|�w)	Nzpty module requiredrl��r
�IZHHHH�P�)
�pty�unittest�SkipTest�openptyrZ
TIOCSWINSZrr�packrrr�close)rZmfdZsfdZset_winsz_opcode_maybe_negZset_winsz_opcode_posZ	our_winszZ	new_winszrrr�%test_ioctl_signed_unsigned_code_paramEs$

�

�z0IoctlTests.test_ioctl_signed_unsigned_code_paramr%)	�__name__�
__module__�__qualname__rr$r(r*r+r5rrrrrs
	r�__main__)rr0Ztest.supportrZtest.support.import_helperrrrrrrr�OSErrorr1rrrrrr
rr/�ImportErrorZTestCaserr6�mainrrrr�<module>s:

��
�>�