404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.143.24.92: ~ $
3

��X]'�@s�ddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z
ddlmZm
Z
ddlmZddlZejd�Zejd�ZGdd�d�Zejd	d
��Zejdd��Zd
d�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Z dd �Z!d!d"�Z"d#d$�Z#d%d&�Z$d'd(�Z%d)d*�Z&d+d,�Z'd-d.�Z(d/d0�Z)d1d2�Z*d3d4�Z+d5d6�Z,d7d8�Z-d9d:�Z.d;d<�Z/d=d>�Z0d?d@�Z1dAdB�Z2dS)C�)�print_functionN)�journal�id128)�
_make_lineZ 8441372f8dca4ca98694a6091fd8519fZ 8441370000000000000000001fd85000c@seZdZdd�Zddd�ZdS)�
MockSendercCs
g|_dS)N)�buf)�self�r	�$/usr/lib64/python3.6/test_journal.py�__init__szMockSender.__init__Nc	Ks�d|g}|dk	r,t|d|�}|jd|�||koH|koHdknrltjdd�ddd�\}}}|dk	r�|jd|�|dk	r�|jd	j|��|dk	r�|jd
|�|jdd�|j�D��|jj|�dS)
NzMESSAGE=�hexzMESSAGE_ID=�)�limitr�z
CODE_FILE=zCODE_LINE={:d}z
CODE_FUNC=css|]\}}t||�VqdS)N)r)�.0�key�valr	r	r
�	<genexpr>)sz"MockSender.send.<locals>.<genexpr>)�getattr�append�
_traceback�
extract_stack�format�extend�itemsr)	rZMESSAGE�
MESSAGE_IDZ	CODE_FILEZ	CODE_LINEZ	CODE_FUNC�kwargs�args�idr	r	r
�sends
"zMockSender.send)NNNN)�__name__�
__module__�__qualname__rrr	r	r	r
rsrccsJy
dVWn:ttfk
rD}z|j|kr2tj��WYdd}~XnXdS)N)�OSError�IOError�errno�pytest�skip)�code�er	r	r
�skip_oserror,s

r*ccs,y
dVWntk
r&tj�YnXdS)N)�
ValueErrorr&r'r	r	r	r
�skip_valueerror5s
r,cCstjj}dS)N)r�JournalHandlerZmap_priority)�pr	r	r
�test_priorities<sr/c
Cs.ddi}tjt��tjf|�WdQRXdS)Nz X  r)r&�raisesr+rr-)�kwr	r	r
�"test_journalhandler_init_exceptionQsr2cCsddd�}tjtjf|�dS)Nr�)�X�X3)rr-�logging�INFO)r1r	r	r
�test_journalhandler_initVs
r8cCsJtjdtjddddd�}t�}dd|jd�}tjtjf|�}|j|�dS)Nztest-logger�testpath��testrr3)r4r5�sender_function)r6�	LogRecordr7rrrr-�emit)�record�senderr1�handlerr	r	r
�test_journalhandler_infoZs
rBcCs>tjdtjddddd�}t�}tjtj|jd�}|j|�dS)Nztest-loggerr9r:r;)r<)r6r=r7rrr-rr>)r?r@rAr	r	r
�!test_journalhandler_no_message_ides

rCcCs@tjdtjddddd�}t�}tjtj|jtd�}|j|�dS)Nztest-loggerr9r:r;)r<r)	r6r=r7rrr-r�TEST_MIDr>)r?r@rAr	r	r
�)test_journalhandler_message_id_on_handlerms
rEcCsBtjdtjddddd�}t�}tjtj|jtjd�}|j	|�dS)Nztest-loggerr9r:r;)r<r)
r6r=r7rrr-rrDrr>)r?r@rAr	r	r
�-test_journalhandler_message_id_on_handler_hexvs

rFcCsJtjdtjddddd�}t|jd<t�}tjtj|jt	d�}|j
|�dS)Nztest-loggerr9r:r;r)r<r)r6r=r7�	TEST_MID2�__dict__rrr-rrDr>)r?r@rAr	r	r
�)test_journalhandler_message_id_on_messages

