Skip to content

Fix some tests failing in --pass check mode - #72007

Merged
bors merged 1 commit into
rust-lang:masterfrom
petrochenkov:passcheck3
May 8, 2020
Merged

bors merged 1 commit into
rust-lang:masterfrom
petrochenkov:passcheck3

Conversation

@petrochenkov

Copy link
Copy Markdown
Contributor

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 8, 2020
@RalfJung

RalfJung commented May 8, 2020

Copy link
Copy Markdown
Member

Argh, we did it again, sorry... we should really have this on CI (Cc #69823)

@bors r+ rollup

@bors

bors commented May 8, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 13c9312 has been approved by RalfJung

@bors bors 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 May 8, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request May 8, 2020
Rollup of 6 pull requests

Successful merges:

 - rust-lang#71989 (Use a single enum for the kind of a const context)
 - rust-lang#71993 (Remove old `util/liveness.rs` module)
 - rust-lang#71999 (Add myself to mailmap.)
 - rust-lang#72001 (Adjust cfg(version) to lang team decision)
 - rust-lang#72007 (Fix some tests failing in `--pass check` mode)
 - rust-lang#72008 (Add const-generics test)

Failed merges:

r? @ghost
@bors
bors merged commit c4c6340 into rust-lang:master May 8, 2020
@petrochenkov
petrochenkov deleted the passcheck3 branch February 22, 2025 18:41
oddurs added a commit to oddurs/poptop that referenced this pull request Sep 20, 2026
…ocess

`a_running_process_named_in_bytes_that_are_not_utf8_is_in_the_table` copies
`sleep` to a name that is not UTF-8 and runs it. On CI it failed with
ExecutableFileBusy — "Text file busy" — from the spawn, not the copy.

`fs::copy` opens the destination for writing and the fd is close-on-exec,
not close-on-fork. Any other test thread that spawns a process forks in the
window before that fd is closed, and the child holds a writable descriptor
to the file until it execs. Until then the kernel refuses to exec it. The
window is microseconds and the suite spawns processes from several tests at
once, so it shows up as a flake on a loaded runner and never locally.
rust-lang/rust#72007.

A bounded retry is the whole fix. Five seconds, twenty milliseconds apart,
and any other error still fails immediately with the message.

Unrelated to the rest of this branch; it turned CI red on it.
oddurs added a commit to oddurs/poptop that referenced this pull request Sep 20, 2026
…gram working (#141)

* fix(tools): a screenshot that renders in a browser, and shows the program working

Three things wrong with the first one, all found by rasterising it and
looking at it rather than by checking that it parsed.

**Braille rendered as tofu.** The timeline and the HIST column are
U+2800-U+28FF, an SVG names a font stack rather than carrying one, and most
readers have no braille — it came out as rows of dotted placeholder boxes,
which does not look like a font problem, it looks like a bug in poptop.
Braille is now drawn as rectangles, two by four to a cell, which needs no
font at all. Everything else stays text, so it can still be selected and
searched.

**The frame was of an empty buffer.** Nine seconds of history under a
program whose argument is that it keeps every sample. The capture now lets
the timeline fill first.

**The frame was of an idle machine, and then of a machine pinned flat.** A
constant load draws a featureless block; a purely bursty one leaves the
table empty between bursts. The workload is now a build from an empty
target directory — fifty rustc in waves, which is what a build machine
looks like — with compression and copy bursts on top, and the capture walks
back through the buffer with the arrow keys and returns to the fullest
sample that was also busy. That chooses which recorded moment to show; it
does not change the moment, and finding the busy one is what a reader would
do with the same keys.

Looking at the result turned up 0134: ten rustc the build had just spawned,
each holding 140 MB, each reported at 0.0% CPU with an em dash beside it in
the disk columns. Both are a delta with no previous sample. One of them
says so.

* test(linux): retry the exec that races every other test spawning a process

`a_running_process_named_in_bytes_that_are_not_utf8_is_in_the_table` copies
`sleep` to a name that is not UTF-8 and runs it. On CI it failed with
ExecutableFileBusy — "Text file busy" — from the spawn, not the copy.

`fs::copy` opens the destination for writing and the fd is close-on-exec,
not close-on-fork. Any other test thread that spawns a process forks in the
window before that fd is closed, and the child holds a writable descriptor
to the file until it execs. Until then the kernel refuses to exec it. The
window is microseconds and the suite spawns processes from several tests at
once, so it shows up as a flake on a loaded runner and never locally.
rust-lang/rust#72007.

A bounded retry is the whole fix. Five seconds, twenty milliseconds apart,
and any other error still fails immediately with the message.

Unrelated to the rest of this branch; it turned CI red on it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants