관리-도구
편집 파일: test_posix.cpython-311.pyc
� �܋f}B � �l � d Z ddlZddlZddlZddlZddlZddlZddlZddlZddlm Z ddlm Z ddlmZ ddlmZ ddlm Z ddlmZ dd lmZ dd lmZ ddlmZ ddlmZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ erddlZddlZddlmZ d#d�Zd� Z d� Z!d� Z"d� Z# ej$ e d� � G d� de� � � � Z% ej$ e d� � G d� de� � � � Z& ej$ e d� � G d� d e� � � � Z'e(d!k rdd"l)m*Z* e*e+� � dS dS )$zPOSIX specific tests.� N)�AIX)�BSD)�LINUX)�MACOS)�OPENBSD)�POSIX)�SUNOS)�HAS_NET_IO_COUNTERS)� PYTHON_EXE)�PsutilTestCase)�mock)�retry_on_failure)�sh)�skip_on_access_denied)�spawn_testproc)� terminate)�which)�getpagesizec �� � dg}t r|� d� � |�%|� dt |� � g� � n9t st r|� d� � n|� d� � t r%t d� � }|� | | � � } |� d| g� � t |� � }t r|� � � }n|� � � d d� }g }|D ]L}|� � � } t |� � }n# t $ r Y nw xY w|� |� � �M|�|S |d S )z| Wrapper for calling the ps command with a little bit of cross-platform support for a narrow range of features. �psz--no-headersNz-pz-A�ax)�command�comm�start�stimez-o� r ) r �append�extend�strr r �set�getr � splitlines�strip�int� ValueError)�fmt�pid�cmd�fmt_map�output� all_output�lines �j/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/psutil/tests/test_posix.pyr r - s� � � �&�C�� #�� � �>�"�"�"� ��� � �D�#�c�(�(�#�$�$�$�$�� �C� ��J�J�t������J�J�t����� $� �;�<�<���k�k�#�s�#�#���J�J��c�{���� ��W�W�F�� )��"�"�$�$����"�"�$�$�Q�R�R�(���J�� � ���z�z�|�|�� ��t�9�9�D�D��� � � ��D� ���� ���$����� �{����!�}�s �%D5�5 E�Ec �h � d}t rd}t || � � � � � d S )Nr r r )r r �split�r'