Correctly display stdout and stderr in case a doctest is failing - #140291

Merged
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:doctest-2024-stdout
Apr 27, 2025
Merged

Correctly display stdout and stderr in case a doctest is failing#140291
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:doctest-2024-stdout

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

Fixes#140289.

Since the doctest is actually running itself, we need to handle the output directly inside it.

cc @fmease
r? @notriddle

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 25, 2025
Comment threadtests/rustdoc-ui/doctest/stdout-and-stderr.stdout Outdated
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Ok I think this time I didn't forget some normalization. :')

@GuillaumeGomez
GuillaumeGomezforce-pushed the doctest-2024-stdout branch 2 times, most recently from 3ef98a5 to c44068bCompareApril 25, 2025 20:06
@notriddle

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Apr 26, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit c44068b has been approved by notriddle

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 26, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Apr 26, 2025
…, r=notriddle
Correctly display stdout and stderr in case a doctest is failing
Fixesrust-lang#140289.
Since the doctest is actually running itself, we need to handle the output directly inside it.
cc `@fmease`
r? `@notriddle`
@jhprattjhpratt mentioned this pull request Apr 26, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 26, 2025
Rollup of 4 pull requests
Successful merges:
- rust-lang#139308 (add autodiff inline)
- rust-lang#140291 (Correctly display stdout and stderr in case a doctest is failing)
- rust-lang#140297 (Update example to use CStr::to_string_lossy)
- rust-lang#140339 (session: Cleanup `CanonicalizedPath::new`)
r? `@ghost`
`@rustbot` modify labels: rollup
tgross35 added a commit to tgross35/rust that referenced this pull request Apr 27, 2025
…, r=notriddle
Correctly display stdout and stderr in case a doctest is failing
Fixesrust-lang#140289.
Since the doctest is actually running itself, we need to handle the output directly inside it.
cc ``@fmease``
r? ``@notriddle``
@tgross35tgross35 mentioned this pull request Apr 27, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 27, 2025
Rollup of 7 pull requests
Successful merges:
- rust-lang#137439 (Stabilise `std::ffi::c_str`)
- rust-lang#138737 (uefi: Update r-efi)
- rust-lang#139646 (check types of const param defaults)
- rust-lang#140220 (Fix detection of main function if there are expressions around it)
- rust-lang#140291 (Correctly display stdout and stderr in case a doctest is failing)
- rust-lang#140297 (Update example to use CStr::to_string_lossy)
- rust-lang#140330 (Clarified bootstrap optimization "true" argument)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors

bors commented Apr 27, 2025

Copy link
Copy Markdown
Collaborator

⌛ Testing commit c44068b with merge 8947e16...

@bors

bors commented Apr 27, 2025

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: notriddle
Pushing 8947e16 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Apr 27, 2025
@bors
bors merged commit 8947e16 into rust-lang:masterApr 27, 2025
@rustbotrustbot added this to the 1.88.0 milestone Apr 27, 2025
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 496145b (parent) -> 8947e16 (this PR)

Test differences

Show 33070 test diffs

Stage 1

  • ascii::is_ascii::unaligned_both_medium::case01_iter_all: pass -> [missing] (J1)
  • iter::bench_peekable_ref_sum: pass -> [missing] (J1)
  • path::bench_hash_path_long: pass -> [missing] (J1)
  • sort::tests::stable::deterministic_i32_random: pass -> [missing] (J1)
  • str::rfind_zzz_char::short_pile_of_poo: pass -> [missing] (J1)
  • str::split_space_str::long_lorem_ipsum: pass -> [missing] (J1)
  • string::bench_insert_str_short: pass -> [missing] (J1)
  • tests::test_should_report_time: pass -> [missing] (J1)
  • vec::bench_dedup_all_100000: pass -> [missing] (J1)
  • collections::hash::map::tests::test_extend_ref: pass -> [missing] (J2)
  • collections::hash::map::tests::test_find_mut: pass -> [missing] (J2)
  • collections::linked_list::tests::test_iterator_double_end: pass -> [missing] (J2)
  • collections::vec_deque::tests::test_try_reserve_exact: pass -> [missing] (J2)
  • io::buffered::tests::test_buffered_reader_seek_underflow_discard_buffer_between_seeks: pass -> [missing] (J2)
  • iter::traits::iterator::test_find_map: pass -> [missing] (J2)
  • lazy::dropck: pass -> [missing] (J2)
  • lazy_lock::lazy_default: pass -> [missing] (J2)
  • mem::offset_of_alias: pass -> [missing] (J2)
  • mem::offset_of_union: pass -> [missing] (J2)
  • num::f64::max: pass -> [missing] (J2)
  • num::i128::test_saturating_neg: pass -> [missing] (J2)
  • num::i16::test_abs: pass -> [missing] (J2)
  • num::i8::test_abs: pass -> [missing] (J2)
  • num::test_try_i16i16: pass -> [missing] (J2)
  • num::test_try_i16u64: pass -> [missing] (J2)
  • ops::test_range: pass -> [missing] (J2)
  • rc::test_rc_cyclic_with_one_ref: pass -> [missing] (J2)
  • slice::slice_index::rangeinclusive_len_len::pass: pass -> [missing] (J2)
  • slice::test_array_chunks_mut_zip: pass -> [missing] (J2)
  • slice::test_iterator_advance_back_by: pass -> [missing] (J2)
  • str::pattern::str_searcher_multibyte_haystack::fwd: pass -> [missing] (J2)
  • str::slice_index::boundary::rangeinclusive_2::index_fail: pass -> [missing] (J2)
  • str::test_char_indicesator: pass -> [missing] (J2)
  • sys_common::wtf8::tests::wtf8buf_push_char: pass -> [missing] (J2)
  • tests::smoke_no_dtor: pass -> [missing] (J2)
  • thread::tests::test_spawn_sched_childs_on_default_sched: pass -> [missing] (J2)
  • time::from_mins_overflow: pass -> [missing] (J2)
  • clean::types::tests::should_not_ignore_first_line_indent_in_a_single_line_para: pass -> [missing] (J3)
  • doctest::tests::make_test_named_wrapper: pass -> [missing] (J3)
  • error::verify_query_system_reentrant_0: pass -> [missing] (J3)
  • errors::ad_fallback::verify_builtin_macros_autodiff_not_build_35: pass -> [missing] (J3)
  • errors::verify_ast_lowering_register_class_only_clobber_stable_20: pass -> [missing] (J3)
  • errors::verify_ast_passes_optional_trait_supertrait_47: pass -> [missing] (J3)
  • errors::verify_mir_build_lower_range_bound_must_be_less_than_upper_7: pass -> [missing] (J3)
  • errors::verify_passes_used_static_76: pass -> [missing] (J3)
  • errors::verify_session_invalid_float_literal_width_36: pass -> [missing] (J3)
  • html::highlight::tests::test_keyword_highlight: pass -> [missing] (J3)
  • html::markdown::tests::test_lang_string_tokenizer: pass -> [missing] (J3)
  • lints::verify_lint_builtin_allow_internal_unsafe_6: pass -> [missing] (J3)
  • markdown::parse::tests::test_newline_breaks: pass -> [missing] (J3)
  • parser::tests::look_ahead_non_outermost_stream: pass -> [missing] (J3)
  • parser::tests::non_overlapping: pass -> [missing] (J3)
  • spec::tests::aarch64_be_unknown_linux_gnu_ilp32: pass -> [missing] (J3)
  • spec::tests::sparc64_unknown_netbsd: pass -> [missing] (J3)
  • spec::tests::x86_64_pc_cygwin: pass -> [missing] (J3)
  • tests::test_switch_implies_cfg_test: pass -> [missing] (J3)
  • tests::test_unterminated: pass -> [missing] (J3)
  • [ui] tests/rustdoc-ui/doctest/stdout-and-stderr.rs: [missing] -> pass (J4)
  • sys::process::unix::unix::unsupported_wait_status::tests::compare_with_linux: pass -> [missing] (J5)

Stage 2

  • sort::tests::stable::correct_i32_random_s50: [missing] -> ignore (J0)
  • sort::tests::stable::stability_i32_saw_mixed: [missing] -> ignore (J0)
  • sort::tests::unstable::correct_1k_random_d20: [missing] -> ignore (J0)
  • ascii::long::is_ascii_graphic: [missing] -> pass (J1)
  • btree::map::clone_slim_10k_and_remove_half: [missing] -> pass (J1)
  • hash::set_ops::set_is_subset: [missing] -> pass (J1)
  • num::int_log::u128_log_random_small: [missing] -> pass (J1)
  • num::int_sqrt::u64_sqrt_random_small: [missing] -> pass (J1)
  • sort::tests::stable::correct_1k_random: [missing] -> pass (J1)
  • sort::tests::stable::panic_retain_orig_set_cell_i32_ascending: [missing] -> pass (J1)
  • sort::tests::unstable::correct_i32_random_s50: [missing] -> pass (J1)
  • str::char_count::emoji_tiny::case00_libcore: [missing] -> pass (J1)
  • str::split_a_str::short_ascii: [missing] -> pass (J1)
  • str::split_slice: [missing] -> pass (J1)
  • time::instant_contention_16_threads: [missing] -> pass (J1)
  • collections::binary_heap::test_empty_peek: [missing] -> pass (J2)
  • collections::btree::map::tests::test_bad_zst: [missing] -> pass (J2)
  • f32::test_gamma: [missing] -> pass (J2)
  • ffi::os_str::tests::test_os_str_default: [missing] -> pass (J2)
  • fmt::float::test_format_f32_rounds_ties_to_even: [missing] -> pass (J2)
  • io::buffered::tests::test_buffered_reader_read_to_end_consumes_buffer: [missing] -> pass (J2)
  • nonzero::test_match_option_rc: [missing] -> pass (J2)
  • num::test_i16f64: [missing] -> pass (J2)
  • num::test_try_u8u8: [missing] -> pass (J2)
  • num::u32::test_isolate_most_significant_one: [missing] -> pass (J2)
  • slice::test_chunks_exact_mut_last: [missing] -> pass (J2)
  • slice::test_copy_from_slice_dst_shorter: [missing] -> pass (J2)
  • slice::test_rchunks_exact_iterator_0: [missing] -> pass (J2)
  • slice::test_rchunks_mut_next: [missing] -> pass (J2)
  • slice::test_rposition: [missing] -> pass (J2)
  • str::pattern::char_searcher_short_haystack::bwd: [missing] -> pass (J2)
  • str::slice_index::overflow::rangeinclusive::pass: [missing] -> pass (J2)
  • sync::test_arc_get_mut: [missing] -> pass (J2)
  • sync::test_from_str: [missing] -> pass (J2)
  • vec::test_pop_if: [missing] -> pass (J2)
  • errors::verify_expand_attribute_meta_item_16: [missing] -> pass (J3)
  • errors::verify_hir_typeck_field_multiply_specified_in_initializer_0: [missing] -> pass (J3)
  • graph::vec_graph::tests::predecessors: [missing] -> pass (J3)
  • leb128::tests::test_usize_leb128: [missing] -> pass (J3)
  • lints::verify_lint_identifier_non_ascii_char_73: [missing] -> pass (J3)
  • parser::tests::parse_exprs: [missing] -> pass (J3)

(and 16452 additional test diffs)

Additionally, 16518 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 8947e167e58c5c4f23cae94585301f8eb90d93ea --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 5108.6s -> 1675.4s (-67.2%)
  2. test-various: 4140.8s -> 2401.9s (-42.0%)
  3. x86_64-apple-1: 8455.0s -> 5498.7s (-35.0%)
  4. dist-aarch64-linux: 7758.9s -> 5339.1s (-31.2%)
  5. x86_64-gnu-aux: 5914.5s -> 4344.2s (-26.6%)
  6. dist-apple-various: 6337.5s -> 7828.5s (23.5%)
  7. aarch64-apple: 3916.6s -> 3111.3s (-20.6%)
  8. dist-x86_64-apple: 7777.3s -> 8962.8s (15.2%)
  9. x86_64-gnu-llvm-20-1: 6152.3s -> 5248.9s (-14.7%)
  10. dist-aarch64-apple: 5640.5s -> 5014.3s (-11.1%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (8947e16): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -0.8%, secondary -2.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
0.5%[0.5%, 0.5%]2
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-2.1%[-3.6%, -0.6%]2
Improvements ✅
(secondary)
-2.2%[-2.2%, -2.2%]1
All ❌✅ (primary)-0.8%[-3.6%, 0.5%]4

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 764.349s -> 763.457s (-0.12%)
Artifact size: 365.22 MiB -> 365.17 MiB (-0.01%)

@GuillaumeGomez
GuillaumeGomez deleted the doctest-2024-stdout branch April 28, 2025 09:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2024 doctests don't show stdout when failing

9 participants

@GuillaumeGomez@rust-log-analyzer@notriddle@bors@rust-timer@Kobzol@fmease@jieyouxu@rustbot
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Correctly display stdout and stderr in case a doctest is failing - #140291

Merged
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:doctest-2024-stdout
Apr 27, 2025
Merged

Correctly display stdout and stderr in case a doctest is failing#140291
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:doctest-2024-stdout

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

Fixes#140289.

Since the doctest is actually running itself, we need to handle the output directly inside it.

cc @fmease
r? @notriddle

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 25, 2025
Comment threadtests/rustdoc-ui/doctest/stdout-and-stderr.stdout Outdated
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Ok I think this time I didn't forget some normalization. :')

