From 5e3866ad56a4e4906dcd6db3908f7b1182c1becf Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Wed, 3 Jul 2019 13:00:03 +0200 Subject: [PATCH 01/10] Update ctest version --- libc-test/build.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libc-test/build.rs b/libc-test/build.rs index 722a513c32fea..8f3c83ea9f0ac 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -225,6 +225,12 @@ fn test_apple(target: &str) { } }); + cfg.skip_roundtrip(|s| match s { + // FIXME: TODO + "utsname" | "statfs" | "dirent" | "utmpx" => true, + _ => false, + }); + cfg.generate("../src/lib.rs", "main.rs"); } From b81a234913d6fcaa6483765d248b5dc258b2bf2e Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Wed, 3 Jul 2019 14:39:54 +0200 Subject: [PATCH 02/10] Silence roundtrip in linux --- libc-test/build.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index 8f3c83ea9f0ac..3ec1c07f973c6 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -225,7 +225,7 @@ fn test_apple(target: &str) { } }); - cfg.skip_roundtrip(|s| match s { + cfg.skip_roundtrip(move |s| match s { // FIXME: TODO "utsname" | "statfs" | "dirent" | "utmpx" => true, _ => false, @@ -2259,6 +2259,19 @@ fn test_linux(target: &str) { field == "ssi_arch")) }); + cfg.skip_roundtrip(move |s| match s { + // FIXME: TODO + "_libc_fpstate" | "user_fpregs_struct" if x86_64 => true, + "utsname" + | "statx" + | "dirent" + | "dirent64" + | "utmpx" + | "user" + | "user_fpxregs_struct" => true, + _ => false, + }); + cfg.generate("../src/lib.rs", "main.rs"); test_linux_like_apis(target); From 3fd4dd7ea3b303179434cabec168cdb6f9e94232 Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Fri, 5 Jul 2019 17:34:04 +0200 Subject: [PATCH 03/10] Silence roundtrip errors --- libc-test/build.rs | 50 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index 3ec1c07f973c6..555aee30c886a 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -1432,6 +1432,13 @@ fn test_android(target: &str) { field == "ssi_arch")) }); + let bit64 = target.contains("64"); + cfg.skip_roundtrip(move |s| match s { + "utsname" | "dirent" | "dirent64" => true, + "utmp" if bit64 => true, + _ => false, + }); + cfg.generate("../src/lib.rs", "main.rs"); test_linux_like_apis(target); @@ -1838,6 +1845,15 @@ fn test_emscripten(target: &str) { field == "ssi_arch")) }); + cfg.skip_roundtrip(move |s| match s { + "pthread_mutexattr_t" + | "utsname" + | "dirent" + | "dirent64" + | "sysinfo" => true, + _ => false, + }); + // FIXME: test linux like cfg.generate("../src/lib.rs", "main.rs"); } @@ -1865,8 +1881,11 @@ fn test_linux(target: &str) { let x86_32 = target.contains("i686"); let x32 = target.contains("x32"); let mips = target.contains("mips"); - let mips32_musl = mips && !target.contains("64") && musl; + let mips32 = mips && !target.contains("64"); + let mips64 = mips && target.contains("64"); + let mips32_musl = mips32 && musl; let sparc64 = target.contains("sparc64"); + let s390x = target.contains("s390x"); let mut cfg = ctest::TestGenerator::new(); cfg.define("_GNU_SOURCE", None); @@ -2269,6 +2288,35 @@ fn test_linux(target: &str) { | "utmpx" | "user" | "user_fpxregs_struct" => true, + "sysinfo" if musl => true, + "sockaddr_un" | "sembuf" | "ff_constant_effect" + if mips32 && (gnu || musl) => + { + true + } + "ipv6_mreq" + | "sockaddr_in6" + | "sockaddr_ll" + | "in_pktinfo" + | "arpreq" + | "arpreq_old" + | "sockaddr_un" + | "ff_constant_effect" + | "ff_ramp_effect" + | "ff_condition_effect" + | "Elf32_Ehdr" + | "Elf32_Chdr" + | "ucred" + | "in6_pktinfo" + | "sockaddr_nl" + | "termios" + | "nlmsgerr" + if (mips64 || sparc64) && gnu => + { + true + } + "mcontext_t" if s390x => true, + _ => false, }); From ab6e4a3f18ed080b9d24a45f4204cc43ce00ab32 Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Fri, 5 Jul 2019 17:34:11 +0200 Subject: [PATCH 04/10] Allow wasi to fail --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index ea5e0ac593187..3c9e0494dcf86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -235,6 +235,7 @@ matrix: allow_failures: - name: "Semver Linux" - name: "Semver MacOSX" + - env: TARGET=wasm32-wasi install: travis_retry rustup target add $TARGET From 7fa6534858ccc512b2d6b9acc88db1aa2d26e587 Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Fri, 5 Jul 2019 18:08:56 +0200 Subject: [PATCH 05/10] Fix FreeBSD and Appveyor --- appveyor.yml | 1 + libc-test/build.rs | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index b14230a0555f3..0efc9af32cb4e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,6 +17,7 @@ install: - rustup-init.exe -y --default-host %TARGET% - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin - if defined MSYS2_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS2_BITS%\bin + - if defined MSYS2_BITS for %%I in (crt2.o dllcrt2.o libmsvcrt.a) do xcopy /Y "C:\msys64\mingw%MSYS_BITS%\%ARCH%-w64-mingw32\lib\%%I" "C:\Program Files (x86)\Rust\lib\rustlib\%TARGET%\lib" - rustc -V - cargo -V diff --git a/libc-test/build.rs b/libc-test/build.rs index 555aee30c886a..7006c03b00556 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -473,6 +473,11 @@ fn test_windows(target: &str) { } }); + cfg.skip_roundtrip(move |s| match s { + "dirent" | "statfs" | "utsname" | "utmpx" => true, + _ => false, + }); + cfg.generate("../src/lib.rs", "main.rs"); } @@ -1641,6 +1646,11 @@ fn test_freebsd(target: &str) { (struct_ == "sigaction" && field == "sa_sigaction") }); + cfg.skip_roundtrip(move |s| match s { + "dirent" | "statfs" | "utsname" | "utmpx" => true, + _ => false, + }); + cfg.generate("../src/lib.rs", "main.rs"); } From 9d58c0c14f35dc1ee1360d0889649bdf90053e7d Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Fri, 5 Jul 2019 18:10:00 +0200 Subject: [PATCH 06/10] Allow PPC to fail - segfault --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3c9e0494dcf86..55ed1c51985c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -231,11 +231,11 @@ matrix: - mv ci/switch.json switch.json - cargo xbuild --target switch.json - allow_failures: - name: "Semver Linux" - name: "Semver MacOSX" - env: TARGET=wasm32-wasi + - env: TARGET=powerpc-unknown-linux-gnu install: travis_retry rustup target add $TARGET From c3ddd564c959ad9e1ec6a58cad8fd833505c444d Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Fri, 5 Jul 2019 18:11:30 +0200 Subject: [PATCH 07/10] Allow s390x to fail - segfault --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 55ed1c51985c4..6a7ddb386bae0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -236,6 +236,7 @@ matrix: - name: "Semver MacOSX" - env: TARGET=wasm32-wasi - env: TARGET=powerpc-unknown-linux-gnu + - env: TARGET=s390x-unknown-linux-gnu install: travis_retry rustup target add $TARGET From b2dcd5c76a105bd7dad108bdeb73e02756ecdaa1 Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Fri, 5 Jul 2019 18:24:16 +0200 Subject: [PATCH 08/10] Fix x86_64 musl --- libc-test/build.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/libc-test/build.rs b/libc-test/build.rs index 7006c03b00556..6c263efbd52a6 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2299,6 +2299,7 @@ fn test_linux(target: &str) { | "user" | "user_fpxregs_struct" => true, "sysinfo" if musl => true, + "ucontext_t" if x86_64 && musl => true, "sockaddr_un" | "sembuf" | "ff_constant_effect" if mips32 && (gnu || musl) => { From fd7a1e9f837fd3e423ebacc185d8cab77492cf0c Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Fri, 5 Jul 2019 18:44:30 +0200 Subject: [PATCH 09/10] Fix appveyor try 2 --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 0efc9af32cb4e..b047175c32d10 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,7 +17,7 @@ install: - rustup-init.exe -y --default-host %TARGET% - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin - if defined MSYS2_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS2_BITS%\bin - - if defined MSYS2_BITS for %%I in (crt2.o dllcrt2.o libmsvcrt.a) do xcopy /Y "C:\msys64\mingw%MSYS_BITS%\%ARCH%-w64-mingw32\lib\%%I" "C:\Program Files (x86)\Rust\lib\rustlib\%TARGET%\lib" + - if defined MSYS2_BITS for %%I in (crt2.o dllcrt2.o libmsvcrt.a) do xcopy /Y "C:\msys64\mingw%MSYS2_BITS%\%ARCH%-w64-mingw32\lib\%%I" "C:\Program Files (x86)\Rust\lib\rustlib\%TARGET%\lib" - rustc -V - cargo -V From 9f9286331fcdd0524856e04993ebeb60dc1c150d Mon Sep 17 00:00:00 2001 From: gnzlbg Date: Fri, 5 Jul 2019 18:55:42 +0200 Subject: [PATCH 10/10] Fix appveyor try 3 --- appveyor.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b047175c32d10..c3a333a64289f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,23 +1,19 @@ environment: - # When this was added there were revocation check failures when using the - # libcurl backend as libcurl checks by default, but rustup doesn't provide the - # switch to turn this off. Switch to Reqwest which looks to not check for - # revocation by default like libcurl does. - RUSTUP_USE_REQWEST: 1 - CARGO_HTTP_CHECK_REVOKE: false matrix: - TARGET: x86_64-pc-windows-gnu - MSYS2_BITS: 64 + MSYS_BITS: 64 + ARCH: x86_64 - TARGET: i686-pc-windows-gnu - MSYS2_BITS: 32 + MSYS_BITS: 32 + ARCH: i686 - TARGET: x86_64-pc-windows-msvc - TARGET: i686-pc-windows-msvc install: - - appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe - - rustup-init.exe -y --default-host %TARGET% - - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin - - if defined MSYS2_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS2_BITS%\bin - - if defined MSYS2_BITS for %%I in (crt2.o dllcrt2.o libmsvcrt.a) do xcopy /Y "C:\msys64\mingw%MSYS2_BITS%\%ARCH%-w64-mingw32\lib\%%I" "C:\Program Files (x86)\Rust\lib\rustlib\%TARGET%\lib" + - if defined MSYS_BITS set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH%; + - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe" + - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust" + - set PATH=%PATH%;C:\Program Files (x86)\Rust\bin + - if defined MSYS_BITS for %%I in (crt2.o dllcrt2.o libmsvcrt.a) do xcopy /Y "C:\msys64\mingw%MSYS_BITS%\%ARCH%-w64-mingw32\lib\%%I" "C:\Program Files (x86)\Rust\lib\rustlib\%TARGET%\lib" - rustc -V - cargo -V