Lines Matching refs:filename

14     def __init__(self, filename, msg):  argument
24 def load_file(filename): argument
26 with open(filename, 'r') as fi:
29 raise Unexpected(filename, "expected JSON-SEQ leader")
41 def check_header(filename, hdr): argument
43 raise Unexpected(filename, "must have qlog_format in header line")
46 raise Unexpected(filename, "must have qlog_version in header line")
49 raise Unexpected(filename, "must have trace in header line")
53 raise Unexpected(filename, "must have common_fields in header line")
56 raise Unexpected(filename, "must have vantage_point in header line")
59 raise Unexpected(filename, "unexpected vantage_point")
63 raise Unexpected(filename, "expected vantage_point name")
66 raise Unexpected(filename, "expected correct vantage_point format")
70 raise Unexpected(filename, "must have expected time_format")
73 raise Unexpected(filename, "must have expected protocol_type")
76 raise Unexpected(filename, "unexpected qlog_format")
79 raise Unexpected(filename, "unexpected qlog_version")
81 def check_event(filename, event): argument
85 raise Unexpected(filename, "expected event to have name")
91 raise Unexpected(filename, "expected event to have time")
95 raise Unexpected(filename, "expected event to have data")
98 raise Unexpected(filename, "event must not be header line")
101 check_packet_header(filename, event, data.get('header'))
105 raise Unexpected(filename, "datagram ID must be integer")
108 check_frame(filename, event, frame)
110 def check_packet_header(filename, event, header): argument
112 raise Unexpected(filename, "expected object for packet header")
127 raise Unexpected(filename, f"unexpected packet type: {packet_type}")
130 raise Unexpected(filename, "expected packet event to have DCID")
132 raise Unexpected(filename, "expected packet event to have SCID")
135 raise Unexpected(filename, "expected packet event to have datagram ID")
139 raise Unexpected(filename, f"expected packet event to have packet number")
141 raise Unexpected(filename, "expected packet event to have frames")
143 def check_frame(filename, event, frame): argument
146 raise Unexpected(filename, "frame must have frame_type field")
154 def check_file(filename): argument
155 objs = load_file(filename)
157 raise Unexpected(filename, "must have at least two objects")
159 check_header(filename, objs[0])
161 check_event(filename, event)
168 for filename in glob.glob(os.path.join(qlogdir, '*.sqlog')):
169 check_file(filename)