@GuillaumeGomez
GuillaumeGomezforce-pushed the doctest-2024-stdout branch 2 times, most recently from 3ef98a5 to c44068bCompareApril 25, 2025 20:06
@notriddle

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Apr 26, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit c44068b has been approved by notriddle

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 26, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Apr 26, 2025
…, r=notriddle
Correctly display stdout and stderr in case a doctest is failing
Fixesrust-lang#140289.
Since the doctest is actually running itself, we need to handle the output directly inside it.
cc `@fmease`
r? `@notriddle`
@jhprattjhpratt mentioned this pull request Apr 26, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 26, 2025
Rollup of 4 pull requests
Successful merges:
- rust-lang#139308 (add autodiff inline)
- rust-lang#140291 (Correctly display stdout and stderr in case a doctest is failing)
- rust-lang#140297 (Update example to use CStr::to_string_lossy)
- rust-lang#140339 (session: Cleanup `CanonicalizedPath::new`)
r? `@ghost`
`@rustbot` modify labels: rollup
tgross35 added a commit to tgross35/rust that referenced this pull request Apr 27, 2025
…, r=notriddle
Correctly display stdout and stderr in case a doctest is failing
Fixesrust-lang#140289.
Since the doctest is actually running itself, we need to handle the output directly inside it.
cc ``@fmease``
r? ``@notriddle``
@tgross35tgross35 mentioned this pull request Apr 27, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 27, 2025
Rollup of 7 pull requests
Successful merges:
- rust-lang#137439 (Stabilise `std::ffi::c_str`)
- rust-lang#138737 (uefi: Update r-efi)
- rust-lang#139646 (check types of const param defaults)
- rust-lang#140220 (Fix detection of main function if there are expressions around it)
- rust-lang#140291 (Correctly display stdout and stderr in case a doctest is failing)
- rust-lang#140297 (Update example to use CStr::to_string_lossy)
- rust-lang#140330 (Clarified bootstrap optimization "true" argument)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors

bors commented Apr 27, 2025

Copy link
Copy Markdown
Collaborator

⌛ Testing commit c44068b with merge 8947e16...

@bors

bors commented Apr 27, 2025

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: notriddle
Pushing 8947e16 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Apr 27, 2025
@bors
bors merged commit 8947e16 into rust-lang:masterApr 27, 2025
@rustbotrustbot added this to the 1.88.0 milestone Apr 27, 2025
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 496145b (parent) -> 8947e16 (this PR)

Test differences

Show 33070 test diffs

Stage 1

  • ascii::is_ascii::unaligned_both_medium::case01_iter_all: pass -> [missing] (J1)
  • iter::bench_peekable_ref_sum: pass -> [missing] (J1)
  • path::bench_hash_path_long: pass -> [missing] (J1)
  • sort::tests::stable::deterministic_i32_random: pass -> [missing] (J1)
  • str::rfind_zzz_char::short_pile_of_poo: pass -> [missing] (J1)
  • str::split_space_str::long_lorem_ipsum: pass -> [missing] (J1)
  • string::bench_insert_str_short: pass -> [missing] (J1)
  • tests::test_should_report_time: pass -> [missing] (J1)
  • vec::bench_dedup_all_100000: pass -> [missing] (J1)
  • collections::hash::map::tests::test_extend_ref: pass -> [missing] (J2)
  • collections::hash::map::tests::test_find_mut: pass -> [missing] (J2)
  • collections::linked_list::tests::test_iterator_double_end: pass -> [missing] (J2)
  • collections::vec_deque::tests::test_try_reserve_exact: pass -> [missing] (J2)
  • io::buffered::tests::test_buffered_reader_seek_underflow_discard_buffer_between_seeks: pass -> [missing] (J2)
  • iter::traits::iterator::test_find_map: pass -> [missing] (J2)
  • lazy::dropck: pass -> [missing] (J2)
  • lazy_lock::lazy_default: pass -> [missing] (J2)
  • mem::offset_of_alias: pass -> [missing] (J2)
  • mem::offset_of_union: pass -> [missing] (J2)
  • num::f64::max: pass -> [missing] (J2)
  • num::i128::test_saturating_neg: pass -> [missing] (J2)
  • num::i16::test_abs: pass -> [missing] (J2)
  • num::i8::test_abs: pass -> [missing] (J2)
  • num::test_try_i16i16: pass -> [missing] (J2)
  • num::test_try_i16u64: pass -> [missing] (J2)
  • ops::test_range: pass -> [missing] (J2)
  • rc::test_rc_cyclic_with_one_ref: pass -> [missing] (J2)
  • slice::slice_index::rangeinclusive_len_len::pass: pass -> [missing] (J2)
  • slice::test_array_chunks_mut_zip: pass -> [missing] (J2)
  • slice::test_iterator_advance_back_by: pass -> [missing] (J2)
  • str::pattern::str_searcher_multibyte_haystack::fwd: pass -> [missing] (J2)
  • str::slice_index::boundary::rangeinclusive_2::index_fail: pass -> [missing] (J2)
  • str::test_char_indicesator: pass -> [missing] (J2)
  • sys_common::wtf8::tests::wtf8buf_push_char: pass -> [missing] (J2)
  • tests::smoke_no_dtor: pass -> [missing] (J2)
  • thread::tests::test_spawn_sched_childs_on_default_sched: pass -> [missing] (J2)
  • time::from_mins_overflow: pass -> [missing] (J2)
  • clean::types::tests::should_not_ignore_first_line_indent_in_a_single_line_para: pass -> [missing] (J3)
  • doctest::tests::make_test_named_wrapper: pass -> [missing] (J3)
  • error::verify_query_system_reentrant_0: pass -> [missing] (J3)
  • errors::ad_fallback::verify_builtin_macros_autodiff_not_build_35: pass -> [missing] (J3)
  • errors::verify_ast_lowering_register_class_only_clobber_stable_20: pass -> [missing] (J3)
  • errors::verify_ast_passes_optional_trait_supertrait_47: pass -> [missing] (J3)
  • errors::verify_mir_build_lower_range_bound_must_be_less_than_upper_7: pass -> [missing] (J3)
  • errors::verify_passes_used_static_76: pass -> [missing] (J3)
  • errors::verify_session_invalid_float_literal_width_36: pass -> [missing] (J3)
  • html::highlight::tests::test_keyword_highlight: pass -> [missing] (J3)
  • html::markdown::tests::test_lang_string_tokenizer: pass -> [missing] (J3)
  • lints::verify_lint_builtin_allow_internal_unsafe_6: pass -> [missing] (J3)
  • markdown::parse::tests::test_newline_breaks: pass -> [missing] (J3)
  • parser::tests::look_ahead_non_outermost_stream: pass -> [missing] (J3)
  • parser::tests::non_overlapping: pass -> [missing] (J3)
  • spec::tests::aarch64_be_unknown_linux_gnu_ilp32: pass -> [missing] (J3)
  • spec::tests::sparc64_unknown_netbsd: pass -> [missing] (J3)
  • spec::tests::x86_64_pc_cygwin: pass -> [missing] (J3)
  • tests::test_switch_implies_cfg_test: pass -> [missing] (J3)
  • tests::test_unterminated: pass -> [missing] (J3)
  • [ui] tests/rustdoc-ui/doctest/stdout-and-stderr.rs: [missing] -> pass (J4)
  • sys::process::unix::unix::unsupported_wait_status::tests::compare_with_linux: pass -> [missing] (J5)

Stage 2

  • sort::tests::stable::correct_i32_random_s50: [missing] -> ignore (J0)
  • sort::tests::stable::stability_i32_saw_mixed: [missing] -> ignore (J0)
  • sort::tests::unstable::correct_1k_random_d20: [missing] -> ignore (J0)
  • ascii::long::is_ascii_graphic: [missing] -> pass (J1)
  • btree::map::clone_slim_10k_and_remove_half: [missing] -> pass (J1)
  • hash::set_ops::set_is_subset: [missing] -> pass (J1)
  • num::int_log::u128_log_random_small: [missing] -> pass (J1)
  • num::int_sqrt::u64_sqrt_random_small: [missing] -> pass (J1)
  • sort::tests::stable::correct_1k_random: [missing] -> pass (J1)
  • sort::tests::stable::panic_retain_orig_set_cell_i32_ascending: [missing] -> pass (J1)
  • sort::tests::unstable::correct_i32_random_s50: [missing] -> pass (J1)
  • str::char_count::emoji_tiny::case00_libcore: [missing] -> pass (J1)
  • str::split_a_str::short_ascii: [missing] -> pass (J1)
  • str::split_slice: [missing] -> pass (J1)
  • time::instant_contention_16_threads: [missing] -> pass (J1)
  • collections::binary_heap::test_empty_peek: [missing] -> pass (J2)
  • collections::btree::map::tests::test_bad_zst: [missing] -> pass (J2)
  • f32::test_gamma: [missing] -> pass (J2)
  • ffi::os_str::tests::test_os_str_default: [missing] -> pass (J2)
  • fmt::float::test_format_f32_rounds_ties_to_even: [missing] -> pass (J2)
  • io::buffered::tests::test_buffered_reader_read_to_end_consumes_buffer: [missing] -> pass (J2)
  • nonzero::test_match_option_rc: [missing] -> pass (J2)
  • num::test_i16f64: [missing] -> pass (J2)
  • num::test_try_u8u8: [missing] -> pass (J2)
  • num::u32::test_isolate_most_significant_one: [missing] -> pass (J2)
  • slice::test_chunks_exact_mut_last: [missing] -> pass (J2)
  • slice::test_copy_from_slice_dst_shorter: [missing] -> pass (J2)
  • slice::test_rchunks_exact_iterator_0: [missing] -> pass (J2)
  • slice::test_rchunks_mut_next: [missing] -> pass (J2)
  • slice::test_rposition: [missing] -> pass (J2)
  • str::pattern::char_searcher_short_haystack::bwd: [missing] -> pass (J2)
  • str::slice_index::overflow::rangeinclusive::pass: [missing] -> pass (J2)
  • sync::test_arc_get_mut: [missing] -> pass (J2)
  • sync::test_from_str: [missing] -> pass (J2)
  • vec::test_pop_if: [missing] -> pass (J2)
  • errors::verify_expand_attribute_meta_item_16: [missing] -> pass (J3)
  • errors::verify_hir_typeck_field_multiply_specified_in_initializer_0: [missing] -> pass (J3)
  • graph::vec_graph::tests::predecessors: [missing] -> pass (J3)
  • leb128::tests::test_usize_leb128: [missing] -> pass (J3)
  • lints::verify_lint_identifier_non_ascii_char_73: [missing] -> pass (J3)
  • parser::tests::parse_exprs: [missing] -> pass (J3)

(and 16452 additional test diffs)

Additionally, 16518 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 8947e167e58c5c4f23cae94585301f8eb90d93ea --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 5108.6s -> 1675.4s (-67.2%)
  2. test-various: 4140.8s -> 2401.9s (-42.0%)
  3. x86_64-apple-1: 8455.0s -> 5498.7s (-35.0%)
  4. dist-aarch64-linux: 7758.9s -> 5339.1s (-31.2%)
  5. x86_64-gnu-aux: 5914.5s -> 4344.2s (-26.6%)
  6. dist-apple-various: 6337.5s -> 7828.5s (23.5%)
  7. aarch64-apple: 3916.6s -> 3111.3s (-20.6%)
  8. dist-x86_64-apple: 7777.3s -> 8962.8s (15.2%)
  9. x86_64-gnu-llvm-20-1: 6152.3s -> 5248.9s (-14.7%)
  10. dist-aarch64-apple: 5640.5s -> 5014.3s (-11.1%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (8947e16): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -0.8%, secondary -2.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
0.5%[0.5%, 0.5%]2
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-2.1%[-3.6%, -0.6%]2
Improvements ✅
(secondary)
-2.2%[-2.2%, -2.2%]1
All ❌✅ (primary)-0.8%[-3.6%, 0.5%]4

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 764.349s -> 763.457s (-0.12%)
Artifact size: 365.22 MiB -> 365.17 MiB (-0.01%)

@GuillaumeGomez
GuillaumeGomez deleted the doctest-2024-stdout branch April 28, 2025 09:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2024 doctests don't show stdout when failing

9 participants

@GuillaumeGomez@rust-log-analyzer@notriddle@bors@rust-timer@Kobzol@fmease@jieyouxu@rustbot
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Correctly display stdout and stderr in case a doctest is failing - #140291

Merged
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:doctest-2024-stdout
Apr 27, 2025
Merged

Correctly display stdout and stderr in case a doctest is failing#140291
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:doctest-2024-stdout

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

Fixes#140289.

Since the doctest is actually running itself, we need to handle the output directly inside it.

cc @fmease
r? @notriddle

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 25, 2025
Comment threadtests/rustdoc-ui/doctest/stdout-and-stderr.stdout Outdated
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Ok I think this time I didn't forget some normalization. :')