rIcCsLtjdtjddddd�}tj|jd<t�}tjtj|j	t
d�}|j|�dS)Nztest-loggerr9r:r;r)r<r)r6r=r7rGrrHrrr-rrDr>)r?r@rAr	r	r
�-test_journalhandler_message_id_on_message_hex�s
rJcCsRtj�}tjtj�}tjtj�}tjtj�}tjtjtjBtjB�}tjd�}dS)Nr)r�ReaderZ
LOCAL_ONLYZRUNTIME_ONLY�SYSTEM_ONLY)�j1�j2�j3Zj4Zj5Zj6r	r	r
�test_reader_init_flags�srPcCs�tjt��tjtj�WdQRXt��tj|jtjd�}WdQRXt��tj|jtjtjBd�}WdQRXtj|jtjtj	Bd�}dS)N)�path�flags)
r&r0r+rrKZOS_ROOTr,�strpath�CURRENT_USERrL)�tmpdirrMrNrOr	r	r
�test_reader_os_root�srVcCs>tj|jd�}tjd|jd�tj|jd�}tj|jd�dS)N)rQr)rrKrS)rUrMrNr	r	r
�test_reader_init_path�srWcCs(tjt��tjddd�WdQRXdS)Nrr:)rQ���)r&r0r#rrKr	r	r	r
� test_reader_init_path_invalid_fd�srYcCs(tjt��tjddd�WdQRXdS)Nr)rQ)r&r0r#rrKr	r	r	r
�%test_reader_init_path_nondirectory_fd�srZcCshtj|jtj�}ttj��tj|d�}WdQRXt	��tjtj
|d�}WdQRXtjtj|d�}dS)N)rQ)�os�openrS�O_RDONLYr*r%�ENOSYSrrKr,ZSYSTEMrT)rU�fdrMrNrOr	r	r
�test_reader_init_path_fd�sr`cCs@tj|jd�}|�WdQRXtjt��t|�WdQRXdS)N)rQ)rrKrSr&r0r#�next)rU�jr	r	r
�test_reader_as_cm�s

rcc	Cs<tj|jd�}|� |jtj�|jtjj�WdQRXdS)N)rQ)rrKrSZmessageid_matchrZSD_MESSAGE_JOURNAL_STARTZSD_MESSAGE_JOURNAL_STOPr)rUrbr	r	r
�test_reader_messageid_match�srdc	Cs@tj|jd�}|�$|j�|jt�|jtj�WdQRXdS)N)rQ)rrKrSZ	this_bootrDr)rUrbr	r	r
�test_reader_this_boot�s

rec	Cs@tj|jd�}|�$|j�|jt�|jtj�WdQRXdS)N)rQ)rrKrSZthis_machinerDr)rUrbr	r	r
�test_reader_this_machine�s

rfcCsBtj|jd�}|�&ttj��|jd�}WdQRXWdQRXdS)N)rQZFOOBAR)rrKrSr*r%r^Zquery_unique)rUrb�ansr	r	r
�test_reader_query_unique�s
rhcCs@tj|jd�}|�$ttj��|j�}WdQRXWdQRXdS)N)rQ)rrKrSr*r%r^Zenumerate_fields)rUrbrgr	r	r
�test_reader_enumerate_fields�s
ricCs@tj|jd�}|�$ttj��|j�}WdQRXWdQRXdS)N)rQ)rrKrSr*r%r^�has_runtime_files)rUrbrgr	r	r
�test_reader_has_runtime_files�s
rkcCs@tj|jd�}|�$ttj��|j�}WdQRXWdQRXdS)N)rQ)rrKrSr*r%r^rj)rUrbrgr	r	r
� test_reader_has_persistent_files�s
rlcCs8ddd�i}tj|j|d�}|jdd�}|jdd�}dS)NZxxxcSsdS)N�yyyr	)�argr	r	r
�<lambda>sz(test_reader_converters.<locals>.<lambda>)rQ�
converterssabcZzzzs��)rrKrSZ_convert_field)rUrprbrr	r	r
�test_reader_converters�s
rqcCsBdd�dd�d�}tj|j|d�}|jddddgdd	gd
��}dS)NcSsdS)Nrmr	)rnr	r	r
ro
sz+test_reader_convert_entry.<locals>.<lambda>cSsdS)NZYYYr	)rnr	r	r
ros)�x1�x2)rQrpsabcs��sdefs��)rrZy1rsZy2)rrKrSZ_convert_entry)rUrprbrr	r	r
�test_reader_convert_entry	srtcCsFtj|jd�}tj�}|j|�|jd�tjddd�}|j|�dS)N)rQi90i��r3)rrKrS�timeZ
seek_realtime�datetime)rUrbZnowZlong_agor	r	r
�test_seek_realtimes

rxcCs:ttj��tjd�}WdQRX|jd�}td|d�dS)Nztest_journal.pyzmessage...
zprinted message...)�file)r*r%�ENOENTr�stream�write�print)r{�resr	r	r
�test_journal_stream"s
r)3Z
__future__r�
contextlibrwr%r6r[rvZuuid�	tracebackrZsystemdrrZsystemd.journalrr&ZUUIDrDrGr�contextmanagerr*r,r/r2r8rBrCrErFrIrJrPrVrWrYrZr`rcrdrerfrhrirkrlrqrtrxrr	r	r	r
�<module>sV

			

	


Filemanager

Name Type Size Permission Actions
test_daemon.cpython-36.opt-1.pyc File 6.28 KB 0644
test_daemon.cpython-36.pyc File 8.57 KB 0644
test_journal.cpython-36.opt-1.pyc File 9.19 KB 0644
test_journal.cpython-36.pyc File 10.7 KB 0644
test_login.cpython-36.opt-1.pyc File 1.43 KB 0644
test_login.cpython-36.pyc File 1.56 KB 0644