Skip to content

compiletest's 'SKIPPED 246746 BYTES' logic breaks tests #94322

Closed
@m-ou-se

Description

@m-ou-se
Member

src/tools/compiletest truncates large outputs by replacing the middle by <<<<<< SKIPPED {} BYTES >>>>>>:

write!(&mut head, "\n\n<<<<<< SKIPPED {} BYTES >>>>>>\n\n", skipped).unwrap();

This can break the test runner which tries to parse the output as json, which will break on the <<< .. >>> message. For example here: https://github.com/rust-lang/rust/runs/4586149338?check_suite_focus=true:

thread '[ui] ui/suggestions/missing-lifetime-specifier.rs' panicked at 'explicit panic', src/tools/compiletest/src/json.rs:121:21

This is blocking #92123 (A workaround for this PR could be to simply increase the threshold, but we should probably have a better solution.)

Activity

added
A-testsuiteArea: The testsuite used to check the correctness of rustc
C-bugCategory: This is a bug.
E-help-wantedCall for participation: Help is requested to fix this issue.
on Feb 24, 2022
Aaron1011

Aaron1011 commented on Feb 24, 2022

@Aaron1011
Member

See also #92211

Mark-Simulacrum

Mark-Simulacrum commented on Feb 24, 2022

@Mark-Simulacrum
Member

#94327 should help with this specific instance, though is not a root cause fix. In general limiting the number of JSON bytes is a pretty poor estimate of the number of bytes in stderr files; it might make sense to avoid the abbreviated read abstraction for that part of compiletest. (Or, at least, set the limit to a few megabytes or so).

added 3 commits that reference this issue on Feb 24, 2022

Rollup merge of rust-lang#94327 - Mark-Simulacrum:avoid-macro-sp, r=p…

39d8195

Rollup merge of rust-lang#94327 - Mark-Simulacrum:avoid-macro-sp, r=p…

7be2674

Rollup merge of rust-lang#94327 - Mark-Simulacrum:avoid-macro-sp, r=p…

3bd163f
added a commit that references this issue on Jun 6, 2022

Auto merge of rust-lang#96551 - ferrocene:pa-ignore-paths-when-abbrev…

6 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.E-help-wantedCall for participation: Help is requested to fix this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @m-ou-se@Aaron1011@Mark-Simulacrum

      Issue actions

        compiletest's 'SKIPPED 246746 BYTES' logic breaks tests · Issue #94322 · rust-lang/rust