@GuillaumeGomez
GuillaumeGomezforce-pushed the doctest-2024-stdout branch 2 times, most recently from 3ef98a5 to c44068bCompareApril 25, 2025 20:06
@notriddle

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Apr 26, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit c44068b has been approved by notriddle

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 26, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Apr 26, 2025
…, r=notriddle
Correctly display stdout and stderr in case a doctest is failing
Fixesrust-lang#140289.
Since the doctest is actually running itself, we need to handle the output directly inside it.
cc `@fmease`
r? `@notriddle`
@jhprattjhpratt mentioned this pull request Apr 26, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 26, 2025
Rollup of 4 pull requests
Successful merges:
- rust-lang#139308 (add autodiff inline)
- rust-lang#140291 (Correctly display stdout and stderr in case a doctest is failing)
- rust-lang#140297 (Update example to use CStr::to_string_lossy)
- rust-lang#140339 (session: Cleanup `CanonicalizedPath::new`)
r? `@ghost`
`@rustbot` modify labels: rollup
tgross35 added a commit to tgross35/rust that referenced this pull request Apr 27, 2025
…, r=notriddle
Correctly display stdout and stderr in case a doctest is failing
Fixesrust-lang#140289.
Since the doctest is actually running itself, we need to handle the output directly inside it.
cc ``@fmease``
r? ``@notriddle``
@tgross35tgross35 mentioned this pull request Apr 27, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 27, 2025
Rollup of 7 pull requests
Successful merges:
- rust-lang#137439 (Stabilise `std::ffi::c_str`)
- rust-lang#138737 (uefi: Update r-efi)
- rust-lang#139646 (check types of const param defaults)
- rust-lang#140220 (Fix detection of main function if there are expressions around it)
- rust-lang#140291 (Correctly display stdout and stderr in case a doctest is failing)
- rust-lang#140297 (Update example to use CStr::to_string_lossy)
- rust-lang#140330 (Clarified bootstrap optimization "true" argument)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors

bors commented Apr 27, 2025

Copy link
Copy Markdown
Collaborator

⌛ Testing commit c44068b with merge 8947e16...

@bors

bors commented Apr 27, 2025

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: notriddle
Pushing 8947e16 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Apr 27, 2025
@bors
bors merged commit 8947e16 into rust-lang:masterApr 27, 2025
@rustbotrustbot added this to the 1.88.0 milestone Apr 27, 2025
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 496145b (parent) -> 8947e16 (this PR)

Test differences

Show 33070 test diffs

Stage 1

  • ascii::is_ascii::unaligned_both_medium::case01_iter_all: pass -> [missing] (J1)
  • iter::bench_peekable_ref_sum: pass -> [missing] (J1)
  • path::bench_hash_path_long: pass -> [missing] (J1)
  • sort::tests::stable::deterministic_i32_random: pass -> [missing] (J1)
  • str::rfind_zzz_char::short_pile_of_poo: pass -> [missing] (J1)
  • str::split_space_str::long_lorem_ipsum: pass -> [missing] (J1)
  • string::bench_insert_str_short: pass -> [missing] (J1)
  • tests::test_should_report_time: pass -> [missing] (J1)
  • vec::bench_dedup_all_100000: pass -> [missing] (J1)
  • collections::hash::map::tests::test_extend_ref: pass -> [missing] (J2)
  • collections::hash::map::tests::test_find_mut: pass -> [missing] (J2)
  • collections::linked_list::tests::test_iterator_double_end: pass -> [missing] (J2)
  • collections::vec_deque::tests::test_try_reserve_exact: pass -> [missing] (J2)
  • io::buffered::tests::test_buffered_reader_seek_underflow_discard_buffer_between_seeks: pass -> [missing] (J2)
  • iter::traits::iterator::test_find_map: pass -> [missing] (J2)
  • lazy::dropck: pass -> [missing] (J2)
  • lazy_lock::lazy_default: pass -> [missing] (J2)
  • mem::offset_of_alias: pass -> [missing] (J2)
  • mem::offset_of_union: pass -> [missing] (J2)
  • num::f64::max: pass -> [missing] (J2)
  • num::i128::test_saturating_neg: pass -> [missing] (J2)
  • num::i16::test_abs: pass -> [missing] (J2)
  • num::i8::test_abs: pass -> [missing] (J2)
  • num::test_try_i16i16: pass -> [missing] (J2)
  • num::test_try_i16u64: pass -> [missing] (J2)
  • ops::test_range: pass -> [missing] (J2)
  • rc::test_rc_cyclic_with_one_ref: pass -> [missing] (J2)
  • slice::slice_index::rangeinclusive_len_len::pass: pass -> [missing] (J2)
  • slice::test_array_chunks_mut_zip: pass -> [missing] (J2)
  • slice::test_iterator_advance_back_by: pass -> [missing] (J2)
  • str::pattern::str_searcher_multibyte_haystack::fwd: pass -> [missing] (J2)
  • str::slice_index::boundary::rangeinclusive_2::index_fail: pass -> [missing] (J2)
  • str::test_char_indicesator: pass -> [missing] (J2)
  • sys_common::wtf8::tests::wtf8buf_push_char: pass -> [missing] (J2)
  • tests::smoke_no_dtor: pass -> [missing] (J2)
  • thread::tests::test_spawn_sched_childs_on_default_sched: pass -> [missing] (J2)
  • time::from_mins_overflow: pass -> [missing] (J2)
  • clean::types::tests::should_not_ignore_first_line_indent_in_a_single_line_para: pass -> [missing] (J3)
  • doctest::tests::make_test_named_wrapper: pass -> [missing] (J3)
  • error::verify_query_system_reentrant_0: pass -> [missing] (J3)
  • errors::ad_fallback::verify_builtin_macros_autodiff_not_build_35: pass -> [missing] (J3)
  • errors::verify_ast_lowering_register_class_only_clobber_stable_20: pass -> [missing] (J3)
  • errors::verify_ast_passes_optional_trait_supertrait_47: pass -> [missing] (J3)
  • errors::verify_mir_build_lower_range_bound_must_be_less_than_upper_7: pass -> [missing] (J3)
  • errors::verify_passes_used_static_76: pass -> [missing] (J3)
  • errors::verify_session_invalid_float_literal_width_36: pass -> [missing] (J3)
  • html::highlight::tests::test_keyword_highlight: pass -> [missing] (J3)
  • html::markdown::tests::test_lang_string_tokenizer: pass -> [missing] (J3)
  • lints::verify_lint_builtin_allow_internal_unsafe_6: pass -> [missing] (J3)
  • markdown::parse::tests::test_newline_breaks: pass -> [missing] (J3)
  • parser::tests::look_ahead_non_outermost_stream: pass -> [missing] (J3)
  • parser::tests::non_overlapping: pass -> [missing] (J3)
  • spec::tests::aarch64_be_unknown_linux_gnu_ilp32: pass -> [missing] (J3)
  • spec::tests::sparc64_unknown_netbsd: pass -> [missing] (J3)
  • spec::tests::x86_64_pc_cygwin: pass -> [missing] (J3)
  • tests::test_switch_implies_cfg_test: pass -> [missing] (J3)
  • tests::test_unterminated: pass -> [missing] (J3)
  • [ui] tests/rustdoc-ui/doctest/stdout-and-stderr.rs: [missing] -> pass (J4)
  • sys::process::unix::unix::unsupported_wait_status::tests::compare_with_linux: pass -> [missing] (J5)

Stage 2

  • sort::tests::stable::correct_i32_random_s50: [missing] -> ignore (J0)
  • sort::tests::stable::stability_i32_saw_mixed: [missing] -> ignore (J0)
  • sort::tests::unstable::correct_1k_random_d20: [missing] -> ignore (J0)
  • ascii::long::is_ascii_graphic: [missing] -> pass (J1)
  • btree::map::clone_slim_10k_and_remove_half: [missing] -> pass (J1)
  • hash::set_ops::set_is_subset: [missing] -> pass (J1)
  • num::int_log::u128_log_random_small: [missing] -> pass (J1)
  • num::int_sqrt::u64_sqrt_random_small: [missing] -> pass (J1)
  • sort::tests::stable::correct_1k_random: [missing] -> pass (J1)
  • sort::tests::stable::panic_retain_orig_set_cell_i32_ascending: [missing] -> pass (J1)
  • sort::tests::unstable::correct_i32_random_s50: [missing] -> pass (J1)
  • str::char_count::emoji_tiny::case00_libcore: [missing] -> pass (J1)
  • str::split_a_str::short_ascii: [missing] -> pass (J1)
  • str::split_slice: [missing] -> pass (J1)
  • time::instant_contention_16_threads: [missing] -> pass (J1)
  • collections::binary_heap::test_empty_peek: [missing] -> pass (J2)
  • collections::btree::map::tests::test_bad_zst: [missing] -> pass (J2)
  • f32::test_gamma: [missing] -> pass (J2)
  • ffi::os_str::tests::test_os_str_default: [missing] -> pass (J2)
  • fmt::float::test_format_f32_rounds_ties_to_even: [missing] -> pass (J2)
  • io::buffered::tests::test_buffered_reader_read_to_end_consumes_buffer: [missing] -> pass (J2)
  • nonzero::test_match_option_rc: [missing] -> pass (J2)
  • num::test_i16f64: [missing] -> pass (J2)
  • num::test_try_u8u8: [missing] -> pass (J2)
  • num::u32::test_isolate_most_significant_one: [missing] -> pass (J2)
  • slice::test_chunks_exact_mut_last: [missing] -> pass (J2)
  • slice::test_copy_from_slice_dst_shorter: [missing] -> pass (J2)
  • slice::test_rchunks_exact_iterator_0: [missing] -> pass (J2)
  • slice::test_rchunks_mut_next: [missing] -> pass (J2)
  • slice::test_rposition: [missing] -> pass (J2)
  • str::pattern::char_searcher_short_haystack::bwd: [missing] -> pass (J2)
  • str::slice_index::overflow::rangeinclusive::pass: [missing] -> pass (J2)
  • sync::test_arc_get_mut: [missing] -> pass (J2)
  • sync::test_from_str: [missing] -> pass (J2)
  • vec::test_pop_if: [missing] -> pass (J2)
  • errors::verify_expand_attribute_meta_item_16: [missing] -> pass (J3)
  • errors::verify_hir_typeck_field_multiply_specified_in_initializer_0: [missing] -> pass (J3)
  • graph::vec_graph::tests::predecessors: [missing] -> pass (J3)
  • leb128::tests::test_usize_leb128: [missing] -> pass (J3)
  • lints::verify_lint_identifier_non_ascii_char_73: [missing] -> pass (J3)
  • parser::tests::parse_exprs: [missing] -> pass (J3)

(and 16452 additional test diffs)

Additionally, 16518 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 8947e167e58c5c4f23cae94585301f8eb90d93ea --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 5108.6s -> 1675.4s (-67.2%)
  2. test-various: 4140.8s -> 2401.9s (-42.0%)
  3. x86_64-apple-1: 8455.0s -> 5498.7s (-35.0%)
  4. dist-aarch64-linux: 7758.9s -> 5339.1s (-31.2%)
  5. x86_64-gnu-aux: 5914.5s -> 4344.2s (-26.6%)
  6. dist-apple-various: 6337.5s -> 7828.5s (23.5%)
  7. aarch64-apple: 3916.6s -> 3111.3s (-20.6%)
  8. dist-x86_64-apple: 7777.3s -> 8962.8s (15.2%)
  9. x86_64-gnu-llvm-20-1: 6152.3s -> 5248.9s (-14.7%)
  10. dist-aarch64-apple: 5640.5s -> 5014.3s (-11.1%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (8947e16): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -0.8%, secondary -2.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
0.5%[0.5%, 0.5%]2
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-2.1%[-3.6%, -0.6%]2
Improvements ✅
(secondary)
-2.2%[-2.2%, -2.2%]1
All ❌✅ (primary)-0.8%[-3.6%, 0.5%]4

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 764.349s -> 763.457s (-0.12%)
Artifact size: 365.22 MiB -> 365.17 MiB (-0.01%)

@GuillaumeGomez
GuillaumeGomez deleted the doctest-2024-stdout branch April 28, 2025 09:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2024 doctests don't show stdout when failing

9 participants

@GuillaumeGomez@rust-log-analyzer@notriddle@bors@rust-timer@Kobzol@fmease@jieyouxu@rustbot
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Correctly display stdout and stderr in case a doctest is failing - #140291

Merged
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:doctest-2024-stdout
Apr 27, 2025
Merged

Correctly display stdout and stderr in case a doctest is failing#140291
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:doctest-2024-stdout

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

Fixes#140289.

Since the doctest is actually running itself, we need to handle the output directly inside it.

cc @fmease
r? @notriddle

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 25, 2025
Comment threadtests/rustdoc-ui/doctest/stdout-and-stderr.stdout Outdated
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Ok I think this time I didn't forget some normalization. :')

@GuillaumeGomez
GuillaumeGomezforce-pushed the doctest-2024-stdout branch 2 times, most recently from 3ef98a5 to c44068bCompareApril 25, 2025 20:06
@notriddle

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Apr 26, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit c44068b has been approved by notriddle

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 26, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Apr 26, 2025
…, r=notriddle
Correctly display stdout and stderr in case a doctest is failing
Fixesrust-lang#140289.
Since the doctest is actually running itself, we need to handle the output directly inside it.
cc `@fmease`
r? `@notriddle`
@jhprattjhpratt mentioned this pull request Apr 26, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 26, 2025
Rollup of 4 pull requests
Successful merges:
- rust-lang#139308 (add autodiff inline)
- rust-lang#140291 (Correctly display stdout and stderr in case a doctest is failing)
- rust-lang#140297 (Update example to use CStr::to_string_lossy)
- rust-lang#140339 (session: Cleanup `CanonicalizedPath::new`)
r? `@ghost`
`@rustbot` modify labels: rollup
tgross35 added a commit to tgross35/rust that referenced this pull request Apr 27, 2025
…, r=notriddle
Correctly display stdout and stderr in case a doctest is failing
Fixesrust-lang#140289.
Since the doctest is actually running itself, we need to handle the output directly inside it.
cc ``@fmease``
r? ``@notriddle``
@tgross35tgross35 mentioned this pull request Apr 27, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 27, 2025
Rollup of 7 pull requests
Successful merges:
- rust-lang#137439 (Stabilise `std::ffi::c_str`)
- rust-lang#138737 (uefi: Update r-efi)
- rust-lang#139646 (check types of const param defaults)
- rust-lang#140220 (Fix detection of main function if there are expressions around it)
- rust-lang#140291 (Correctly display stdout and stderr in case a doctest is failing)
- rust-lang#140297 (Update example to use CStr::to_string_lossy)
- rust-lang#140330 (Clarified bootstrap optimization "true" argument)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors

bors commented Apr 27, 2025

Copy link
Copy Markdown
Collaborator

⌛ Testing commit c44068b with merge 8947e16...

@bors

bors commented Apr 27, 2025

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: notriddle
Pushing 8947e16 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Apr 27, 2025
@bors
bors merged commit 8947e16 into rust-lang:masterApr 27, 2025
@rustbotrustbot added this to the 1.88.0 milestone Apr 27, 2025
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 496145b (parent) -> 8947e16 (this PR)

Test differences

Show 33070 test diffs

Stage 1

  • ascii::is_ascii::unaligned_both_medium::case01_iter_all: pass -> [missing] (J1)
  • iter::bench_peekable_ref_sum: pass -> [missing] (J1)
  • path::bench_hash_path_long: pass -> [missing] (J1)
  • sort::tests::stable::deterministic_i32_random: pass -> [missing] (J1)
  • str::rfind_zzz_char::short_pile_of_poo: pass -> [missing] (J1)
  • str::split_space_str::long_lorem_ipsum: pass -> [missing] (J1)
  • string::bench_insert_str_short: pass -> [missing] (J1)
  • tests::test_should_report_time: pass -> [missing] (J1)
  • vec::bench_dedup_all_100000: pass -> [missing] (J1)
  • collections::hash::map::tests::test_extend_ref: pass -> [missing] (J2)
  • collections::hash::map::tests::test_find_mut: pass -> [missing] (J2)
  • collections::linked_list::tests::test_iterator_double_end: pass -> [missing] (J2)
  • collections::vec_deque::tests::test_try_reserve_exact: pass -> [missing] (J2)
  • io::buffered::tests::test_buffered_reader_seek_underflow_discard_buffer_between_seeks: pass -> [missing] (J2)
  • iter::traits::iterator::test_find_map: pass -> [missing] (J2)
  • lazy::dropck: pass -> [missing] (J2)
  • lazy_lock::lazy_default: pass -> [missing] (J2)
  • mem::offset_of_alias: pass -> [missing] (J2)
  • mem::offset_of_union: pass -> [missing] (J2)
  • num::f64::max: pass -> [missing] (J2)
  • num::i128::test_saturating_neg: pass -> [missing] (J2)
  • num::i16::test_abs: pass -> [missing] (J2)
  • num::i8::test_abs: pass -> [missing] (J2)
  • num::test_try_i16i16: pass -> [missing] (J2)
  • num::test_try_i16u64: pass -> [missing] (J2)
  • ops::test_range: pass -> [missing] (J2)
  • rc::test_rc_cyclic_with_one_ref: pass -> [missing] (J2)
  • slice::slice_index::rangeinclusive_len_len::pass: pass -> [missing] (J2)
  • slice::test_array_chunks_mut_zip: pass -> [missing] (J2)
  • slice::test_iterator_advance_back_by: pass -> [missing] (J2)
  • str::pattern::str_searcher_multibyte_haystack::fwd: pass -> [missing] (J2)
  • str::slice_index::boundary::rangeinclusive_2::index_fail: pass -> [missing] (J2)
  • str::test_char_indicesator: pass -> [missing] (J2)
  • sys_common::wtf8::tests::wtf8buf_push_char: pass -> [missing] (J2)
  • tests::smoke_no_dtor: pass -> [missing] (J2)
  • thread::tests::test_spawn_sched_childs_on_default_sched: pass -> [missing] (J2)
  • time::from_mins_overflow: pass -> [missing] (J2)
  • clean::types::tests::should_not_ignore_first_line_indent_in_a_single_line_para: pass -> [missing] (J3)
  • doctest::tests::make_test_named_wrapper: pass -> [missing] (J3)
  • error::verify_query_system_reentrant_0: pass -> [missing] (J3)
  • errors::ad_fallback::verify_builtin_macros_autodiff_not_build_35: pass -> [missing] (J3)
  • errors::verify_ast_lowering_register_class_only_clobber_stable_20: pass -> [missing] (J3)
  • errors::verify_ast_passes_optional_trait_supertrait_47: pass -> [missing] (J3)
  • errors::verify_mir_build_lower_range_bound_must_be_less_than_upper_7: pass -> [missing] (J3)
  • errors::verify_passes_used_static_76: pass -> [missing] (J3)
  • errors::verify_session_invalid_float_literal_width_36: pass -> [missing] (J3)
  • html::highlight::tests::test_keyword_highlight: pass -> [missing] (J3)
  • html::markdown::tests::test_lang_string_tokenizer: pass -> [missing] (J3)
  • lints::verify_lint_builtin_allow_internal_unsafe_6: pass -> [missing] (J3)
  • markdown::parse::tests::test_newline_breaks: pass -> [missing] (J3)
  • parser::tests::look_ahead_non_outermost_stream: pass -> [missing] (J3)
  • parser::tests::non_overlapping: pass -> [missing] (J3)
  • spec::tests::aarch64_be_unknown_linux_gnu_ilp32: pass -> [missing] (J3)
  • spec::tests::sparc64_unknown_netbsd: pass -> [missing] (J3)
  • spec::tests::x86_64_pc_cygwin: pass -> [missing] (J3)
  • tests::test_switch_implies_cfg_test: pass -> [missing] (J3)
  • tests::test_unterminated: pass -> [missing] (J3)
  • [ui] tests/rustdoc-ui/doctest/stdout-and-stderr.rs: [missing] -> pass (J4)
  • sys::process::unix::unix::unsupported_wait_status::tests::compare_with_linux: pass -> [missing] (J5)

Stage 2

  • sort::tests::stable::correct_i32_random_s50: [missing] -> ignore (J0)
  • sort::tests::stable::stability_i32_saw_mixed: [missing] -> ignore (J0)
  • sort::tests::unstable::correct_1k_random_d20: [missing] -> ignore (J0)
  • ascii::long::is_ascii_graphic: [missing] -> pass (J1)
  • btree::map::clone_slim_10k_and_remove_half: [missing] -> pass (J1)
  • hash::set_ops::set_is_subset: [missing] -> pass (J1)
  • num::int_log::u128_log_random_small: [missing] -> pass (J1)
  • num::int_sqrt::u64_sqrt_random_small: [missing] -> pass (J1)
  • sort::tests::stable::correct_1k_random: [missing] -> pass (J1)
  • sort::tests::stable::panic_retain_orig_set_cell_i32_ascending: [missing] -> pass (J1)
  • sort::tests::unstable::correct_i32_random_s50: [missing] -> pass (J1)
  • str::char_count::emoji_tiny::case00_libcore: [missing] -> pass (J1)
  • str::split_a_str::short_ascii: [missing] -> pass (J1)
  • str::split_slice: [missing] -> pass (J1)
  • time::instant_contention_16_threads: [missing] -> pass (J1)
  • collections::binary_heap::test_empty_peek: [missing] -> pass (J2)
  • collections::btree::map::tests::test_bad_zst: [missing] -> pass (J2)
  • f32::test_gamma: [missing] -> pass (J2)
  • ffi::os_str::tests::test_os_str_default: [missing] -> pass (J2)
  • fmt::float::test_format_f32_rounds_ties_to_even: [missing] -> pass (J2)
  • io::buffered::tests::test_buffered_reader_read_to_end_consumes_buffer: [missing] -> pass (J2)
  • nonzero::test_match_option_rc: [missing] -> pass (J2)
  • num::test_i16f64: [missing] -> pass (J2)
  • num::test_try_u8u8: [missing] -> pass (J2)
  • num::u32::test_isolate_most_significant_one: [missing] -> pass (J2)
  • slice::test_chunks_exact_mut_last: [missing] -> pass (J2)
  • slice::test_copy_from_slice_dst_shorter: [missing] -> pass (J2)
  • slice::test_rchunks_exact_iterator_0: [missing] -> pass (J2)
  • slice::test_rchunks_mut_next: [missing] -> pass (J2)
  • slice::test_rposition: [missing] -> pass (J2)
  • str::pattern::char_searcher_short_haystack::bwd: [missing] -> pass (J2)
  • str::slice_index::overflow::rangeinclusive::pass: [missing] -> pass (J2)
  • sync::test_arc_get_mut: [missing] -> pass (J2)
  • sync::test_from_str: [missing] -> pass (J2)
  • vec::test_pop_if: [missing] -> pass (J2)
  • errors::verify_expand_attribute_meta_item_16: [missing] -> pass (J3)
  • errors::verify_hir_typeck_field_multiply_specified_in_initializer_0: [missing] -> pass (J3)
  • graph::vec_graph::tests::predecessors: [missing] -> pass (J3)
  • leb128::tests::test_usize_leb128: [missing] -> pass (J3)
  • lints::verify_lint_identifier_non_ascii_char_73: [missing] -> pass (J3)
  • parser::tests::parse_exprs: [missing] -> pass (J3)

(and 16452 additional test diffs)

Additionally, 16518 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 8947e167e58c5c4f23cae94585301f8eb90d93ea --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 5108.6s -> 1675.4s (-67.2%)
  2. test-various: 4140.8s -> 2401.9s (-42.0%)
  3. x86_64-apple-1: 8455.0s -> 5498.7s (-35.0%)
  4. dist-aarch64-linux: 7758.9s -> 5339.1s (-31.2%)
  5. x86_64-gnu-aux: 5914.5s -> 4344.2s (-26.6%)
  6. dist-apple-various: 6337.5s -> 7828.5s (23.5%)
  7. aarch64-apple: 3916.6s -> 3111.3s (-20.6%)
  8. dist-x86_64-apple: 7777.3s -> 8962.8s (15.2%)
  9. x86_64-gnu-llvm-20-1: 6152.3s -> 5248.9s (-14.7%)
  10. dist-aarch64-apple: 5640.5s -> 5014.3s (-11.1%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (8947e16): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -0.8%, secondary -2.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
0.5%[0.5%, 0.5%]2
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-2.1%[-3.6%, -0.6%]2
Improvements ✅
(secondary)
-2.2%[-2.2%, -2.2%]1
All ❌✅ (primary)-0.8%[-3.6%, 0.5%]4

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 764.349s -> 763.457s (-0.12%)
Artifact size: 365.22 MiB -> 365.17 MiB (-0.01%)

@GuillaumeGomez
GuillaumeGomez deleted the doctest-2024-stdout branch April 28, 2025 09:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2024 doctests don't show stdout when failing

9 participants

@GuillaumeGomez@rust-log-analyzer@notriddle@bors@rust-timer@Kobzol@fmease@jieyouxu@rustbot
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Correctly display stdout and stderr in case a doctest is failing - #140291

Merged
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:doctest-2024-stdout
Apr 27, 2025
Merged

Correctly display stdout and stderr in case a doctest is failing#140291
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:doctest-2024-stdout

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

Fixes#140289.

Since the doctest is actually running itself, we need to handle the output directly inside it.

cc @fmease
r? @notriddle

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 25, 2025
Comment threadtests/rustdoc-ui/doctest/stdout-and-stderr.stdout Outdated
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Ok I think this time I didn't forget some normalization. :')

