Skip to content
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

Rollup of 15 pull requests #62335

Merged
merged 36 commits into from
Jul 3, 2019
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4583238
squash commit for nth_back on chunks exact
Jun 22, 2019
1e9e4b0
Add mention of VS 2019 in link error output.
crlf0710 Jun 21, 2019
19f8622
Just switch to English linker output using environment variable when …
crlf0710 Jun 24, 2019
9d798b7
Adjust warning of -C extra-filename with -o.
ehuss Jun 25, 2019
e1e95a8
Use force_bits when casting from a pointer
pvdrz Jun 26, 2019
8339211
Added comment description.
crlf0710 Jun 27, 2019
2a37582
std: Move a process test out of libstd
alexcrichton Jun 27, 2019
a0e5fcf
import gdb for explicit access to gdb.current_objfile()
cclauss Jun 28, 2019
7f1e160
Reorganize code for readabilty and fixed problem with type sizes
pvdrz Jun 28, 2019
9527565
Add Vec::leak
cramertj Jun 27, 2019
95bc720
Use pointer size as the source size
pvdrz Jun 29, 2019
51793bd
Simplify control flow
pvdrz Jun 29, 2019
dfb9f5b
Add missing links for TryFrom docs
GuillaumeGomez Jun 29, 2019
3e83728
Add missing type urls in Into trait
GuillaumeGomez Jun 27, 2019
92c28bf
Replace error by bug macro
pvdrz Jun 30, 2019
fc70c37
Improve box clone doctests to ensure the documentation is valid
czipperz Jun 30, 2019
de00ae7
Switch tracking issue for 'slice_patterns'.
Centril Jun 30, 2019
353b5d4
Fix michaelwoerister's mailmap
Mark-Simulacrum Jul 2, 2019
7454b29
HashMap is UnwindSafe
SimonSapin Jul 2, 2019
dd702cc
Fix mismatching Kleene operators
ia0 Jul 2, 2019
e5ede80
Fixed document bug, those replaced each other
Flast Jul 3, 2019
7d5d591
Rollup merge of #62021 - crlf0710:msvc_link_output_improve, r=alexcri…
Mark-Simulacrum Jul 3, 2019
619df2e
Rollup merge of #62064 - wizAmit:feature/chunks_exact_nth_back, r=sco…
Mark-Simulacrum Jul 3, 2019
2564009
Rollup merge of #62128 - ehuss:extra-filename-warning, r=matthewjasper
Mark-Simulacrum Jul 3, 2019
d9dfed8
Rollup merge of #62161 - GuillaumeGomez:add-missing-tryfrom-links, r=…
Mark-Simulacrum Jul 3, 2019
05704e8
Rollup merge of #62183 - alexcrichton:fix-tests, r=nikomatsakis
Mark-Simulacrum Jul 3, 2019
37c58c6
Rollup merge of #62186 - GuillaumeGomez:add-missing-type-links-into, …
Mark-Simulacrum Jul 3, 2019
aa7999a
Rollup merge of #62196 - cramertj:vec-leak, r=centril,withoutboats
Mark-Simulacrum Jul 3, 2019
b8713e5
Rollup merge of #62199 - cclauss:patch-1, r=nikomatsakis
Mark-Simulacrum Jul 3, 2019
d1db5e4
Rollup merge of #62229 - christianpoveda:intptrcast-explicit-casts, r…
Mark-Simulacrum Jul 3, 2019
8ca4a6a
Rollup merge of #62250 - czipperz:improve-box-clone-doctests, r=Guill…
Mark-Simulacrum Jul 3, 2019
ea6c1fc
Rollup merge of #62255 - Centril:slice-patterns-change-issue, r=varkor
Mark-Simulacrum Jul 3, 2019
7a033aa
Rollup merge of #62285 - Mark-Simulacrum:mailmap-mw, r=Centril
Mark-Simulacrum Jul 3, 2019
a0fcf5e
Rollup merge of #62304 - SimonSapin:safe, r=eddyb
Mark-Simulacrum Jul 3, 2019
08e8c41
Rollup merge of #62319 - ia0:fix_kleene, r=petrochenkov
Mark-Simulacrum Jul 3, 2019
6b43b50
Rollup merge of #62327 - Flast:patch-1, r=Mark-Simulacrum
Mark-Simulacrum Jul 3, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
std: Move a process test out of libstd
This commit moves a test out of libstd which is causing deadlocks on
musl on CI. Looks like the recent update in musl versions brings in some
internal updates to musl which makes `setgid` and `setuid` invalid to
call after a `fork` in a multithreaded program. The issue seen here is
that the child thread was attempting to grab a lock held by a
nonexistent thread, meaning that the child process simply deadlocked
causing the whole test to deadlock.

This commit moves the test to its own file with no threads which should
work.
alexcrichton committed Jun 27, 2019
commit 2a375827ab56900bf550161ee08ada664e68b267
27 changes: 0 additions & 27 deletions src/libstd/process.rs
Original file line number Diff line number Diff line change
@@ -1765,33 +1765,6 @@ mod tests {
assert_eq!(out, "foobar\n");
}


#[test]
#[cfg_attr(target_os = "android", ignore)]
#[cfg(unix)]
fn uid_works() {
use crate::os::unix::prelude::*;

let mut p = Command::new("/bin/sh")
.arg("-c").arg("true")
.uid(unsafe { libc::getuid() })
.gid(unsafe { libc::getgid() })
.spawn().unwrap();
assert!(p.wait().unwrap().success());
}

#[test]
#[cfg_attr(target_os = "android", ignore)]
#[cfg(unix)]
fn uid_to_root_fails() {
use crate::os::unix::prelude::*;

// if we're already root, this isn't a valid test. Most of the bots run
// as non-root though (android is an exception).
if unsafe { libc::getuid() == 0 } { return }
assert!(Command::new("/bin/ls").uid(0).gid(0).spawn().is_err());
}

#[test]
#[cfg_attr(target_os = "android", ignore)]
fn test_process_status() {
26 changes: 26 additions & 0 deletions src/test/run-pass/command-uid-gid.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#![feature(rustc_private)]

fn main() {
#[cfg(unix)]
run()
}

#[cfg(unix)]
fn run() {
extern crate libc;
use std::process::Command;
use std::os::unix::prelude::*;

let mut p = Command::new("/bin/sh")
.arg("-c").arg("true")
.uid(unsafe { libc::getuid() })
.gid(unsafe { libc::getgid() })
.spawn().unwrap();
assert!(p.wait().unwrap().success());

// if we're already root, this isn't a valid test. Most of the bots run
// as non-root though (android is an exception).
if unsafe { libc::getuid() != 0 } {
assert!(Command::new("/bin/ls").uid(0).gid(0).spawn().is_err());
}
}