403 Forbidden


Disable Functions:
Path : /usr/libexec/perf-core/tests/
File Upload :
Command :
Current File : //usr/libexec/perf-core/tests/attr.pyc

�
G��dc@sddlZddlZddlZddlZddlZddlZddlZddlZd�Zde	fd��YZ
de	fd��YZde	fd��YZd	e
fd
��YZdefd��YZd
�Zd�ZdejdZd�Zedkre�ndS(i����NcCsp|jd�}|jd�}xK|D]C}x:|D]2}||krHtS|dks`|dkr2tSq2Wq%WtS(Nt|t*(tsplittTruetFalse(tatbta_listtb_listta_itemtb_item((s$/usr/libexec/perf-core/tests/attr.pyt
data_equals

tFailcBseZd�Zd�ZRS(cCs||_||_dS(N(tmsgttest(tselfRR
((s$/usr/libexec/perf-core/tests/attr.pyt__init__s	cCsd|jj|jfS(Ns	'%s' - %s(RtpathR
(R((s$/usr/libexec/perf-core/tests/attr.pytgetMsgs(t__name__t
__module__RR(((s$/usr/libexec/perf-core/tests/attr.pyRs	tNotestcBseZd�Zd�ZRS(cCs||_||_dS(N(tarchR(RRR((s$/usr/libexec/perf-core/tests/attr.pyR"s	cCsd|j|jjfS(Ns	[%s] '%s'(RRR(R((s$/usr/libexec/perf-core/tests/attr.pyR%s(RRRR(((s$/usr/libexec/perf-core/tests/attr.pyR!s	tUnsupcBseZd�Zd�ZRS(cCs
||_dS(N(R(RR((s$/usr/libexec/perf-core/tests/attr.pyR)scCsd|jjS(Ns'%s'(RR(R((s$/usr/libexec/perf-core/tests/attr.pyR+s(RRRR(((s$/usr/libexec/perf-core/tests/attr.pyR(s	tEventc%Bs�eZdddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$g%Zd%�Zd&�Zd'�Zd(�Zd)�ZRS(*tcputflagsttypetsizetconfigt
sample_periodtsample_typetread_formattdisabledtinherittpinnedt	exclusivetexclude_usertexclude_kernelt
exclude_hvtexclude_idletmmaptcommtfreqtinherit_stattenable_on_execttaskt	watermarkt
precise_ipt	mmap_datat
sample_id_alltexclude_hostt
exclude_guesttexclude_callchain_kerneltexclude_callchain_usert
wakeup_eventstbp_typetconfig1tconfig2tbranch_sample_typetsample_regs_usertsample_stack_usercCs<x5|D]-\}}tjd||f�|||<qWdS(Ns
      %s = %s(tlogtdebug(Rtdatatkeytval((s$/usr/libexec/perf-core/tests/attr.pytaddWscCsAtjd|�||_d|_|j|�|j|�dS(Ns    Event %st(R>R?tnametgroupRC(RRER@tbase((s$/usr/libexec/perf-core/tests/attr.pyR\s
		
cCsyxrtjD]g}tjd|||||f�|j|�sR|j|�rVtSt||||�s
tSq
WtS(Ns      [%s] %s %s(RttermsR>R?thas_keyRRR(Rtothertt((s$/usr/libexec/perf-core/tests/attr.pytequalcs" cCs'|jd�r#|ddkr#tStS(Ntoptionalt1(RIRR(R((s$/usr/libexec/perf-core/tests/attr.pyRMlscCszxstjD]h}|j|�s
|j|�r6q
nt||||�s
tjd|||||f�q
q
WdS(Nsexpected %s=%s, got %s(RRHRIRR>twarning(RRJRK((s$/usr/libexec/perf-core/tests/attr.pytdiffqs
 (RRRHRCRRLRMRP(((s$/usr/libexec/perf-core/tests/attr.pyR.sT						tTestcBsPeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(cCstj�}|j|�tjd|�||_|j|_|j|_|jdd�|_	|jdd�|_
y|jdd�|_Wnd|_nXy-|jdd�|_tjd|j�Wnd	|_nXi|_
i|_tjd
�|j||j
�dS(Nsrunning '%s'RtcommandtargstretiRstest limitation '%s'RDs  loading expected events(tConfigParsertSafeConfigParsertreadR>RORttest_dirtperftgetRRRSRTRtexpecttresultR?tload_events(RRtoptionstparser((s$/usr/libexec/perf-core/tests/attr.pyR�s*
	

		
cCs!|jd�dkrtStSdS(Nteventi����(tfindRR(RRE((s$/usr/libexec/perf-core/tests/attr.pytis_event�scCs�|jdkrtS|jjd�}|dddkr�|dd|d<tjd|�x|D]}||krctSqcWtSx|D]}||kr�tSq�WtS(NRDt,it!isexcluded architecture list %s(RRRR>ROR(Rtmyarcht	arch_listt	arch_item((s$/usr/libexec/perf-core/tests/attr.pyt	skip_test�s

c
Cs�tj�}|j|�x�t|j|j��D]�}|j|�}i}d|kr�||jd�d}tj�}|j|jd|�|jd�}nt	|||�}	|	||<q2WdS(Nt:it/R`(
RURVRWtfilterRbtsectionstitemstindexRXR(
RRteventstparser_eventtsectiontparser_itemst
base_itemsRGtparser_basete((s$/usr/libexec/perf-core/tests/attr.pyR]�s
c	Cs�tj�\}}}}}|j|�r<t||��nd||j|j||jf}tjtj|��}t	j
d|t|�t|j�f�t
t|�t|j��s�t|��ndS(Ns*PERF_TEST_ATTR=%s %s %s -o %s/perf.data %ss  '%s' ret '%s', expected '%s'(tostunameRhRRYRRRStWEXITSTATUStsystemR>tinfotstrRTRR(	Rttempdirtjunk1tjunk2tjunk3tjunk4RetcmdRT((s$/usr/libexec/perf-core/tests/attr.pytrun_cmd�s)cCs�i}tjd�x |j�D]\}}g}i}tjd|�xd|j�D]V\}}tjd|�|j|�r�|j|�tjd�qVtjd�qVWtjd|t|�f�|s(|j�r�tjd|�q(|s	tjd�n
|j|�t|d	��n|||<q Wx�|j�D]�\}}|j	}	|	d
krjqCnxb||D]V}||j	}
|
||	kr�t|d��ntjd|t||	�f�quWqCWtjd
�dS(Ns	  compares    matching [%s]s
      to [%s]s    ->OKs
    ->FAILs    match: [%s] matches %ss&    %s does not match, but is optionals    res_event is emptys
match failureRDs
group failures'    group: [%s] matches group leader %ss	  matched(
R>R?RmRLtappendR{RMRPRRF(RR[R\tmatchtexp_namet	exp_eventtexp_listt	res_eventtres_nameRFt	res_group((s$/usr/libexec/perf-core/tests/attr.pytcompare�s@


	
	 cCs�x�|j�D]y\}}|d}|dkr5q
nxN|j�D]@\}}|d|krB||_tjd||f�PqBqBWq
WdS(Ntgroup_fds-1tfds[%s] has group leader [%s](RmRFR>R?(RRoRER`R�tinametievent((s$/usr/libexec/perf-core/tests/attr.pytresolve_groupss
	cCs�tj�}z�|j|�tjd�x.tj|d�D]}|j||j�q=W|j|j	�|j|j�|j
|j	|j�|j
|j|j	�Wdtj|�XdS(Ns  loading result eventss/event*(
ttempfiletmkdtempR�R>R?tglobR]R\R�R[R�tshutiltrmtree(RR|tf((s$/usr/libexec/perf-core/tests/attr.pytrun's

(
RRRRbRhR]R�R�R�R�(((s$/usr/libexec/perf-core/tests/attr.pyRQ�s						4	cCs�x�tj|jd|j�D]s}yt||�j�Wqtk
rg}tjd|j��qt	k
r�}tjd|j��qXqWdS(NRjs
unsupp  %ss
skipped %s(
R�RXRRQR�RR>RORR(R^R�tobj((s$/usr/libexec/perf-core/tests/attr.pyt	run_tests@s$cCs�tj}|dkr!tj}n|dkr9tj}n|dkrQtj}ntjd�atj|�tj�}|j|�tj	d�}|j
|�tj|�dS(NiiiRs%(message)s(tloggingtCRITICALtWARNINGtINFOtDEBUGt	getLoggerR>tsetLevelt
StreamHandlert	FormattertsetFormattert
addHandler(tverbosetleveltcht	formatter((s$/usr/libexec/perf-core/tests/attr.pyt	setup_logIs	


sm%s [OPTIONS]
  -d dir  # tests dir
  -p path # perf binary
  -t test # single test
  -v      # verbose level
ic	Cs[tjdt�}|jdddddddd	�|jd
ddddddd�|jd
ddddddd�|jdddddd�|j�\}}|r�|jddj|��dSt|j�|j	s�dGHt
jd�n|js
d|_nyt
|�Wn/tk
rI}d|j�GHt
jd�nXt
jd�dS(Ntusages-ts--testtactiontstoreRtstringtdestRs-ds
--test-dirRXs-ps--perfRYs-vs	--verbosetcountR�sFAILED wrong arguments %st i����sFAILED no -d option specifiedstest*s	FAILED %si(toptparsetOptionParsertUSAGEt
add_optiont
parse_argsterrortjoinR�R�RXtsystexitRR�RR(R_R^RSR�((s$/usr/libexec/perf-core/tests/attr.pytmaincs2

		t__main__(RvR�R�R�R�R�R�RURt	ExceptionRRRtdictRtobjectRQR�R�targvR�R�R(((s$/usr/libexec/perf-core/tests/attr.pyt<module>s&	X�				#

404 Not Found
[ LogOut ]