@GuillaumeGomez
GuillaumeGomezforce-pushed the doctest-2024-stdout branch 2 times, most recently from 3ef98a5 to c44068bCompareApril 25, 2025 20:06
@notriddle

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Apr 26, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit c44068b has been approved by notriddle

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 26, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Apr 26, 2025
…, r=notriddle
Correctly display stdout and stderr in case a doctest is failing
Fixesrust-lang#140289.
Since the doctest is actually running itself, we need to handle the output directly inside it.
cc `@fmease`
r? `@notriddle`
@jhprattjhpratt mentioned this pull request Apr 26, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 26, 2025
Rollup of 4 pull requests
Successful merges:
- rust-lang#139308 (add autodiff inline)
- rust-lang#140291 (Correctly display stdout and stderr in case a doctest is failing)
- rust-lang#140297 (Update example to use CStr::to_string_lossy)
- rust-lang#140339 (session: Cleanup `CanonicalizedPath::new`)
r? `@ghost`
`@rustbot` modify labels: rollup
tgross35 added a commit to tgross35/rust that referenced this pull request Apr 27, 2025
…, r=notriddle
Correctly display stdout and stderr in case a doctest is failing
Fixesrust-lang#140289.
Since the doctest is actually running itself, we need to handle the output directly inside it.
cc ``@fmease``
r? ``@notriddle``
@tgross35tgross35 mentioned this pull request Apr 27, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 27, 2025
Rollup of 7 pull requests
Successful merges:
- rust-lang#137439 (Stabilise `std::ffi::c_str`)
- rust-lang#138737 (uefi: Update r-efi)
- rust-lang#139646 (check types of const param defaults)
- rust-lang#140220 (Fix detection of main function if there are expressions around it)
- rust-lang#140291 (Correctly display stdout and stderr in case a doctest is failing)
- rust-lang#140297 (Update example to use CStr::to_string_lossy)
- rust-lang#140330 (Clarified bootstrap optimization "true" argument)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors

bors commented Apr 27, 2025

Copy link
Copy Markdown
Collaborator

⌛ Testing commit c44068b with merge 8947e16...

@bors

bors commented Apr 27, 2025

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: notriddle
Pushing 8947e16 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Apr 27, 2025
@bors
bors merged commit 8947e16 into rust-lang:masterApr 27, 2025
@rustbotrustbot added this to the 1.88.0 milestone Apr 27, 2025
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 496145b (parent) -> 8947e16 (this PR)

Test differences

Show 33070 test diffs

Stage 1

  • ascii::is_ascii::unaligned_both_medium::case01_iter_all: pass -> [missing] (J1)
  • iter::bench_peekable_ref_sum: pass -> [missing] (J1)
  • path::bench_hash_path_long: pass -> [missing] (J1)
  • sort::tests::stable::deterministic_i32_random: pass -> [missing] (J1)
  • str::rfind_zzz_char::short_pile_of_poo: pass -> [missing] (J1)
  • str::split_space_str::long_lorem_ipsum: pass -> [missing] (J1)
  • string::bench_insert_str_short: pass -> [missing] (J1)
  • tests::test_should_report_time: pass -> [missing] (J1)
  • vec::bench_dedup_all_100000: pass -> [missing] (J1)
  • collections::hash::map::tests::test_extend_ref: pass -> [missing] (J2)
  • collections::hash::map::tests::test_find_mut: pass -> [missing] (J2)
  • collections::linked_list::tests::test_iterator_double_end: pass -> [missing] (J2)
  • collections::vec_deque::tests::test_try_reserve_exact: pass -> [missing] (J2)
  • io::buffered::tests::test_buffered_reader_seek_underflow_discard_buffer_between_seeks: pass -> [missing] (J2)
  • iter::traits::iterator::test_find_map: pass -> [missing] (J2)
  • lazy::dropck: pass -> [missing] (J2)
  • lazy_lock::lazy_default: pass -> [missing] (J2)
  • mem::offset_of_alias: pass -> [missing] (J2)
  • mem::offset_of_union: pass -> [missing] (J2)
  • num::f64::max: pass -> [missing] (J2)
  • num::i128::test_saturating_neg: pass -> [missing] (J2)
  • num::i16::test_abs: pass -> [missing] (J2)
  • num::i8::test_abs: pass -> [missing] (J2)
  • num::test_try_i16i16: pass -> [missing] (J2)
  • num::test_try_i16u64: pass -> [missing] (J2)
  • ops::test_range: pass -> [missing] (J2)
  • rc::test_rc_cyclic_with_one_ref: pass -> [missing] (J2)
  • slice::slice_index::rangeinclusive_len_len::pass: pass -> [missing] (J2)
  • slice::test_array_chunks_mut_zip: pass -> [missing] (J2)
  • slice::test_iterator_advance_back_by: pass -> [missing] (J2)
  • str::pattern::str_searcher_multibyte_haystack::fwd: pass -> [missing] (J2)
  • str::slice_index::boundary::rangeinclusive_2::index_fail: pass -> [missing] (J2)
  • str::test_char_indicesator: pass -> [missing] (J2)
  • sys_common::wtf8::tests::wtf8buf_push_char: pass -> [missing] (J2)
  • tests::smoke_no_dtor: pass -> [missing] (J2)
  • thread::tests::test_spawn_sched_childs_on_default_sched: pass -> [missing] (J2)
  • time::from_mins_overflow: pass -> [missing] (J2)
  • clean::types::tests::should_not_ignore_first_line_indent_in_a_single_line_para: pass -> [missing] (J3)
  • doctest::tests::make_test_named_wrapper: pass -> [missing] (J3)
  • error::verify_query_system_reentrant_0: pass -> [missing] (J3)
  • errors::ad_fallback::verify_builtin_macros_autodiff_not_build_35: pass -> [missing] (J3)
  • errors::verify_ast_lowering_register_class_only_clobber_stable_20: pass -> [missing] (J3)
  • errors::verify_ast_passes_optional_trait_supertrait_47: pass -> [missing] (J3)
  • errors::verify_mir_build_lower_range_bound_must_be_less_than_upper_7: pass -> [missing] (J3)
  • errors::verify_passes_used_static_76: pass -> [missing] (J3)
  • errors::verify_session_invalid_float_literal_width_36: pass -> [missing] (J3)
  • html::highlight::tests::test_keyword_highlight: pass -> [missing] (J3)
  • html::markdown::tests::test_lang_string_tokenizer: pass -> [missing] (J3)
  • lints::verify_lint_builtin_allow_internal_unsafe_6: pass -> [missing] (J3)
  • markdown::parse::tests::test_newline_breaks: pass -> [missing] (J3)
  • parser::tests::look_ahead_non_outermost_stream: pass -> [missing] (J3)
  • parser::tests::non_overlapping: pass -> [missing] (J3)
  • spec::tests::aarch64_be_unknown_linux_gnu_ilp32: pass -> [missing] (J3)
  • spec::tests::sparc64_unknown_netbsd: pass -> [missing] (J3)
  • spec::tests::x86_64_pc_cygwin: pass -> [missing] (J3)
  • tests::test_switch_implies_cfg_test: pass -> [missing] (J3)
  • tests::test_unterminated: pass -> [missing] (J3)
  • [ui] tests/rustdoc-ui/doctest/stdout-and-stderr.rs: [missing] -> pass (J4)
  • sys::process::unix::unix::unsupported_wait_status::tests::compare_with_linux: pass -> [missing] (J5)

Stage 2

  • sort::tests::stable::correct_i32_random_s50: [missing] -> ignore (J0)
  • sort::tests::stable::stability_i32_saw_mixed: [missing] -> ignore (J0)
  • sort::tests::unstable::correct_1k_random_d20: [missing] -> ignore (J0)
  • ascii::long::is_ascii_graphic: [missing] -> pass (J1)
  • btree::map::clone_slim_10k_and_remove_half: [missing] -> pass (J1)
  • hash::set_ops::set_is_subset: [missing] -> pass (J1)
  • num::int_log::u128_log_random_small: [missing] -> pass (J1)
  • num::int_sqrt::u64_sqrt_random_small: [missing] -> pass (J1)
  • sort::tests::stable::correct_1k_random: [missing] -> pass (J1)
  • sort::tests::stable::panic_retain_orig_set_cell_i32_ascending: [missing] -> pass (J1)
  • sort::tests::unstable::correct_i32_random_s50: [missing] -> pass (J1)
  • str::char_count::emoji_tiny::case00_libcore: [missing] -> pass (J1)
  • str::split_a_str::short_ascii: [missing] -> pass (J1)
  • str::split_slice: [missing] -> pass (J1)
  • time::instant_contention_16_threads: [missing] -> pass (J1)
  • collections::binary_heap::test_empty_peek: [missing] -> pass (J2)
  • collections::btree::map::tests::test_bad_zst: [missing] -> pass (J2)
  • f32::test_gamma: [missing] -> pass (J2)
  • ffi::os_str::tests::test_os_str_default: [missing] -> pass (J2)
  • fmt::float::test_format_f32_rounds_ties_to_even: [missing] -> pass (J2)
  • io::buffered::tests::test_buffered_reader_read_to_end_consumes_buffer: [missing] -> pass (J2)
  • nonzero::test_match_option_rc: [missing] -> pass (J2)
  • num::test_i16f64: [missing] -> pass (J2)
  • num::test_try_u8u8: [missing] -> pass (J2)
  • num::u32::test_isolate_most_significant_one: [missing] -> pass (J2)
  • slice::test_chunks_exact_mut_last: [missing] -> pass (J2)
  • slice::test_copy_from_slice_dst_shorter: [missing] -> pass (J2)
  • slice::test_rchunks_exact_iterator_0: [missing] -> pass (J2)
  • slice::test_rchunks_mut_next: [missing] -> pass (J2)
  • slice::test_rposition: [missing] -> pass (J2)
  • str::pattern::char_searcher_short_haystack::bwd: [missing] -> pass (J2)
  • str::slice_index::overflow::rangeinclusive::pass: [missing] -> pass (J2)
  • sync::test_arc_get_mut: [missing] -> pass (J2)
  • sync::test_from_str: [missing] -> pass (J2)
  • vec::test_pop_if: [missing] -> pass (J2)
  • errors::verify_expand_attribute_meta_item_16: [missing] -> pass (J3)
  • errors::verify_hir_typeck_field_multiply_specified_in_initializer_0: [missing] -> pass (J3)
  • graph::vec_graph::tests::predecessors: [missing] -> pass (J3)
  • leb128::tests::test_usize_leb128: [missing] -> pass (J3)
  • lints::verify_lint_identifier_non_ascii_char_73: [missing] -> pass (J3)
  • parser::tests::parse_exprs: [missing] -> pass (J3)

(and 16452 additional test diffs)

Additionally, 16518 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 8947e167e58c5c4f23cae94585301f8eb90d93ea --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 5108.6s -> 1675.4s (-67.2%)
  2. test-various: 4140.8s -> 2401.9s (-42.0%)
  3. x86_64-apple-1: 8455.0s -> 5498.7s (-35.0%)
  4. dist-aarch64-linux: 7758.9s -> 5339.1s (-31.2%)
  5. x86_64-gnu-aux: 5914.5s -> 4344.2s (-26.6%)
  6. dist-apple-various: 6337.5s -> 7828.5s (23.5%)
  7. aarch64-apple: 3916.6s -> 3111.3s (-20.6%)
  8. dist-x86_64-apple: 7777.3s -> 8962.8s (15.2%)
  9. x86_64-gnu-llvm-20-1: 6152.3s -> 5248.9s (-14.7%)
  10. dist-aarch64-apple: 5640.5s -> 5014.3s (-11.1%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (8947e16): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -0.8%, secondary -2.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
0.5%[0.5%, 0.5%]2
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-2.1%[-3.6%, -0.6%]2
Improvements ✅
(secondary)
-2.2%[-2.2%, -2.2%]1
All ❌✅ (primary)-0.8%[-3.6%, 0.5%]4

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 764.349s -> 763.457s (-0.12%)
Artifact size: 365.22 MiB -> 365.17 MiB (-0.01%)

@GuillaumeGomez
GuillaumeGomez deleted the doctest-2024-stdout branch April 28, 2025 09:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2024 doctests don't show stdout when failing

9 participants

@GuillaumeGomez@rust-log-analyzer@notriddle@bors@rust-timer@Kobzol@fmease@jieyouxu@rustbot
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Correctly display stdout and stderr in case a doctest is failing - #140291

Merged
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:doctest-2024-stdout
Apr 27, 2025
Merged

Correctly display stdout and stderr in case a doctest is failing#140291
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:doctest-2024-stdout

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

Fixes#140289.

Since the doctest is actually running itself, we need to handle the output directly inside it.

cc @fmease
r? @notriddle

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 25, 2025
Comment threadtests/rustdoc-ui/doctest/stdout-and-stderr.stdout Outdated
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Ok I think this time I didn't forget some normalization. :')

