Skip to content

Runtime test output transcripts in the xml result files use excessive escaping rendering them basically unreadable #92092

Closed

Description

@trylek

The result xml file generated by the new-style merged test wrappers includes stdout / stderr transcript for each test. I believe @jkoritzinsky initially implemented this functionality with the aim to help developers directly see the output transcript from the tests as an aid in issue investigation. At some point we modified this logic so that the output transcript is so heavily escaped it's basically unreadable, e.g. here:

<test name="readytorun\determinism\crossgen2determinism\crossgen2determinism.cmd" type="OutOfProcessTest" method="readytorun\determinism\crossgen2determinism\crossgen2determinism.cmd" time="11.268134" result="Pass">
<output>
<![CDATA[ _x000D__x000A_Return_x0020_code:_x0020__x0020__x0020__x0020__x0020__x0020_0_x000D__x000A_Raw_x0020_output_x0020_file:_x0020__x0020__x0020__x0020__x0020__x0020_D:_x005C_git_x005C_runtime3_x005C_artifacts_x005C_tests_x005C_coreclr_x005C_windows.x64.Checked_x005C_readytorun_x005C_determinism_x005C_crossgen2determinism_x005C_output.txt_x000D__x000A_Raw_x0020_output:_x000D__x000A_BEGIN_x0020_EXECUTION_x000D__x000A__x000D__x000A_D:_x005C_git_x005C_runtime3_x005C_artifacts_x005C_tests_x005C_coreclr_x005C_windows.x64.Checked_x005C_readytorun_x005C_determinism_x005C_crossgen2determinism_x003E_set_x0020_DOTNETCLI_x003D_D:_x005C_git_x005C_runtime3_x005C_dotnet.cmd_x0020__x000D__x000A_Emitting_x0020_R2R_x0020_PE_x0020_file:_x0020_crossgen2smoke1.ildll_x000D__x000A_Emitting_x0020_map_x0020_file:_x0020_crossgen2smoke1.map_x000D__x000A_Emitting_x0020_R2R_x0020_PE_x0020_file:_x0020_crossgen2smoke2.ildll_x000D__x000A_Emitting_x0020_map_x0020_file:x0020_crossgen2smoke2.map_x000D__x000A__x0020__x0022_D:x005C_git_x005C_runtime3_x005C_artifacts_x005C_tests_x005C_coreclr_x005C_windows.x64.Checked_x005C_Tests_x005C_Core_Root_x005C_corerun.exe_x0022__x0020-p_x0020__x0022_System.Reflection.Metadata.MetadataUpdater.IsSupported_x003D_false_x0022__x0020-p_x0020__x0022_System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization_x003D_true_x0022__x0020__x0020_crossgen2determinism.dll_x0020__x000D__x000A_Files_x0020_of_x0020_length_x0020_139264_x0020_were_x0020_identical._x000D__x000A_Expected:_x0020_100_x000D__x000A_Actual:x0020_100_x000D__x000A_END_x0020_EXECUTION_x0020-x0020_PASSED_x000D__x000A_PASSED_x000D__x000A_Test_x0020_Harness_x0020_Exitcode_x0020_is_x0020:_x0020_0_x000D__x000A_To_x0020_run_x0020_the_x0020_test:_x000D__x000A_Set_x0020_up_x0020_CORE_ROOT_x0020_and_x0020_run._x000D__x000A__x003E__x0020_D:x005C_git_x005C_runtime3_x005C_artifacts_x005C_tests_x005C_coreclr_x005C_windows.x64.Checked_x005C_readytorun_x005C_readytorun_x005C..x005C_determinism_x005C_crossgen2determinism_x005C_crossgen2determinism.cmd_x000D__x000A ]]>

</output>
</test>

We seem to be escaping totally benign characters including spaces, CR/LF pairs or backslashes, increasing the size of the result files and reducing their value for developers, frankly speaking it would probably take me half an hour or so to turn the above into something reasonable. Jeremy speculated that we may have broken this with the xml checking / completion that was part of the Merge on Red project, assigning to Ivan to take a first look and we'll follow from there.

Thanks

Tomas

/cc @dotnet/runtime-infrastructure

P.S. I have spent several iterations trying to figure out how to format the above thing in some reasonable manner. I failed miserably.

Activity

  1. added this to the 9.0.0 milestone on Sep 14, 2023
  2. ivdiazsa commented on Sep 18, 2023

    @ivdiazsa
    Contributor

    That looks so strange. I will take a look to see what's going on and how we can fix it.

  3. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Sep 19, 2023
  4. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Sep 27, 2023
  5. ghost locked as resolved and limited conversation to collaborators on Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions