-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add batch flag to remote-test-server #105145
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
ac19606
to
456c933
Compare
@Mark-Simulacrum ping |
456c933
to
b22405d
Compare
r? @pietroalbini for thoughts on the best way to do this for sequential execution, since you added sequential in #102193 |
My need for sequential execution is, the emulator I'm working with sometimes deadlocks when multiple tests are executed at the same time, but it supports threads just fine (just can't run multiple commands in parallel). I don't have good ideas on how to implement this without threads, other than maybe adding a r? @Mark-Simulacrum back |
@Mark-Simulacrum How about adding the |
That sounds good to me. |
b22405d
to
3e9a0f3
Compare
3e9a0f3
to
bf704c9
Compare
When using this flag, the stdout and stderr is sent in a single batch instead of being streamed. It also used `Command::output` instead of `Command::spawn`. This is useful for targets that might support std but not threading (Eg: UEFI). Signed-off-by: Ayush Singh <[email protected]>
bf704c9
to
2bb6bd6
Compare
@rustbot ready |
fn batch_copy(buf: &[u8], which: u8, dst: &Mutex<dyn Write>) { | ||
let n = buf.len(); | ||
let mut dst = dst.lock().unwrap(); | ||
t!(dst.write_all(&[which, (n >> 24) as u8, (n >> 16) as u8, (n >> 8) as u8, (n >> 0) as u8,])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a drive-by improvement since we're changing this code, can we replace the manual shifting with writing (n as u32).encode_le_bytes()
and read_u32
to use u32::from_le_bytes
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(But let's do that in a separate PR if you're up to it).
@bors r+ rollup=iffy |
☀️ Test successful - checks-actions |
Finished benchmarking commit (0468a00): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. |
Switch to `to_be_bytes()` and `from_be_bytes()` instead of manual shifting This was suggested [`here`](rust-lang#105145 (comment)) Signed-off-by: Ayush Singh <[email protected]>
…, r=Mark-Simulacrum Use u32 methods instead of manual shifting Switch to `to_le_bytes()` and `from_le_bytes()` instead of manual shifting This was suggested [`here`](rust-lang#105145 (comment)) Signed-off-by: Ayush Singh <[email protected]>
…Simulacrum Use u32 methods instead of manual shifting Switch to `to_le_bytes()` and `from_le_bytes()` instead of manual shifting This was suggested [`here`](rust-lang/rust#105145 (comment)) Signed-off-by: Ayush Singh <[email protected]>
…r=Mark-Simulacrum Add batch flag to remote-test-server When using this flag, the stdout and stderr are sent in a single batch instead of being streamed. It also used `Command::output` instead of `Command::spawn`. This is useful for targets that might support std but not threading (Eg: UEFI). Signed-off-by: Ayush Singh <[email protected]>
When using this flag, the stdout and stderr are sent in a single batch instead of being streamed. It also used
Command::output
instead ofCommand::spawn
. This is useful for targets that might support std but not threading (Eg: UEFI).Signed-off-by: Ayush Singh [email protected]