@GuillaumeGomez
GuillaumeGomezforce-pushed the doctest-2024-stdout branch 2 times, most recently from 3ef98a5 to c44068bCompareApril 25, 2025 20:06
@notriddle

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Apr 26, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit c44068b has been approved by notriddle

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 26, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Apr 26, 2025
…, r=notriddle
Correctly display stdout and stderr in case a doctest is failing
Fixesrust-lang#140289.
Since the doctest is actually running itself, we need to handle the output directly inside it.
cc `@fmease`
r? `@notriddle`
@jhprattjhpratt mentioned this pull request Apr 26, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 26, 2025
Rollup of 4 pull requests
Successful merges:
- rust-lang#139308 (add autodiff inline)
- rust-lang#140291 (Correctly display stdout and stderr in case a doctest is failing)
- rust-lang#140297 (Update example to use CStr::to_string_lossy)
- rust-lang#140339 (session: Cleanup `CanonicalizedPath::new`)
r? `@ghost`
`@rustbot` modify labels: rollup
tgross35 added a commit to tgross35/rust that referenced this pull request Apr 27, 2025
…, r=notriddle
Correctly display stdout and stderr in case a doctest is failing
Fixesrust-lang#140289.
Since the doctest is actually running itself, we need to handle the output directly inside it.
cc ``@fmease``
r? ``@notriddle``
@tgross35tgross35 mentioned this pull request Apr 27, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 27, 2025
Rollup of 7 pull requests
Successful merges:
- rust-lang#137439 (Stabilise `std::ffi::c_str`)
- rust-lang#138737 (uefi: Update r-efi)
- rust-lang#139646 (check types of const param defaults)
- rust-lang#140220 (Fix detection of main function if there are expressions around it)
- rust-lang#140291 (Correctly display stdout and stderr in case a doctest is failing)
- rust-lang#140297 (Update example to use CStr::to_string_lossy)
- rust-lang#140330 (Clarified bootstrap optimization "true" argument)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors

bors commented Apr 27, 2025

Copy link
Copy Markdown
Collaborator

⌛ Testing commit c44068b with merge 8947e16...

@bors

bors commented Apr 27, 2025

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: notriddle
Pushing 8947e16 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Apr 27, 2025
@bors
bors merged commit 8947e16 into rust-lang:masterApr 27, 2025
@rustbotrustbot added this to the 1.88.0 milestone Apr 27, 2025
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 496145b (parent) -> 8947e16 (this PR)

Test differences

Show 33070 test diffs

Stage 1

  • ascii::is_ascii::unaligned_both_medium::case01_iter_all: pass -> [missing] (J1)
  • iter::bench_peekable_ref_sum: pass -> [missing] (J1)
  • path::bench_hash_path_long: pass -> [missing] (J1)
  • sort::tests::stable::deterministic_i32_random: pass -> [missing] (J1)
  • str::rfind_zzz_char::short_pile_of_poo: pass -> [missing] (J1)
  • str::split_space_str::long_lorem_ipsum: pass -> [missing] (J1)
  • string::bench_insert_str_short: pass -> [missing] (J1)
  • tests::test_should_report_time: pass -> [missing] (J1)
  • vec::bench_dedup_all_100000: pass -> [missing] (J1)
  • collections::hash::map::tests::test_extend_ref: pass -> [missing] (J2)
  • collections::hash::map::tests::test_find_mut: pass -> [missing] (J2)
  • collections::linked_list::tests::test_iterator_double_end: pass -> [missing] (J2)
  • collections::vec_deque::tests::test_try_reserve_exact: pass -> [missing] (J2)
  • io::buffered::tests::test_buffered_reader_seek_underflow_discard_buffer_between_seeks: pass -> [missing] (J2)
  • iter::traits::iterator::test_find_map: pass -> [missing] (J2)
  • lazy::dropck: pass -> [missing] (J2)
  • lazy_lock::lazy_default: pass -> [missing] (J2)
  • mem::offset_of_alias: pass -> [missing] (J2)
  • mem::offset_of_union: pass -> [missing] (J2)
  • num::f64::max: pass -> [missing] (J2)
  • num::i128::test_saturating_neg: pass -> [missing] (J2)
  • num::i16::test_abs: pass -> [missing] (J2)
  • num::i8::test_abs: pass -> [missing] (J2)
  • num::test_try_i16i16: pass -> [missing] (J2)
  • num::test_try_i16u64: pass -> [missing] (J2)
  • ops::test_range: pass -> [missing] (J2)
  • rc::test_rc_cyclic_with_one_ref: pass -> [missing] (J2)
  • slice::slice_index::rangeinclusive_len_len::pass: pass -> [missing] (J2)
  • slice::test_array_chunks_mut_zip: pass -> [missing] (J2)
  • slice::test_iterator_advance_back_by: pass -> [missing] (J2)
  • str::pattern::str_searcher_multibyte_haystack::fwd: pass -> [missing] (J2)
  • str::slice_index::boundary::rangeinclusive_2::index_fail: pass -> [missing] (J2)
  • str::test_char_indicesator: pass -> [missing] (J2)
  • sys_common::wtf8::tests::wtf8buf_push_char: pass -> [missing] (J2)
  • tests::smoke_no_dtor: pass -> [missing] (J2)
  • thread::tests::test_spawn_sched_childs_on_default_sched: pass -> [missing] (J2)
  • time::from_mins_overflow: pass -> [missing] (J2)
  • clean::types::tests::should_not_ignore_first_line_indent_in_a_single_line_para: pass -> [missing] (J3)
  • doctest::tests::make_test_named_wrapper: pass -> [missing] (J3)
  • error::verify_query_system_reentrant_0: pass -> [missing] (J3)
  • errors::ad_fallback::verify_builtin_macros_autodiff_not_build_35: pass -> [missing] (J3)
  • errors::verify_ast_lowering_register_class_only_clobber_stable_20: pass -> [missing] (J3)
  • errors::verify_ast_passes_optional_trait_supertrait_47: pass -> [missing] (J3)
  • errors::verify_mir_build_lower_range_bound_must_be_less_than_upper_7: pass -> [missing] (J3)
  • errors::verify_passes_used_static_76: pass -> [missing] (J3)
  • errors::verify_session_invalid_float_literal_width_36: pass -> [missing] (J3)
  • html::highlight::tests::test_keyword_highlight: pass -> [missing] (J3)
  • html::markdown::tests::test_lang_string_tokenizer: pass -> [missing] (J3)
  • lints::verify_lint_builtin_allow_internal_unsafe_6: pass -> [missing] (J3)
  • markdown::parse::tests::test_newline_breaks: pass -> [missing] (J3)
  • parser::tests::look_ahead_non_outermost_stream: pass -> [missing] (J3)
  • parser::tests::non_overlapping: pass -> [missing] (J3)
  • spec::tests::aarch64_be_unknown_linux_gnu_ilp32: pass -> [missing] (J3)
  • spec::tests::sparc64_unknown_netbsd: pass -> [missing] (J3)
  • spec::tests::x86_64_pc_cygwin: pass -> [missing] (J3)
  • tests::test_switch_implies_cfg_test: pass -> [missing] (J3)
  • tests::test_unterminated: pass -> [missing] (J3)
  • [ui] tests/rustdoc-ui/doctest/stdout-and-stderr.rs: [missing] -> pass (J4)
  • sys::process::unix::unix::unsupported_wait_status::tests::compare_with_linux: pass -> [missing] (J5)

Stage 2

  • sort::tests::stable::correct_i32_random_s50: [missing] -> ignore (J0)
  • sort::tests::stable::stability_i32_saw_mixed: [missing] -> ignore (J0)
  • sort::tests::unstable::correct_1k_random_d20: [missing] -> ignore (J0)
  • ascii::long::is_ascii_graphic: [missing] -> pass (J1)
  • btree::map::clone_slim_10k_and_remove_half: [missing] -> pass (J1)
  • hash::set_ops::set_is_subset: [missing] -> pass (J1)
  • num::int_log::u128_log_random_small: [missing] -> pass (J1)
  • num::int_sqrt::u64_sqrt_random_small: [missing] -> pass (J1)
  • sort::tests::stable::correct_1k_random: [missing] -> pass (J1)
  • sort::tests::stable::panic_retain_orig_set_cell_i32_ascending: [missing] -> pass (J1)
  • sort::tests::unstable::correct_i32_random_s50: [missing] -> pass (J1)
  • str::char_count::emoji_tiny::case00_libcore: [missing] -> pass (J1)
  • str::split_a_str::short_ascii: [missing] -> pass (J1)
  • str::split_slice: [missing] -> pass (J1)
  • time::instant_contention_16_threads: [missing] -> pass (J1)
  • collections::binary_heap::test_empty_peek: [missing] -> pass (J2)
  • collections::btree::map::tests::test_bad_zst: [missing] -> pass (J2)
  • f32::test_gamma: [missing] -> pass (J2)
  • ffi::os_str::tests::test_os_str_default: [missing] -> pass (J2)
  • fmt::float::test_format_f32_rounds_ties_to_even: [missing] -> pass (J2)
  • io::buffered::tests::test_buffered_reader_read_to_end_consumes_buffer: [missing] -> pass (J2)
  • nonzero::test_match_option_rc: [missing] -> pass (J2)
  • num::test_i16f64: [missing] -> pass (J2)
  • num::test_try_u8u8: [missing] -> pass (J2)
  • num::u32::test_isolate_most_significant_one: [missing] -> pass (J2)
  • slice::test_chunks_exact_mut_last: [missing] -> pass (J2)
  • slice::test_copy_from_slice_dst_shorter: [missing] -> pass (J2)
  • slice::test_rchunks_exact_iterator_0: [missing] -> pass (J2)
  • slice::test_rchunks_mut_next: [missing] -> pass (J2)
  • slice::test_rposition: [missing] -> pass (J2)
  • str::pattern::char_searcher_short_haystack::bwd: [missing] -> pass (J2)
  • str::slice_index::overflow::rangeinclusive::pass: [missing] -> pass (J2)
  • sync::test_arc_get_mut: [missing] -> pass (J2)
  • sync::test_from_str: [missing] -> pass (J2)
  • vec::test_pop_if: [missing] -> pass (J2)
  • errors::verify_expand_attribute_meta_item_16: [missing] -> pass (J3)
  • errors::verify_hir_typeck_field_multiply_specified_in_initializer_0: [missing] -> pass (J3)
  • graph::vec_graph::tests::predecessors: [missing] -> pass (J3)
  • leb128::tests::test_usize_leb128: [missing] -> pass (J3)
  • lints::verify_lint_identifier_non_ascii_char_73: [missing] -> pass (J3)
  • parser::tests::parse_exprs: [missing] -> pass (J3)

(and 16452 additional test diffs)

Additionally, 16518 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 8947e167e58c5c4f23cae94585301f8eb90d93ea --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 5108.6s -> 1675.4s (-67.2%)
  2. test-various: 4140.8s -> 2401.9s (-42.0%)
  3. x86_64-apple-1: 8455.0s -> 5498.7s (-35.0%)
  4. dist-aarch64-linux: 7758.9s -> 5339.1s (-31.2%)
  5. x86_64-gnu-aux: 5914.5s -> 4344.2s (-26.6%)
  6. dist-apple-various: 6337.5s -> 7828.5s (23.5%)
  7. aarch64-apple: 3916.6s -> 3111.3s (-20.6%)
  8. dist-x86_64-apple: 7777.3s -> 8962.8s (15.2%)
  9. x86_64-gnu-llvm-20-1: 6152.3s -> 5248.9s (-14.7%)
  10. dist-aarch64-apple: 5640.5s -> 5014.3s (-11.1%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (8947e16): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -0.8%, secondary -2.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
0.5%[0.5%, 0.5%]2
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-2.1%[-3.6%, -0.6%]2
Improvements ✅
(secondary)
-2.2%[-2.2%, -2.2%]1
All ❌✅ (primary)-0.8%[-3.6%, 0.5%]4

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 764.349s -> 763.457s (-0.12%)
Artifact size: 365.22 MiB -> 365.17 MiB (-0.01%)

@GuillaumeGomez
GuillaumeGomez deleted the doctest-2024-stdout branch April 28, 2025 09:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2024 doctests don't show stdout when failing

9 participants

@GuillaumeGomez@rust-log-analyzer@notriddle@bors@rust-timer@Kobzol@fmease@jieyouxu@rustbot
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Correctly display stdout and stderr in case a doctest is failing - #140291

Merged
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:doctest-2024-stdout
Apr 27, 2025
Merged

Correctly display stdout and stderr in case a doctest is failing#140291
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:doctest-2024-stdout

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

Fixes#140289.

Since the doctest is actually running itself, we need to handle the output directly inside it.

cc @fmease
r? @notriddle

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 25, 2025
Comment threadtests/rustdoc-ui/doctest/stdout-and-stderr.stdout Outdated
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Ok I think this time I didn't forget some normalization. :')

