-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #720 - Susurrus:fcntl, r=alexcrichton
Add more fcntl and seal constants for Android/Linux
- Loading branch information
Showing
27 changed files
with
237 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
FROM ubuntu:17.10 | ||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends \ | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
gcc libc6-dev ca-certificates \ | ||
gcc-aarch64-linux-gnu libc6-dev-arm64-cross qemu-user | ||
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \ | ||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER="qemu-aarch64 -L /usr/aarch64-linux-gnu" \ | ||
PATH=$PATH:/rust/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
FROM ubuntu:17.10 | ||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends \ | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
gcc libc6-dev ca-certificates \ | ||
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user | ||
ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \ | ||
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER="qemu-arm -L /usr/arm-linux-gnueabihf" \ | ||
PATH=$PATH:/rust/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
FROM ubuntu:17.10 | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends \ | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
gcc libc6-dev qemu-user ca-certificates \ | ||
gcc-mips-linux-gnu libc6-dev-mips-cross \ | ||
qemu-system-mips | ||
|
||
ENV CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-linux-gnu-gcc \ | ||
CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_RUNNER="qemu-mips -L /usr/mips-linux-gnu" \ | ||
PATH=$PATH:/rust/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
FROM ubuntu:17.10 | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends \ | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
gcc libc6-dev qemu-user ca-certificates \ | ||
gcc-mips64-linux-gnuabi64 libc6-dev-mips64-cross \ | ||
qemu-system-mips64 | ||
|
||
ENV CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_LINKER=mips64-linux-gnuabi64-gcc \ | ||
CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_RUNNER="qemu-mips64 -L /usr/mips64-linux-gnuabi64" \ | ||
CC_mips64_unknown_linux_gnuabi64=mips64-linux-gnuabi64-gcc \ | ||
PATH=$PATH:/rust/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
FROM ubuntu:17.10 | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends \ | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
gcc libc6-dev qemu-user ca-certificates \ | ||
gcc-powerpc-linux-gnu libc6-dev-powerpc-cross \ | ||
qemu-system-ppc | ||
|
||
ENV CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_LINKER=powerpc-linux-gnu-gcc \ | ||
CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_RUNNER="qemu-ppc -L /usr/powerpc-linux-gnu" \ | ||
PATH=$PATH:/rust/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
FROM ubuntu:17.10 | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y --no-install-recommends \ | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
gcc libc6-dev qemu-user ca-certificates \ | ||
gcc-powerpc64-linux-gnu libc6-dev-ppc64-cross \ | ||
qemu-system-ppc | ||
|
||
ENV CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_LINKER=powerpc64-linux-gnu-gcc \ | ||
CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_RUNNER="qemu-ppc64 -L /usr/powerpc64-linux-gnu" \ | ||
CC=powerpc64-linux-gnu-gcc \ | ||
PATH=$PATH:/rust/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
use std::env; | ||
use std::process::{Command, Stdio}; | ||
use std::sync::mpsc; | ||
use std::thread; | ||
use std::time::Duration; | ||
use std::io::{BufRead, BufReader, Read}; | ||
|
||
fn main() { | ||
assert_eq!(env::args().len(), 2); | ||
|
||
let status = Command::new("rumprun-bake") | ||
.arg("hw_virtio") | ||
.arg("/tmp/libc-test.img") | ||
.arg(env::args().nth(1).unwrap()) | ||
.status() | ||
.expect("failed to run rumprun-bake"); | ||
assert!(status.success()); | ||
|
||
let mut child = Command::new("qemu-system-x86_64") | ||
.arg("-nographic") | ||
.arg("-vga").arg("none") | ||
.arg("-m").arg("64") | ||
.arg("-kernel").arg("/tmp/libc-test.img") | ||
.stdout(Stdio::piped()) | ||
.stderr(Stdio::piped()) | ||
.spawn() | ||
.expect("failed to spawn qemu"); | ||
|
||
let mut stdout = child.stdout.take().unwrap(); | ||
let mut stderr = child.stderr.take().unwrap(); | ||
let (tx, rx) = mpsc::channel(); | ||
let tx2 = tx.clone(); | ||
let t1 = thread::spawn(move || find_ok(&mut stdout, tx)); | ||
let t2 = thread::spawn(move || find_ok(&mut stderr, tx2)); | ||
|
||
let res = rx.recv_timeout(Duration::new(5, 0)); | ||
child.kill().unwrap(); | ||
t1.join().unwrap(); | ||
t2.join().unwrap(); | ||
|
||
if res.is_err() { | ||
panic!("didn't find success"); | ||
} | ||
} | ||
|
||
fn find_ok(input: &mut Read, tx: mpsc::Sender<()>) { | ||
for line in BufReader::new(input).lines() { | ||
let line = line.unwrap(); | ||
println!("{}", line); | ||
if line.starts_with("PASSED ") && line.contains(" tests") { | ||
tx.send(()).unwrap(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.