File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/tests/tracing/eventpipe/userevents Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ public static int TestEntryPoint()
3434 string appBaseDir = AppContext . BaseDirectory ;
3535 string recordTracePath = Path . Combine ( appBaseDir , "record-trace" ) ;
3636 string scriptFilePath = Path . Combine ( appBaseDir , "dotnet-common.script" ) ;
37- string traceFilePath = Path . GetTempFileName ( ) ;
3837 const string userEventsDataPath = "/sys/kernel/tracing/user_events_data" ;
3938
4039 if ( ! File . Exists ( recordTracePath ) )
@@ -48,6 +47,10 @@ public static int TestEntryPoint()
4847 return - 1 ;
4948 }
5049
50+ string traceFilePath = Path . GetTempFileName ( ) ;
51+ File . Delete ( traceFilePath ) ; // record-trace requires the output file to not exist
52+ traceFilePath = Path . ChangeExtension ( traceFilePath , ".nettrace" ) ;
53+
5154 ProcessStartInfo recordTraceStartInfo = new ( ) ;
5255 recordTraceStartInfo . FileName = "sudo" ;
5356 recordTraceStartInfo . Arguments = $ "-n { recordTracePath } --script-file { scriptFilePath } --out { traceFilePath } ";
You can’t perform that action at this time.
0 commit comments