@GuillaumeGomez
GuillaumeGomezforce-pushed the doctest-2024-stdout branch 2 times, most recently from 3ef98a5 to c44068bCompareApril 25, 2025 20:06
@notriddle

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Apr 26, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit c44068b has been approved by notriddle

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 26, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Apr 26, 2025
…, r=notriddle
Correctly display stdout and stderr in case a doctest is failing
Fixesrust-lang#140289.
Since the doctest is actually running itself, we need to handle the output directly inside it.
cc `@fmease`
r? `@notriddle`
@jhprattjhpratt mentioned this pull request Apr 26, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 26, 2025
Rollup of 4 pull requests
Successful merges:
- rust-lang#139308 (add autodiff inline)
- rust-lang#140291 (Correctly display stdout and stderr in case a doctest is failing)
- rust-lang#140297 (Update example to use CStr::to_string_lossy)
- rust-lang#140339 (session: Cleanup `CanonicalizedPath::new`)
r? `@ghost`
`@rustbot` modify labels: rollup
tgross35 added a commit to tgross35/rust that referenced this pull request Apr 27, 2025
…, r=notriddle
Correctly display stdout and stderr in case a doctest is failing
Fixesrust-lang#140289.
Since the doctest is actually running itself, we need to handle the output directly inside it.
cc ``@fmease``
r? ``@notriddle``
@tgross35tgross35 mentioned this pull request Apr 27, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 27, 2025
Rollup of 7 pull requests
Successful merges:
- rust-lang#137439 (Stabilise `std::ffi::c_str`)
- rust-lang#138737 (uefi: Update r-efi)
- rust-lang#139646 (check types of const param defaults)
- rust-lang#140220 (Fix detection of main function if there are expressions around it)
- rust-lang#140291 (Correctly display stdout and stderr in case a doctest is failing)
- rust-lang#140297 (Update example to use CStr::to_string_lossy)
- rust-lang#140330 (Clarified bootstrap optimization "true" argument)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors

bors commented Apr 27, 2025

Copy link
Copy Markdown
Collaborator

⌛ Testing commit c44068b with merge 8947e16...

@bors

bors commented Apr 27, 2025

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: notriddle
Pushing 8947e16 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Apr 27, 2025
@bors
bors merged commit 8947e16 into rust-lang:masterApr 27, 2025
@rustbotrustbot added this to the 1.88.0 milestone Apr 27, 2025
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 496145b (parent) -> 8947e16 (this PR)

Test differences

Show 33070 test diffs

Stage 1

  • ascii::is_ascii::unaligned_both_medium::case01_iter_all: pass -> [missing] (J1)
  • iter::bench_peekable_ref_sum: pass -> [missing] (J1)
  • path::bench_hash_path_long: pass -> [missing] (J1)
  • sort::tests::stable::deterministic_i32_random: pass -> [missing] (J1)
  • str::rfind_zzz_char::short_pile_of_poo: pass -> [missing] (J1)
  • str::split_space_str::long_lorem_ipsum: pass -> [missing] (J1)
  • string::bench_insert_str_short: pass -> [missing] (J1)
  • tests::test_should_report_time: pass -> [missing] (J1)
  • vec::bench_dedup_all_100000: pass -> [missing] (J1)
  • collections::hash::map::tests::test_extend_ref: pass -> [missing] (J2)
  • collections::hash::map::tests::test_find_mut: pass -> [missing] (J2)
  • collections::linked_list::tests::test_iterator_double_end: pass -> [missing] (J2)
  • collections::vec_deque::tests::test_try_reserve_exact: pass -> [missing] (J2)
  • io::buffered::tests::test_buffered_reader_seek_underflow_discard_buffer_between_seeks: pass -> [missing] (J2)
  • iter::traits::iterator::test_find_map: pass -> [missing] (J2)
  • lazy::dropck: pass -> [missing] (J2)
  • lazy_lock::lazy_default: pass -> [missing] (J2)
  • mem::offset_of_alias: pass -> [missing] (J2)
  • mem::offset_of_union: pass -> [missing] (J2)
  • num::f64::max: pass -> [missing] (J2)
  • num::i128::test_saturating_neg: pass -> [missing] (J2)
  • num::i16::test_abs: pass -> [missing] (J2)
  • num::i8::test_abs: pass -> [missing] (J2)
  • num::test_try_i16i16: pass -> [missing] (J2)
  • num::test_try_i16u64: pass -> [missing] (J2)
  • ops::test_range: pass -> [missing] (J2)
  • rc::test_rc_cyclic_with_one_ref: pass -> [missing] (J2)
  • slice::slice_index::rangeinclusive_len_len::pass: pass -> [missing] (J2)
  • slice::test_array_chunks_mut_zip: pass -> [missing] (J2)
  • slice::test_iterator_advance_back_by: pass -> [missing] (J2)
  • str::pattern::str_searcher_multibyte_haystack::fwd: pass -> [missing] (J2)
  • str::slice_index::boundary::rangeinclusive_2::index_fail: pass -> [missing] (J2)
  • str::test_char_indicesator: pass -> [missing] (J2)
  • sys_common::wtf8::tests::wtf8buf_push_char: pass -> [missing] (J2)
  • tests::smoke_no_dtor: pass -> [missing] (J2)
  • thread::tests::test_spawn_sched_childs_on_default_sched: pass -> [missing] (J2)
  • time::from_mins_overflow: pass -> [missing] (J2)
  • clean::types::tests::should_not_ignore_first_line_indent_in_a_single_line_para: pass -> [missing] (J3)
  • doctest::tests::make_test_named_wrapper: pass -> [missing] (J3)
  • error::verify_query_system_reentrant_0: pass -> [missing] (J3)
  • errors::ad_fallback::verify_builtin_macros_autodiff_not_build_35: pass -> [missing] (J3)
  • errors::verify_ast_lowering_register_class_only_clobber_stable_20: pass -> [missing] (J3)
  • errors::verify_ast_passes_optional_trait_supertrait_47: pass -> [missing] (J3)
  • errors::verify_mir_build_lower_range_bound_must_be_less_than_upper_7: pass -> [missing] (J3)
  • errors::verify_passes_used_static_76: pass -> [missing] (J3)
  • errors::verify_session_invalid_float_literal_width_36: pass -> [missing] (J3)
  • html::highlight::tests::test_keyword_highlight: pass -> [missing] (J3)
  • html::markdown::tests::test_lang_string_tokenizer: pass -> [missing] (J3)
  • lints::verify_lint_builtin_allow_internal_unsafe_6: pass -> [missing] (J3)
  • markdown::parse::tests::test_newline_breaks: pass -> [missing] (J3)
  • parser::tests::look_ahead_non_outermost_stream: pass -> [missing] (J3)
  • parser::tests::non_overlapping: pass -> [missing] (J3)
  • spec::tests::aarch64_be_unknown_linux_gnu_ilp32: pass -> [missing] (J3)
  • spec::tests::sparc64_unknown_netbsd: pass -> [missing] (J3)
  • spec::tests::x86_64_pc_cygwin: pass -> [missing] (J3)
  • tests::test_switch_implies_cfg_test: pass -> [missing] (J3)
  • tests::test_unterminated: pass -> [missing] (J3)
  • [ui] tests/rustdoc-ui/doctest/stdout-and-stderr.rs: [missing] -> pass (J4)
  • sys::process::unix::unix::unsupported_wait_status::tests::compare_with_linux: pass -> [missing] (J5)

Stage 2

  • sort::tests::stable::correct_i32_random_s50: [missing] -> ignore (J0)
  • sort::tests::stable::stability_i32_saw_mixed: [missing] -> ignore (J0)
  • sort::tests::unstable::correct_1k_random_d20: [missing] -> ignore (J0)
  • ascii::long::is_ascii_graphic: [missing] -> pass (J1)
  • btree::map::clone_slim_10k_and_remove_half: [missing] -> pass (J1)
  • hash::set_ops::set_is_subset: [missing] -> pass (J1)
  • num::int_log::u128_log_random_small: [missing] -> pass (J1)
  • num::int_sqrt::u64_sqrt_random_small: [missing] -> pass (J1)
  • sort::tests::stable::correct_1k_random: [missing] -> pass (J1)
  • sort::tests::stable::panic_retain_orig_set_cell_i32_ascending: [missing] -> pass (J1)
  • sort::tests::unstable::correct_i32_random_s50: [missing] -> pass (J1)
  • str::char_count::emoji_tiny::case00_libcore: [missing] -> pass (J1)
  • str::split_a_str::short_ascii: [missing] -> pass (J1)
  • str::split_slice: [missing] -> pass (J1)
  • time::instant_contention_16_threads: [missing] -> pass (J1)
  • collections::binary_heap::test_empty_peek: [missing] -> pass (J2)
  • collections::btree::map::tests::test_bad_zst: [missing] -> pass (J2)
  • f32::test_gamma: [missing] -> pass (J2)
  • ffi::os_str::tests::test_os_str_default: [missing] -> pass (J2)
  • fmt::float::test_format_f32_rounds_ties_to_even: [missing] -> pass (J2)
  • io::buffered::tests::test_buffered_reader_read_to_end_consumes_buffer: [missing] -> pass (J2)
  • nonzero::test_match_option_rc: [missing] -> pass (J2)
  • num::test_i16f64: [missing] -> pass (J2)
  • num::test_try_u8u8: [missing] -> pass (J2)
  • num::u32::test_isolate_most_significant_one: [missing] -> pass (J2)
  • slice::test_chunks_exact_mut_last: [missing] -> pass (J2)
  • slice::test_copy_from_slice_dst_shorter: [missing] -> pass (J2)
  • slice::test_rchunks_exact_iterator_0: [missing] -> pass (J2)
  • slice::test_rchunks_mut_next: [missing] -> pass (J2)
  • slice::test_rposition: [missing] -> pass (J2)
  • str::pattern::char_searcher_short_haystack::bwd: [missing] -> pass (J2)
  • str::slice_index::overflow::rangeinclusive::pass: [missing] -> pass (J2)
  • sync::test_arc_get_mut: [missing] -> pass (J2)
  • sync::test_from_str: [missing] -> pass (J2)
  • vec::test_pop_if: [missing] -> pass (J2)
  • errors::verify_expand_attribute_meta_item_16: [missing] -> pass (J3)
  • errors::verify_hir_typeck_field_multiply_specified_in_initializer_0: [missing] -> pass (J3)
  • graph::vec_graph::tests::predecessors: [missing] -> pass (J3)
  • leb128::tests::test_usize_leb128: [missing] -> pass (J3)
  • lints::verify_lint_identifier_non_ascii_char_73: [missing] -> pass (J3)
  • parser::tests::parse_exprs: [missing] -> pass (J3)

(and 16452 additional test diffs)

Additionally, 16518 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 8947e167e58c5c4f23cae94585301f8eb90d93ea --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 5108.6s -> 1675.4s (-67.2%)
  2. test-various: 4140.8s -> 2401.9s (-42.0%)
  3. x86_64-apple-1: 8455.0s -> 5498.7s (-35.0%)
  4. dist-aarch64-linux: 7758.9s -> 5339.1s (-31.2%)
  5. x86_64-gnu-aux: 5914.5s -> 4344.2s (-26.6%)
  6. dist-apple-various: 6337.5s -> 7828.5s (23.5%)
  7. aarch64-apple: 3916.6s -> 3111.3s (-20.6%)
  8. dist-x86_64-apple: 7777.3s -> 8962.8s (15.2%)
  9. x86_64-gnu-llvm-20-1: 6152.3s -> 5248.9s (-14.7%)
  10. dist-aarch64-apple: 5640.5s -> 5014.3s (-11.1%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (8947e16): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -0.8%, secondary -2.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
0.5%[0.5%, 0.5%]2
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-2.1%[-3.6%, -0.6%]2
Improvements ✅
(secondary)
-2.2%[-2.2%, -2.2%]1
All ❌✅ (primary)-0.8%[-3.6%, 0.5%]4

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 764.349s -> 763.457s (-0.12%)
Artifact size: 365.22 MiB -> 365.17 MiB (-0.01%)

@GuillaumeGomez
GuillaumeGomez deleted the doctest-2024-stdout branch April 28, 2025 09:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2024 doctests don't show stdout when failing

9 participants

@GuillaumeGomez@rust-log-analyzer@notriddle@bors@rust-timer@Kobzol@fmease@jieyouxu@rustbot
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Correctly display stdout and stderr in case a doctest is failing - #140291

Merged
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:doctest-2024-stdout
Apr 27, 2025
Merged

Correctly display stdout and stderr in case a doctest is failing#140291
bors merged 2 commits into
rust-lang:masterfrom
GuillaumeGomez:doctest-2024-stdout

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

Fixes#140289.

Since the doctest is actually running itself, we need to handle the output directly inside it.

cc @fmease
r? @notriddle

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 25, 2025
Comment threadtests/rustdoc-ui/doctest/stdout-and-stderr.stdout Outdated
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

Ok I think this time I didn't forget some normalization. :')

