@@ -71,6 +71,10 @@ def _configure_traffic_server(self, tr: 'TestRun'):
7171 self ._ts .addDefaultSSLFiles ()
7272 self ._ts .Disk .records_config .update (
7373 '''
74+ diags:
75+ debug:
76+ enabled: 1
77+ tags: vv_quic|v_quic
7478 quic:
7579 no_activity_timeout_in: 3000
7680 ''' )
@@ -104,12 +108,22 @@ def test(self):
104108 quiche_qlog_Test .client_counter += 1
105109 tr .Processes .Default .ReturnCode = 0
106110
107- # Check for the qlog file. If requested then the file should be present.
108- # If not, then we expect the `ls` to return an error .
111+ # If requested we will copy the file to a known name as the runtime name is not know
112+ # by the test. So we will rename them all and grab the first one for validation .
109113 test_run = Test .AddTestRun (f"{ self ._name } : check qlog files" )
110- qlog_file = f'{ os .path .join (self ._ts .Variables .LOGDIR , "test_qlog" )} -*.sqlog'
111- test_run .Processes .Default .Command = f"sleep 5; ls -la { qlog_file } "
112- test_run .Processes .Default .ReturnCode = 0 if self ._generate_qlog else 2
114+ qlog_base_name = "test_qlog"
115+ rename_script = os .path .join (Test .TestDirectory , 'rename_qlog.sh' )
116+ test_run .Processes .Default .Command = f'sleep 5; bash { rename_script } { self ._ts .Variables .LOGDIR } { qlog_base_name } '
117+ test_run .Processes .Default .ReturnCode = 0 if self ._generate_qlog else 2 # exit 2 is what we want if no qlog was generated.
118+
119+ # Basic valdation
120+ if self ._generate_qlog :
121+ tr = Test .AddTestRun ("Check qlog content" )
122+ file = os .path .join (self ._ts .Variables .LOGDIR , "1.sqlog" )
123+ f = tr .Disk .File (file )
124+ tr .Processes .Default .Command = "echo 0"
125+ tr .Processes .Default .ReturnCode = 0
126+ f .Content = Testers .IncludesExpression ('"title":"Apache Traffic Server"' , 'Should include this basic text' )
113127
114128
115129quiche_qlog_Test ("Generate qlog test" ).with_qlogs ().test ()
0 commit comments