HEX
Server: Apache
System: Linux dinesh8189 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: cgmgerenciamento1 (814285)
PHP: 8.1.26
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //lib/python3.6/site-packages/tracer/tests/__pycache__/test_processes.cpython-36.pyc
3

�|
`�@s^ddlTddlmZmZmZddlmZddlZddlZGdd�de	j
�ZGdd	�d	e�ZdS)
�)�*�)�	Processes�Process�ProcessWrapper)�ProcessesCollectionNc@sPeZdZejdd�dd��Zejdd�dd��Zejdd�dd��Zd	d
�ZdS)�
TestProcessesTz%@TODO Create Mock for Processes classcCs>tj�d}|j�}|j|t�x|D]}|j|t�q&WdS)Nr)r�all�childrenZassertIsInstancerr)�self�processr
�child�r�$/usr/lib/python3.6/test_processes.py�
test_children
s

zTestProcesses.test_childrencCs|ttj��}ttj��}|j|ttj���|j||j��|j||j��tj�ttj��}|j	||�|j
||�dS)N)r�os�getpid�getppidZassertIs�parentZassertInr
Zreset_cache�assertEqualZassertIsNot)rrrZprocess2rrr�test_unique_processsz!TestProcesses.test_unique_processcCsdttj��}|j�tjtjjtjd�}|j	dt
|j���|j�|j	dt
|j���|j�dS)N)�stdinrr)
rrrr
�
subprocess�Popen�sys�
executable�PIPEr�lenZ
rebuild_cacheZ	terminate)rrr
rrr�test_process_caching!sz"TestProcesses.test_process_cachingcCs�t�}ddddddgd�|_|j�dks,t�t�}ddddd	d
ddgd�|_|j�d
ks\t�t�}dddgd�|_|j�dks�t�dS)NZsshdz/usr/sbin/sshdz-DZfooZbar)�nameZexeZcmdlineZsome�thing�andZ	argumentsZidkZwhatzssh-thing-sessionZ
withoutparams)�ProcessMock�datar�AssertionError)rZp1Zp2Zp3rrr�test_name_sshd0szTestProcesses.test_name_sshdN)	�__name__�
__module__�__qualname__�unittestZskipIfrrrr%rrrrrs	rc@seZdZdd�Zdd�ZdS)r"cCs
i|_dS)N)r#)rrrr�__init__EszProcessMock.__init__cCs
|j|S)N)r#)rrrrr�_attrHszProcessMock._attrN)r&r'r(r*r+rrrrr"Dsr")
Z__meta__Ztracer.resources.processesrrrZtracer.resources.collectionsrrrr)ZTestCaserr"rrrr�<module>s<