@GuillaumeGomez
GuillaumeGomezforce-pushed the doctest-2024-stdout branch 2 times, most recently from 3ef98a5 to c44068bCompareApril 25, 2025 20:06
@notriddle

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Apr 26, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit c44068b has been approved by notriddle

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 26, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Apr 26, 2025
…, r=notriddle
Correctly display stdout and stderr in case a doctest is failing
Fixesrust-lang#140289.
Since the doctest is actually running itself, we need to handle the output directly inside it.
cc `@fmease`
r? `@notriddle`
@jhprattjhpratt mentioned this pull request Apr 26, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 26, 2025
Rollup of 4 pull requests
Successful merges:
- rust-lang#139308 (add autodiff inline)
- rust-lang#140291 (Correctly display stdout and stderr in case a doctest is failing)
- rust-lang#140297 (Update example to use CStr::to_string_lossy)
- rust-lang#140339 (session: Cleanup `CanonicalizedPath::new`)
r? `@ghost`
`@rustbot` modify labels: rollup
tgross35 added a commit to tgross35/rust that referenced this pull request Apr 27, 2025
…, r=notriddle
Correctly display stdout and stderr in case a doctest is failing
Fixesrust-lang#140289.
Since the doctest is actually running itself, we need to handle the output directly inside it.
cc ``@fmease``
r? ``@notriddle``
@tgross35tgross35 mentioned this pull request Apr 27, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 27, 2025
Rollup of 7 pull requests
Successful merges:
- rust-lang#137439 (Stabilise `std::ffi::c_str`)
- rust-lang#138737 (uefi: Update r-efi)
- rust-lang#139646 (check types of const param defaults)
- rust-lang#140220 (Fix detection of main function if there are expressions around it)
- rust-lang#140291 (Correctly display stdout and stderr in case a doctest is failing)
- rust-lang#140297 (Update example to use CStr::to_string_lossy)
- rust-lang#140330 (Clarified bootstrap optimization "true" argument)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors

bors commented Apr 27, 2025

Copy link
Copy Markdown
Collaborator

⌛ Testing commit c44068b with merge 8947e16...

@bors

bors commented Apr 27, 2025

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: notriddle
Pushing 8947e16 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Apr 27, 2025
@bors
bors merged commit 8947e16 into rust-lang:masterApr 27, 2025
@rustbotrustbot added this to the 1.88.0 milestone Apr 27, 2025
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 496145b (parent) -> 8947e16 (this PR)

Test differences

Show 33070 test diffs

Stage 1

  • ascii::is_ascii::unaligned_both_medium::case01_iter_all: pass -> [missing] (J1)
  • iter::bench_peekable_ref_sum: pass -> [missing] (J1)
  • path::bench_hash_path_long: pass -> [missing] (J1)
  • sort::tests::stable::deterministic_i32_random: pass -> [missing] (J1)
  • str::rfind_zzz_char::short_pile_of_poo: pass -> [missing] (J1)
  • str::split_space_str::long_lorem_ipsum: pass -> [missing] (J1)
  • string::bench_insert_str_short: pass -> [missing] (J1)
  • tests::test_should_report_time: pass -> [missing] (J1)
  • vec::bench_dedup_all_100000: pass -> [missing] (J1)
  • collections::hash::map::tests::test_extend_ref: pass -> [missing] (J2)
  • collections::hash::map::tests::test_find_mut: pass -> [missing] (J2)
  • collections::linked_list::tests::test_iterator_double_end: pass -> [missing] (J2)
  • collections::vec_deque::tests::test_try_reserve_exact: pass -> [missing] (J2)
  • io::buffered::tests::test_buffered_reader_seek_underflow_discard_buffer_between_seeks: pass -> [missing] (J2)
  • iter::traits::iterator::test_find_map: pass -> [missing] (J2)
  • lazy::dropck: pass -> [missing] (J2)
  • lazy_lock::lazy_default: pass -> [missing] (J2)
  • mem::offset_of_alias: pass -> [missing] (J2)
  • mem::offset_of_union: pass -> [missing] (J2)
  • num::f64::max: pass -> [missing] (J2)
  • num::i128::test_saturating_neg: pass -> [missing] (J2)
  • num::i16::test_abs: pass -> [missing] (J2)
  • num::i8::test_abs: pass -> [missing] (J2)
  • num::test_try_i16i16: pass -> [missing] (J2)
  • num::test_try_i16u64: pass -> [missing] (J2)
  • ops::test_range: pass -> [missing] (J2)
  • rc::test_rc_cyclic_with_one_ref: pass -> [missing] (J2)
  • slice::slice_index::rangeinclusive_len_len::pass: pass -> [missing] (J2)
  • slice::test_array_chunks_mut_zip: pass -> [missing] (J2)
  • slice::test_iterator_advance_back_by: pass -> [missing] (J2)
  • str::pattern::str_searcher_multibyte_haystack::fwd: pass -> [missing] (J2)
  • str::slice_index::boundary::rangeinclusive_2::index_fail: pass -> [missing] (J2)
  • str::test_char_indicesator: pass -> [missing] (J2)
  • sys_common::wtf8::tests::wtf8buf_push_char: pass -> [missing] (J2)
  • tests::smoke_no_dtor: pass -> [missing] (J2)
  • thread::tests::test_spawn_sched_childs_on_default_sched: pass -> [missing] (J2)
  • time::from_mins_overflow: pass -> [missing] (J2)
  • clean::types::tests::should_not_ignore_first_line_indent_in_a_single_line_para: pass -> [missing] (J3)
  • doctest::tests::make_test_named_wrapper: pass -> [missing] (J3)
  • error::verify_query_system_reentrant_0: pass -> [missing] (J3)
  • errors::ad_fallback::verify_builtin_macros_autodiff_not_build_35: pass -> [missing] (J3)
  • errors::verify_ast_lowering_register_class_only_clobber_stable_20: pass -> [missing] (J3)
  • errors::verify_ast_passes_optional_trait_supertrait_47: pass -> [missing] (J3)
  • errors::verify_mir_build_lower_range_bound_must_be_less_than_upper_7: pass -> [missing] (J3)
  • errors::verify_passes_used_static_76: pass -> [missing] (J3)
  • errors::verify_session_invalid_float_literal_width_36: pass -> [missing] (J3)
  • html::highlight::tests::test_keyword_highlight: pass -> [missing] (J3)
  • html::markdown::tests::test_lang_string_tokenizer: pass -> [missing] (J3)
  • lints::verify_lint_builtin_allow_internal_unsafe_6: pass -> [missing] (J3)
  • markdown::parse::tests::test_newline_breaks: pass -> [missing] (J3)
  • parser::tests::look_ahead_non_outermost_stream: pass -> [missing] (J3)
  • parser::tests::non_overlapping: pass -> [missing] (J3)
  • spec::tests::aarch64_be_unknown_linux_gnu_ilp32: pass -> [missing] (J3)
  • spec::tests::sparc64_unknown_netbsd: pass -> [missing] (J3)
  • spec::tests::x86_64_pc_cygwin: pass -> [missing] (J3)
  • tests::test_switch_implies_cfg_test: pass -> [missing] (J3)
  • tests::test_unterminated: pass -> [missing] (J3)
  • [ui] tests/rustdoc-ui/doctest/stdout-and-stderr.rs: [missing] -> pass (J4)
  • sys::process::unix::unix::unsupported_wait_status::tests::compare_with_linux: pass -> [missing] (J5)

Stage 2

  • sort::tests::stable::correct_i32_random_s50: [missing] -> ignore (J0)
  • sort::tests::stable::stability_i32_saw_mixed: [missing] -> ignore (J0)
  • sort::tests::unstable::correct_1k_random_d20: [missing] -> ignore (J0)
  • ascii::long::is_ascii_graphic: [missing] -> pass (J1)
  • btree::map::clone_slim_10k_and_remove_half: [missing] -> pass (J1)
  • hash::set_ops::set_is_subset: [missing] -> pass (J1)
  • num::int_log::u128_log_random_small: [missing] -> pass (J1)
  • num::int_sqrt::u64_sqrt_random_small: [missing] -> pass (J1)
  • sort::tests::stable::correct_1k_random: [missing] -> pass (J1)
  • sort::tests::stable::panic_retain_orig_set_cell_i32_ascending: [missing] -> pass (J1)
  • sort::tests::unstable::correct_i32_random_s50: [missing] -> pass (J1)
  • str::char_count::emoji_tiny::case00_libcore: [missing] -> pass (J1)
  • str::split_a_str::short_ascii: [missing] -> pass (J1)
  • str::split_slice: [missing] -> pass (J1)
  • time::instant_contention_16_threads: [missing] -> pass (J1)
  • collections::binary_heap::test_empty_peek: [missing] -> pass (J2)
  • collections::btree::map::tests::test_bad_zst: [missing] -> pass (J2)
  • f32::test_gamma: [missing] -> pass (J2)
  • ffi::os_str::tests::test_os_str_default: [missing] -> pass (J2)
  • fmt::float::test_format_f32_rounds_ties_to_even: [missing] -> pass (J2)
  • io::buffered::tests::test_buffered_reader_read_to_end_consumes_buffer: [missing] -> pass (J2)
  • nonzero::test_match_option_rc: [missing] -> pass (J2)
  • num::test_i16f64: [missing] -> pass (J2)
  • num::test_try_u8u8: [missing] -> pass (J2)
  • num::u32::test_isolate_most_significant_one: [missing] -> pass (J2)
  • slice::test_chunks_exact_mut_last: [missing] -> pass (J2)
  • slice::test_copy_from_slice_dst_shorter: [missing] -> pass (J2)
  • slice::test_rchunks_exact_iterator_0: [missing] -> pass (J2)
  • slice::test_rchunks_mut_next: [missing] -> pass (J2)
  • slice::test_rposition: [missing] -> pass (J2)
  • str::pattern::char_searcher_short_haystack::bwd: [missing] -> pass (J2)
  • str::slice_index::overflow::rangeinclusive::pass: [missing] -> pass (J2)
  • sync::test_arc_get_mut: [missing] -> pass (J2)
  • sync::test_from_str: [missing] -> pass (J2)
  • vec::test_pop_if: [missing] -> pass (J2)
  • errors::verify_expand_attribute_meta_item_16: [missing] -> pass (J3)
  • errors::verify_hir_typeck_field_multiply_specified_in_initializer_0: [missing] -> pass (J3)
  • graph::vec_graph::tests::predecessors: [missing] -> pass (J3)
  • leb128::tests::test_usize_leb128: [missing] -> pass (J3)
  • lints::verify_lint_identifier_non_ascii_char_73: [missing] -> pass (J3)
  • parser::tests::parse_exprs: [missing] -> pass (J3)

(and 16452 additional test diffs)

Additionally, 16518 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 8947e167e58c5c4f23cae94585301f8eb90d93ea --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 5108.6s -> 1675.4s (-67.2%)
  2. test-various: 4140.8s -> 2401.9s (-42.0%)
  3. x86_64-apple-1: 8455.0s -> 5498.7s (-35.0%)
  4. dist-aarch64-linux: 7758.9s -> 5339.1s (-31.2%)
  5. x86_64-gnu-aux: 5914.5s -> 4344.2s (-26.6%)
  6. dist-apple-various: 6337.5s -> 7828.5s (23.5%)
  7. aarch64-apple: 3916.6s -> 3111.3s (-20.6%)
  8. dist-x86_64-apple: 7777.3s -> 8962.8s (15.2%)
  9. x86_64-gnu-llvm-20-1: 6152.3s -> 5248.9s (-14.7%)
  10. dist-aarch64-apple: 5640.5s -> 5014.3s (-11.1%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (8947e16): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -0.8%, secondary -2.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
0.5%[0.5%, 0.5%]2
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
-2.1%[-3.6%, -0.6%]2
Improvements ✅
(secondary)
-2.2%[-2.2%, -2.2%]1
All ❌✅ (primary)-0.8%[-3.6%, 0.5%]4

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 764.349s -> 763.457s (-0.12%)
Artifact size: 365.22 MiB -> 365.17 MiB (-0.01%)

@GuillaumeGomez
GuillaumeGomez deleted the doctest-2024-stdout branch April 28, 2025 09:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2024 doctests don't show stdout when failing

9 participants

@GuillaumeGomez@rust-log-analyzer@notriddle@bors@rust-timer@Kobzol@fmease@jieyouxu@rustbot