Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.147.61.28
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_ioctl.cpython-310.pyc
o

`b��@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�8/usr/local/python-3.10/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:

��
�>�
© 2025 GrazzMean