Auto merge of #2492 - RalfJung:tests, r=RalfJung

organize shim tests into shims folder, and various test suite tweaks
This commit is contained in:
bors 2022-08-18 02:03:30 +00:00
commit af033ea428
116 changed files with 128 additions and 218 deletions

View File

@ -3,8 +3,6 @@
// Check that we terminate the program when the main thread terminates.
#![feature(rustc_private)]
use std::{mem, ptr};
extern "C" fn thread_start(_null: *mut libc::c_void) -> *mut libc::c_void {

View File

@ -2,8 +2,6 @@
// Joining a detached thread is undefined behavior.
#![feature(rustc_private)]
use std::{mem, ptr};
extern "C" fn thread_start(_null: *mut libc::c_void) -> *mut libc::c_void {

View File

@ -2,8 +2,6 @@
// Joining an already joined thread is undefined behavior.
#![feature(rustc_private)]
use std::{mem, ptr};
extern "C" fn thread_start(_null: *mut libc::c_void) -> *mut libc::c_void {

View File

@ -2,8 +2,6 @@
// Joining the main thread is undefined behavior.
#![feature(rustc_private)]
use std::{ptr, thread};
fn main() {

View File

@ -2,8 +2,6 @@
// Joining the same thread from multiple threads is undefined behavior.
#![feature(rustc_private)]
use std::thread;
use std::{mem, ptr};

View File

@ -4,8 +4,6 @@
// Joining itself is undefined behavior.
#![feature(rustc_private)]
use std::{ptr, thread};
fn main() {

View File

@ -2,8 +2,6 @@
//! The thread function must have exactly one argument.
#![feature(rustc_private)]
use std::{mem, ptr};
extern "C" fn thread_start() -> *mut libc::c_void {

View File

@ -2,8 +2,6 @@
//! The thread function must have exactly one argument.
#![feature(rustc_private)]
use std::{mem, ptr};
extern "C" fn thread_start(_null: *mut libc::c_void, _x: i32) -> *mut libc::c_void {

View File

@ -3,7 +3,7 @@
//! Unwinding past the top frame of a stack is Undefined Behavior.
#![feature(rustc_private, c_unwind)]
#![feature(c_unwind)]
use std::{mem, ptr};

View File

@ -3,8 +3,6 @@
// FIXME: standard handles cannot be closed (https://github.com/rust-lang/rust/issues/40032)
#![feature(rustc_private)]
fn main() {
unsafe {
libc::close(1); //~ ERROR: cannot close stdout

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
fn main() -> std::io::Result<()> {
let mut bytes = [0u8; 512];
unsafe {

View File

@ -1,8 +1,6 @@
//@ignore-target-windows: No libc on Windows
//@compile-flags: -Zmiri-disable-isolation
#![feature(rustc_private)]
fn main() {
test_mkstemp_immutable_arg();
}

View File

@ -1,8 +1,6 @@
//@compile-flags: -Zmiri-disable-isolation
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
fn main() -> std::io::Result<()> {
let mut bytes = [0u8; 512];
unsafe {

View File

@ -1,8 +1,6 @@
//@ignore-target-windows: No libc on Windows
//@compile-flags: -Zmiri-disable-isolation
#![feature(rustc_private)]
fn main() {
test_file_open_missing_needed_mode();
}

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
fn main() -> std::io::Result<()> {
let bytes = b"hello";
unsafe {

View File

@ -1,5 +1,4 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
/// Test that destroying a pthread_cond twice fails, even without a check for number validity

View File

@ -1,5 +1,4 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
/// Test that destroying a pthread_condattr twice fails, even without a check for number validity

View File

@ -2,8 +2,6 @@
//
// Check that if we pass NULL attribute, then we get the default mutex type.
#![feature(rustc_private)]
fn main() {
unsafe {
let mut mutex: libc::pthread_mutex_t = std::mem::zeroed();

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
use std::cell::UnsafeCell;
use std::sync::Arc;
use std::thread;

View File

@ -2,8 +2,6 @@
//
// Check that if we do not set the mutex type, it is the default.
#![feature(rustc_private)]
fn main() {
unsafe {
let mutexattr: libc::pthread_mutexattr_t = std::mem::zeroed();

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
fn main() {
unsafe {
let mut mutexattr: libc::pthread_mutexattr_t = std::mem::zeroed();

View File

@ -1,5 +1,4 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
/// Test that destroying a pthread_mutex twice fails, even without a check for number validity

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
fn main() {
unsafe {
let mut mutexattr: libc::pthread_mutexattr_t = std::mem::zeroed();

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
fn main() {
unsafe {
let mut mutexattr: libc::pthread_mutexattr_t = std::mem::zeroed();

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
use std::cell::UnsafeCell;
use std::sync::Arc;
use std::thread;

View File

@ -1,5 +1,4 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
/// Test that destroying a pthread_mutexattr twice fails, even without a check for number validity

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
fn main() {
let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER);
unsafe {

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
fn main() {
let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER);
unsafe {

View File

@ -1,5 +1,4 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
/// Test that destroying a pthread_rwlock twice fails, even without a check for number validity

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
fn main() {
let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER);
unsafe {

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
use std::cell::UnsafeCell;
use std::sync::Arc;
use std::thread;

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
fn main() {
let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER);
unsafe {

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
use std::cell::UnsafeCell;
use std::sync::Arc;
use std::thread;

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
fn main() {
let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER);
unsafe {

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
use std::cell::UnsafeCell;
use std::sync::Arc;
use std::thread;

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
fn main() {
let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER);
unsafe {

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
use std::cell::UnsafeCell;
use std::sync::Arc;
use std::thread;

View File

@ -1,7 +1,6 @@
//! `signal()` is special on Linux and macOS that it's only supported within libstd.
//! The implementation is not complete enough to permit user code to call it.
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
fn main() {
unsafe {

View File

@ -1,7 +1,6 @@
//@ignore-target-windows: No libc on Windows
//@ignore-target-apple: `syscall` is not supported on macOS
//@compile-flags: -Zmiri-panic-on-unsupported
#![feature(rustc_private)]
fn main() {
unsafe {

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
use core::slice;
fn main() {

View File

@ -2,8 +2,6 @@
//@ignore-target-apple: pthread_condattr_setclock is not supported on MacOS.
//@compile-flags: -Zmiri-disable-isolation
#![feature(rustc_private)]
/// Test that conditional variable timeouts are working properly with both
/// monotonic and system clocks.
use std::mem::MaybeUninit;

View File

@ -1,8 +1,6 @@
//@only-target-linux
//@compile-flags: -Zmiri-disable-isolation
#![feature(rustc_private)]
use std::mem::MaybeUninit;
use std::ptr;
use std::sync::atomic::AtomicI32;

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
use std::mem;
use std::ptr;

View File

@ -1,6 +1,3 @@
//ignore-windows: Uses POSIX APIs
#![feature(rustc_private)]
use std::ffi::CString;
mod mlibc {

View File

@ -1,7 +1,5 @@
//@ignore-target-windows: No libc on Windows
#![feature(rustc_private)]
use core::{ptr, slice};
fn main() {

View File

@ -1,7 +1,3 @@
//ignore-windows: Uses POSIX APIs
#![feature(rustc_private)]
use std::mem;
struct Arena(());

Some files were not shown because too many files have changed in this diff Show More