jtreg adds additional backslashes in Strings that are written to System.out/err?

Jaikiran Pai jai.forums2013 at gmail.com
Mon Nov 1 03:22:35 UTC 2021

Hello Jon,

Sorry about the delayed reply. I wanted to give these options a try 
before replying, but never got to it until now.

On 15/09/21 8:00 pm, Jonathan Gibbons wrote:
> Jaikiran,
> The encoding is intentional ... and has been there since the beginning 
> of jtreg!
> While .jtr files are intended to only contain ASCII characters, they 
> are not intended for direct human consumption. 

Understood. Given that these jtr files get linked and rendered in the 
html output/report, I was under the impression that this is for human 

> The stream output from tests is encoded so that it can be subsequently 
> read back in by jtreg and related software.
> To view the output of a test without the encoding used in the .jtr 
> file, use one of:
>  * run the test under jtreg with the -va option
>  * run the test directly, using its main(String...) method ... you can
>    get a script to run the test from the "rerun" section in the .jtr file
>  * use jtreg to report the content of the stream using the
>    `-show:<name>` option, such as `jtreg -w:/path/to/work
>    -show:System.out /path/to/test

For me, both -va and -show option worked fine. I haven't exactly tested 
this against the backslash issue, but at least I now know what's the 
recommended way to consume this output.


More information about the jtreg-use mailing list