Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.10/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.10/test/__pycache__/test_dtrace.cpython-310.pyc
o

�9j��@s�ddlZddlZddlZddlZddlZddlZddlZddlm	Z	dd�Z
dd�ZGdd�d�ZGd	d
�d
e�Z
Gdd�de�ZGd
d�d�ZGdd�deej�ZGdd�deej�ZGdd�deej�ZGdd�deej�Zedkrze��dSdS)�N)�findfilecCstj�t|dd��S)N�
dtracedata)�subdir)�os�path�abspathr)�filename�r	�'/usr/lib/python3.10/test/test_dtrace.pyrsrc	Cslt�dd|�}zdd�|��D�}|jdd�d�dd�|D�}d	�|�WSttfy5td
�|���w)aMNormalize DTrace output for comparison.

    DTrace keeps a per-CPU buffer, and when showing the fired probes, buffers
    are concatenated. So if the operating system moves our thread around, the
    straight result can be "non-causal". So we add timestamps to the probe
    firing, sort by that field, then strip it from the outputz\[[0-9]+ refs\]�cSs$g|]}|r|�d�s|�d��qS)�#�	)�
startswith�split��.0�rowr	r	r
�
<listcomp>s���z*normalize_trace_output.<locals>.<listcomp>cSst|d�S)Nr)�int)rr	r	r
�<lambda> sz(normalize_trace_output.<locals>.<lambda>)�keycSsg|]}|d�qS)�r	rr	r	r
r!s�
z%tracer produced unparsable output:
{})	�re�sub�
splitlines�sort�join�
IndexError�
ValueError�AssertionError�format)�output�resultr	r	r
�normalize_trace_outputs	���r$c@sHeZdZdZdZgZddd�Zddd�Zddd�Zddd	�Z	d
d�Z
dS)
�TraceBackendNcCsvt|jt||j�t|d�|d��}tt||jd���}|����}Wd�||fS1s2wY||fS)Nz.py)�script_file�python_file�optimize_pythonz	.expected)r$�trace_pythonr�	EXTENSION�open�read�rstrip)�self�namer(�
actual_output�f�expected_outputr	r	r
�run_case.s
�
��zTraceBackend.run_casecCs |j|g}|r|d|g7}|S)Nz-c)�COMMAND)r.r&�
subcommand�commandr	r	r
�generate_trace_command9sz#TraceBackend.generate_trace_commandcCs.|�||�}tj|tjtjdd���\}}|S)NT)�stdout�stderr�universal_newlines)r7�
subprocess�Popen�PIPE�STDOUT�communicate)r.r&r5r6r8�_r	r	r
�trace?s��zTraceBackend.tracecCs<g}|r|�dg|�d�tjg||g�}|�||�S)Nz-O� )�extendr�sys�
executablerA)r.r&r'r(�python_flagsr5r	r	r
r)Gs
zTraceBackend.trace_pythonc
Csxz|�td|j��}|��}Wntttfy)}z
t|�}WYd}~nd}~ww|dkr:t�	d�
|jd|���dS)N�
assert_usablezprobe: successz{}(1) failed: {}r)rArr*�strip�FileNotFoundError�NotADirectoryError�PermissionError�str�unittest�SkipTestr!r4)r.r"�fnfer	r	r
rGNs����zTraceBackend.assert_usable�N)�__name__�
__module__�__qualname__r*r4�COMMAND_ARGSr3r7rAr)rGr	r	r	r
r%)s



r%c@seZdZdZgd�ZdS)�
DTraceBackendz.d)�dtracez-qz-sN�rQrRrSr*r4r	r	r	r
rUZ�rUc@seZdZdZddgZdS)�SystemTapBackendz.stp�stapz-gNrWr	r	r	r
rY_rXrYc@sLeZdZdZdZdZedd��Zdd�Zdd�Z	d	d
�Z
dd�Zd
d�ZdS)�
TraceTestsNrcCs|j��dSrP)�backendrG�r.r	r	r
�
setUpClasslszTraceTests.setUpClasscCs&|jj||jd�\}}|�||�dS)N)r()r\r3r(�assertEqual)r.r/r0r2r	r	r
r3ps
�zTraceTests.run_casecC�|�d�dS)N�
call_stack�r3r]r	r	r
�test_function_entry_returnu�z%TraceTests.test_function_entry_returncsztgd��}ttd���}|���Wd�n1swY��fdd�}|d�D]}|�|j�q+��t�|�dS)z9Ensure our call stack test hits all function call opcodes)�
CALL_FUNCTION�CALL_FUNCTION_EX�CALL_FUNCTION_KWz
call_stack.pyNcsFt�dd�jd�}|jD]}t|tj�r |j|kr t�|�SqgS)Nz<string>�exec)�sourcer�mode�optimize)	�compiler(�	co_consts�
isinstance�types�CodeType�co_name�dis�get_instructions)�funcname�code�c��code_stringr.r	r
�get_function_instructions�s�
�zFTraceTests.test_verify_call_opcodes.<locals>.get_function_instructions�start)�setr+rr,�discard�opnamer_)r.�opcodesr1ry�instructionr	rwr
�test_verify_call_opcodesxs
�z#TraceTests.test_verify_call_opcodescCr`)N�gcrbr]r	r	r
�test_gc�rdzTraceTests.test_gccCr`)N�linerbr]r	r	r
�	test_line�rdzTraceTests.test_line)
rQrRrS�maxDiffr\r(�classmethodr^r3rcr�r�r�r	r	r	r
r[ds
r[c@�eZdZe�ZdZdS)�DTraceNormalTestsrN�rQrRrSrUr\r(r	r	r	r
r���r�c@r�)�DTraceOptimizedTests�Nr�r	r	r	r
r��r�r�c@r�)�SystemTapNormalTestsrN�rQrRrSrYr\r(r	r	r	r
r��r�r�c@r�)�SystemTapOptimizedTestsr�Nr�r	r	r	r
r��r�r��__main__)rr�os.pathrrr;rDrorM�test.supportrrr$r%rUrYr[�TestCaser�r�r�r�rQ�mainr	r	r	r
�<module>s*14�

Youez - 2016 - github.com/yon3zu
LinuXploit