[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.224.32.142: ~ $
�

2�Dg�����dZddlZddlmZddlmZddlmZddlmZddlZejed��Gd�d	e����Z	e
d
krddlmZee
��dSdS)zAIX specific tests.�N)�AIX)�PsutilTestCase)�sh)�unittestzAIX onlyc�,�eZdZd�Zd�Zd�Zd�Zd�ZdS)�AIXSpecificTestCasec��td��}d}d���D]}|d|�d�z
}�tj||��}|�|d��d}t|�d����|z}t|�d	����|z}t|�d
����|z}t|�d����|z}	tj��}
d|z|z}|�	|
j
|��|�|
j||�
��|�|
j
||�
��|�|
j|	|�
��dS)Nz/usr/bin/svmon -O unit=KBz	memory\s*z+size inuse free pin virtual available mmode�(?P<�>\S+)\s+z(svmon command returned unexpected outputi�size�	available�inuse�free���delta)r�split�re�search�assertIsNotNone�int�group�psutil�virtual_memory�assertEqual�total�assertAlmostEqual�usedr
r)�self�out�
re_pattern�field�matchobj�KBrr
rr�
psutil_result�TOLERANCE_SYS_MEMs            �w/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/psutil/tests/test_aix.py�test_virtual_memoryz'AIXSpecificTestCase.test_virtual_memorys����,�-�-��!�
�C�J�J�L�L�	7�	7�E��J�u�u�u�6�6�J�J��9�Z��-�-������@�	B�	B�	B����H�N�N�6�*�*�+�+�b�0������{�3�3�4�4�r�9�	��8�>�>�'�*�*�+�+�b�0���8�>�>�&�)�)�*�*�R�/���-�/�/�
�
��F�R�K������,�e�4�4�4�������,=�	�	?�	?�	?�����#�Y�6G�	�	I�	I�	I�������,=�	�	?�	?�	?�	?�	?�c�>�td��}tjd|��}|�|d��t	|�d����}d}t
j��}|�t	|j	|z��|��dS)Nz/usr/sbin/lsps -az=(?P<space>\S+)\s+(?P<vol>\S+)\s+(?P<vg>\S+)\s+(?P<size>\d+)MBz'lsps command returned unexpected outputri)
rrrrrrr�swap_memoryrr)rr r#�total_mb�MBr%s      r'�test_swap_memoryz$AIXSpecificTestCase.test_swap_memory5s����$�%�%��
�9�0�25�6�6��
	
����?�	A�	A�	A��x�~�~�f�-�-�.�.��
���*�,�,�
�	
����]�0�2�5�6�6��A�A�A�A�Ar)c���td��}d}d���D]}|d|�d�z
}�tj||��}|�|d��d}tj��}|�|jt|�
d����|�	��|�|jt|�
d
����|�	��|�|jt|�
d����|�	��|�|j
t|�
d����|�	��dS)
N�/usr/bin/mpstat -azALL\s*zfmin maj mpcs mpcr dev soft dec ph cs ics bound rq push S3pull S3grd S0rd S1rd S2rd S3rd S4rd S5rd syscr
rz)mpstat command returned unexpected outputi��csr�sysc�dev�soft)rrrrrr�	cpu_statsr�ctx_switchesrr�syscalls�
interrupts�soft_interrupts)rr r!r"r#�CPU_STATS_TOLERANCEr%s       r'�test_cpu_statsz"AIXSpecificTestCase.test_cpu_statsJs����%�&�&���
��#�e�g�g�	7�	7�E�
�J�u�u�u�6�6�J�J��9�Z��-�-������A�	C�	C�	C�#���(�*�*�
�����&�����t�$�$�%�%�%�	�	'�	'�	'�	
����"�����v�&�&�'�'�%�	�	'�	'�	'�	
����$�����u�%�%�&�&�%�	�	'�	'�	'�	
����)�����v�&�&�'�'�%�	�	'�	'�	'�	'�	'r)c���td��}ttjd|���d����}tjd���}|�||��dS)Nr0z
lcpu=(\d+)�T)�logical)rrrrrr�	cpu_countr)rr �mpstat_lcpu�psutil_lcpus    r'�test_cpu_count_logicalz*AIXSpecificTestCase.test_cpu_count_logicalksf���%�&�&���"�)�M�3�7�7�=�=�a�@�@�A�A���&�t�4�4�4������k�2�2�2�2�2r)c��td��}t|�����}ttj�������}|�||��dS)Nz/etc/ifconfig -l)r�setrr�net_if_addrs�keys�assertSetEqual)rr �ifconfig_names�psutil_namess    r'�test_net_if_addrs_namesz+AIXSpecificTestCase.test_net_if_addrs_namesqsc���#�$�$���S�Y�Y�[�[�)�)���6�.�0�0�5�5�7�7�8�8�����N�L�9�9�9�9�9r)N)�__name__�
__module__�__qualname__r(r.r;rBrJ�r)r'rrsc������?�?�?�<B�B�B�*'�'�'�B3�3�3�:�:�:�:�:r)r�__main__)�
run_from_name)�__doc__rrr�psutil.testsrrr�skipIfrrK�psutil.tests.runnerrP�__file__rNr)r'�<module>rVs�����	�	�	�	�������'�'�'�'�'�'�������!�!�!�!�!�!�
�
�
�
����S��*�%�%�`:�`:�`:�`:�`:�.�`:�`:�&�%�`:�F�z���1�1�1�1�1�1��M�(�������r)

Filemanager

Name Type Size Permission Actions
__init__.cpython-311.pyc File 88.05 KB 0644
__main__.cpython-311.pyc File 395 B 0644
runner.cpython-311.pyc File 19.78 KB 0644
test_aix.cpython-311.pyc File 6.38 KB 0644
test_bsd.cpython-311.pyc File 39.97 KB 0644
test_connections.cpython-311.pyc File 34.39 KB 0644
test_contracts.cpython-311.pyc File 52.41 KB 0644
test_linux.cpython-311.pyc File 154.4 KB 0644
test_memleaks.cpython-311.pyc File 37.53 KB 0644
test_misc.cpython-311.pyc File 51.58 KB 0644
test_osx.cpython-311.pyc File 13.74 KB 0644
test_posix.cpython-311.pyc File 25.72 KB 0644
test_process.cpython-311.pyc File 111.08 KB 0644
test_sunos.cpython-311.pyc File 2.78 KB 0644
test_system.cpython-311.pyc File 62.06 KB 0644
test_testutils.cpython-311.pyc File 34.2 KB 0644
test_unicode.cpython-311.pyc File 19.95 KB 0644
test_windows.cpython-311.pyc File 59.02 KB 0644