From 38002b624aaacbb05f2640d60975e1470dfe5c1a Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 17 Aug 2022 21:50:23 -0400 Subject: [PATCH 1/4] organize shim tests into shims folder --- tests/fail/{ => shims}/backtrace/bad-backtrace-decl.rs | 0 tests/fail/{ => shims}/backtrace/bad-backtrace-decl.stderr | 0 tests/fail/{ => shims}/backtrace/bad-backtrace-flags.rs | 0 tests/fail/{ => shims}/backtrace/bad-backtrace-flags.stderr | 0 tests/fail/{ => shims}/backtrace/bad-backtrace-ptr.rs | 0 tests/fail/{ => shims}/backtrace/bad-backtrace-ptr.stderr | 0 tests/fail/{ => shims}/backtrace/bad-backtrace-resolve-flags.rs | 0 .../fail/{ => shims}/backtrace/bad-backtrace-resolve-flags.stderr | 0 .../{ => shims}/backtrace/bad-backtrace-resolve-names-flags.rs | 0 .../backtrace/bad-backtrace-resolve-names-flags.stderr | 0 tests/fail/{ => shims}/backtrace/bad-backtrace-size-flags.rs | 0 tests/fail/{ => shims}/backtrace/bad-backtrace-size-flags.stderr | 0 tests/fail/{ => shims}/fs/close_stdout.rs | 0 tests/fail/{ => shims}/fs/close_stdout.stderr | 0 tests/fail/{ => shims}/fs/isolated_file.rs | 0 tests/fail/{ => shims}/fs/isolated_file.stderr | 0 tests/fail/{ => shims}/fs/isolated_stdin.rs | 0 tests/fail/{ => shims}/fs/isolated_stdin.stderr | 0 tests/fail/{ => shims}/fs/mkstemp_immutable_arg.rs | 0 tests/fail/{ => shims}/fs/mkstemp_immutable_arg.stderr | 0 tests/fail/{ => shims}/fs/read_from_stdout.rs | 0 tests/fail/{ => shims}/fs/read_from_stdout.stderr | 0 tests/fail/{ => shims}/fs/unix_open_missing_required_mode.rs | 0 tests/fail/{ => shims}/fs/unix_open_missing_required_mode.stderr | 0 tests/fail/{ => shims}/fs/write_to_stdin.rs | 0 tests/fail/{ => shims}/fs/write_to_stdin.stderr | 0 tests/fail/{ => shims}/shim_arg_size.32bit.stderr | 0 tests/fail/{ => shims}/shim_arg_size.64bit.stderr | 0 tests/fail/{ => shims}/shim_arg_size.rs | 0 tests/fail/{ => shims}/sync/libc_pthread_cond_double_destroy.rs | 0 .../fail/{ => shims}/sync/libc_pthread_cond_double_destroy.stderr | 0 .../fail/{ => shims}/sync/libc_pthread_condattr_double_destroy.rs | 0 .../{ => shims}/sync/libc_pthread_condattr_double_destroy.stderr | 0 tests/fail/{ => shims}/sync/libc_pthread_mutex_NULL_deadlock.rs | 0 .../fail/{ => shims}/sync/libc_pthread_mutex_NULL_deadlock.stderr | 0 tests/fail/{ => shims}/sync/libc_pthread_mutex_deadlock.rs | 0 tests/fail/{ => shims}/sync/libc_pthread_mutex_deadlock.stderr | 0 .../fail/{ => shims}/sync/libc_pthread_mutex_default_deadlock.rs | 0 .../{ => shims}/sync/libc_pthread_mutex_default_deadlock.stderr | 0 tests/fail/{ => shims}/sync/libc_pthread_mutex_destroy_locked.rs | 0 .../{ => shims}/sync/libc_pthread_mutex_destroy_locked.stderr | 0 tests/fail/{ => shims}/sync/libc_pthread_mutex_double_destroy.rs | 0 .../{ => shims}/sync/libc_pthread_mutex_double_destroy.stderr | 0 tests/fail/{ => shims}/sync/libc_pthread_mutex_normal_deadlock.rs | 0 .../{ => shims}/sync/libc_pthread_mutex_normal_deadlock.stderr | 0 .../{ => shims}/sync/libc_pthread_mutex_normal_unlock_unlocked.rs | 0 .../sync/libc_pthread_mutex_normal_unlock_unlocked.stderr | 0 tests/fail/{ => shims}/sync/libc_pthread_mutex_wrong_owner.rs | 0 tests/fail/{ => shims}/sync/libc_pthread_mutex_wrong_owner.stderr | 0 .../{ => shims}/sync/libc_pthread_mutexattr_double_destroy.rs | 0 .../{ => shims}/sync/libc_pthread_mutexattr_double_destroy.stderr | 0 .../{ => shims}/sync/libc_pthread_rwlock_destroy_read_locked.rs | 0 .../sync/libc_pthread_rwlock_destroy_read_locked.stderr | 0 .../{ => shims}/sync/libc_pthread_rwlock_destroy_write_locked.rs | 0 .../sync/libc_pthread_rwlock_destroy_write_locked.stderr | 0 tests/fail/{ => shims}/sync/libc_pthread_rwlock_double_destroy.rs | 0 .../{ => shims}/sync/libc_pthread_rwlock_double_destroy.stderr | 0 .../sync/libc_pthread_rwlock_read_write_deadlock_single_thread.rs | 0 .../libc_pthread_rwlock_read_write_deadlock_single_thread.stderr | 0 .../fail/{ => shims}/sync/libc_pthread_rwlock_read_wrong_owner.rs | 0 .../{ => shims}/sync/libc_pthread_rwlock_read_wrong_owner.stderr | 0 .../fail/{ => shims}/sync/libc_pthread_rwlock_unlock_unlocked.rs | 0 .../{ => shims}/sync/libc_pthread_rwlock_unlock_unlocked.stderr | 0 .../{ => shims}/sync/libc_pthread_rwlock_write_read_deadlock.rs | 0 .../sync/libc_pthread_rwlock_write_read_deadlock.stderr | 0 .../sync/libc_pthread_rwlock_write_read_deadlock_single_thread.rs | 0 .../libc_pthread_rwlock_write_read_deadlock_single_thread.stderr | 0 .../{ => shims}/sync/libc_pthread_rwlock_write_write_deadlock.rs | 0 .../sync/libc_pthread_rwlock_write_write_deadlock.stderr | 0 .../libc_pthread_rwlock_write_write_deadlock_single_thread.rs | 0 .../libc_pthread_rwlock_write_write_deadlock_single_thread.stderr | 0 .../{ => shims}/sync/libc_pthread_rwlock_write_wrong_owner.rs | 0 .../{ => shims}/sync/libc_pthread_rwlock_write_wrong_owner.stderr | 0 tests/pass/{ => shims}/env/args.rs | 0 tests/pass/{ => shims}/env/args.stdout | 0 tests/pass/{ => shims}/env/current_dir.rs | 0 tests/pass/{ => shims}/env/current_dir_with_isolation.rs | 0 tests/pass/{ => shims}/env/current_dir_with_isolation.stderr | 0 tests/pass/{ => shims}/env/current_exe.rs | 0 tests/pass/{ => shims}/env/home.rs | 0 tests/pass/{ => shims}/env/var-exclude.rs | 0 tests/pass/{ => shims}/env/var-forward.rs | 0 tests/pass/{ => shims}/env/var-without-isolation.rs | 0 tests/pass/{ => shims}/env/var.rs | 0 tests/pass/{ => shims}/env/var.stdout | 0 tests/pass/{ => shims}/exit.rs | 0 tests/pass/{ => shims}/fs.rs | 0 tests/pass/{ => shims}/fs.stderr | 0 tests/pass/{ => shims}/fs.stdout | 0 tests/pass/{ => shims}/fs_with_isolation.rs | 0 tests/pass/{ => shims}/fs_with_isolation.stderr | 0 tests/pass/{ => shims}/libc.rs | 0 tests/pass/{ => shims}/linux-getrandom-without-isolation.rs | 0 tests/pass/{ => shims}/linux-getrandom.rs | 0 tests/pass/{ => shims}/posix_memalign.rs | 0 tests/pass/{ => shims}/sleep_long.rs | 0 tests/pass/{ => shims}/time.rs | 0 97 files changed, 0 insertions(+), 0 deletions(-) rename tests/fail/{ => shims}/backtrace/bad-backtrace-decl.rs (100%) rename tests/fail/{ => shims}/backtrace/bad-backtrace-decl.stderr (100%) rename tests/fail/{ => shims}/backtrace/bad-backtrace-flags.rs (100%) rename tests/fail/{ => shims}/backtrace/bad-backtrace-flags.stderr (100%) rename tests/fail/{ => shims}/backtrace/bad-backtrace-ptr.rs (100%) rename tests/fail/{ => shims}/backtrace/bad-backtrace-ptr.stderr (100%) rename tests/fail/{ => shims}/backtrace/bad-backtrace-resolve-flags.rs (100%) rename tests/fail/{ => shims}/backtrace/bad-backtrace-resolve-flags.stderr (100%) rename tests/fail/{ => shims}/backtrace/bad-backtrace-resolve-names-flags.rs (100%) rename tests/fail/{ => shims}/backtrace/bad-backtrace-resolve-names-flags.stderr (100%) rename tests/fail/{ => shims}/backtrace/bad-backtrace-size-flags.rs (100%) rename tests/fail/{ => shims}/backtrace/bad-backtrace-size-flags.stderr (100%) rename tests/fail/{ => shims}/fs/close_stdout.rs (100%) rename tests/fail/{ => shims}/fs/close_stdout.stderr (100%) rename tests/fail/{ => shims}/fs/isolated_file.rs (100%) rename tests/fail/{ => shims}/fs/isolated_file.stderr (100%) rename tests/fail/{ => shims}/fs/isolated_stdin.rs (100%) rename tests/fail/{ => shims}/fs/isolated_stdin.stderr (100%) rename tests/fail/{ => shims}/fs/mkstemp_immutable_arg.rs (100%) rename tests/fail/{ => shims}/fs/mkstemp_immutable_arg.stderr (100%) rename tests/fail/{ => shims}/fs/read_from_stdout.rs (100%) rename tests/fail/{ => shims}/fs/read_from_stdout.stderr (100%) rename tests/fail/{ => shims}/fs/unix_open_missing_required_mode.rs (100%) rename tests/fail/{ => shims}/fs/unix_open_missing_required_mode.stderr (100%) rename tests/fail/{ => shims}/fs/write_to_stdin.rs (100%) rename tests/fail/{ => shims}/fs/write_to_stdin.stderr (100%) rename tests/fail/{ => shims}/shim_arg_size.32bit.stderr (100%) rename tests/fail/{ => shims}/shim_arg_size.64bit.stderr (100%) rename tests/fail/{ => shims}/shim_arg_size.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_cond_double_destroy.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_cond_double_destroy.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_condattr_double_destroy.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_condattr_double_destroy.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_mutex_NULL_deadlock.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_mutex_NULL_deadlock.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_mutex_deadlock.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_mutex_deadlock.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_mutex_default_deadlock.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_mutex_default_deadlock.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_mutex_destroy_locked.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_mutex_destroy_locked.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_mutex_double_destroy.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_mutex_double_destroy.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_mutex_normal_deadlock.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_mutex_normal_deadlock.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_mutex_normal_unlock_unlocked.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_mutex_normal_unlock_unlocked.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_mutex_wrong_owner.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_mutex_wrong_owner.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_mutexattr_double_destroy.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_mutexattr_double_destroy.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_destroy_read_locked.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_destroy_read_locked.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_destroy_write_locked.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_destroy_write_locked.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_double_destroy.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_double_destroy.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_read_wrong_owner.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_read_wrong_owner.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_unlock_unlocked.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_unlock_unlocked.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_write_read_deadlock.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_write_read_deadlock.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_write_write_deadlock.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_write_write_deadlock.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_write_wrong_owner.rs (100%) rename tests/fail/{ => shims}/sync/libc_pthread_rwlock_write_wrong_owner.stderr (100%) rename tests/pass/{ => shims}/env/args.rs (100%) rename tests/pass/{ => shims}/env/args.stdout (100%) rename tests/pass/{ => shims}/env/current_dir.rs (100%) rename tests/pass/{ => shims}/env/current_dir_with_isolation.rs (100%) rename tests/pass/{ => shims}/env/current_dir_with_isolation.stderr (100%) rename tests/pass/{ => shims}/env/current_exe.rs (100%) rename tests/pass/{ => shims}/env/home.rs (100%) rename tests/pass/{ => shims}/env/var-exclude.rs (100%) rename tests/pass/{ => shims}/env/var-forward.rs (100%) rename tests/pass/{ => shims}/env/var-without-isolation.rs (100%) rename tests/pass/{ => shims}/env/var.rs (100%) rename tests/pass/{ => shims}/env/var.stdout (100%) rename tests/pass/{ => shims}/exit.rs (100%) rename tests/pass/{ => shims}/fs.rs (100%) rename tests/pass/{ => shims}/fs.stderr (100%) rename tests/pass/{ => shims}/fs.stdout (100%) rename tests/pass/{ => shims}/fs_with_isolation.rs (100%) rename tests/pass/{ => shims}/fs_with_isolation.stderr (100%) rename tests/pass/{ => shims}/libc.rs (100%) rename tests/pass/{ => shims}/linux-getrandom-without-isolation.rs (100%) rename tests/pass/{ => shims}/linux-getrandom.rs (100%) rename tests/pass/{ => shims}/posix_memalign.rs (100%) rename tests/pass/{ => shims}/sleep_long.rs (100%) rename tests/pass/{ => shims}/time.rs (100%) diff --git a/tests/fail/backtrace/bad-backtrace-decl.rs b/tests/fail/shims/backtrace/bad-backtrace-decl.rs similarity index 100% rename from tests/fail/backtrace/bad-backtrace-decl.rs rename to tests/fail/shims/backtrace/bad-backtrace-decl.rs diff --git a/tests/fail/backtrace/bad-backtrace-decl.stderr b/tests/fail/shims/backtrace/bad-backtrace-decl.stderr similarity index 100% rename from tests/fail/backtrace/bad-backtrace-decl.stderr rename to tests/fail/shims/backtrace/bad-backtrace-decl.stderr diff --git a/tests/fail/backtrace/bad-backtrace-flags.rs b/tests/fail/shims/backtrace/bad-backtrace-flags.rs similarity index 100% rename from tests/fail/backtrace/bad-backtrace-flags.rs rename to tests/fail/shims/backtrace/bad-backtrace-flags.rs diff --git a/tests/fail/backtrace/bad-backtrace-flags.stderr b/tests/fail/shims/backtrace/bad-backtrace-flags.stderr similarity index 100% rename from tests/fail/backtrace/bad-backtrace-flags.stderr rename to tests/fail/shims/backtrace/bad-backtrace-flags.stderr diff --git a/tests/fail/backtrace/bad-backtrace-ptr.rs b/tests/fail/shims/backtrace/bad-backtrace-ptr.rs similarity index 100% rename from tests/fail/backtrace/bad-backtrace-ptr.rs rename to tests/fail/shims/backtrace/bad-backtrace-ptr.rs diff --git a/tests/fail/backtrace/bad-backtrace-ptr.stderr b/tests/fail/shims/backtrace/bad-backtrace-ptr.stderr similarity index 100% rename from tests/fail/backtrace/bad-backtrace-ptr.stderr rename to tests/fail/shims/backtrace/bad-backtrace-ptr.stderr diff --git a/tests/fail/backtrace/bad-backtrace-resolve-flags.rs b/tests/fail/shims/backtrace/bad-backtrace-resolve-flags.rs similarity index 100% rename from tests/fail/backtrace/bad-backtrace-resolve-flags.rs rename to tests/fail/shims/backtrace/bad-backtrace-resolve-flags.rs diff --git a/tests/fail/backtrace/bad-backtrace-resolve-flags.stderr b/tests/fail/shims/backtrace/bad-backtrace-resolve-flags.stderr similarity index 100% rename from tests/fail/backtrace/bad-backtrace-resolve-flags.stderr rename to tests/fail/shims/backtrace/bad-backtrace-resolve-flags.stderr diff --git a/tests/fail/backtrace/bad-backtrace-resolve-names-flags.rs b/tests/fail/shims/backtrace/bad-backtrace-resolve-names-flags.rs similarity index 100% rename from tests/fail/backtrace/bad-backtrace-resolve-names-flags.rs rename to tests/fail/shims/backtrace/bad-backtrace-resolve-names-flags.rs diff --git a/tests/fail/backtrace/bad-backtrace-resolve-names-flags.stderr b/tests/fail/shims/backtrace/bad-backtrace-resolve-names-flags.stderr similarity index 100% rename from tests/fail/backtrace/bad-backtrace-resolve-names-flags.stderr rename to tests/fail/shims/backtrace/bad-backtrace-resolve-names-flags.stderr diff --git a/tests/fail/backtrace/bad-backtrace-size-flags.rs b/tests/fail/shims/backtrace/bad-backtrace-size-flags.rs similarity index 100% rename from tests/fail/backtrace/bad-backtrace-size-flags.rs rename to tests/fail/shims/backtrace/bad-backtrace-size-flags.rs diff --git a/tests/fail/backtrace/bad-backtrace-size-flags.stderr b/tests/fail/shims/backtrace/bad-backtrace-size-flags.stderr similarity index 100% rename from tests/fail/backtrace/bad-backtrace-size-flags.stderr rename to tests/fail/shims/backtrace/bad-backtrace-size-flags.stderr diff --git a/tests/fail/fs/close_stdout.rs b/tests/fail/shims/fs/close_stdout.rs similarity index 100% rename from tests/fail/fs/close_stdout.rs rename to tests/fail/shims/fs/close_stdout.rs diff --git a/tests/fail/fs/close_stdout.stderr b/tests/fail/shims/fs/close_stdout.stderr similarity index 100% rename from tests/fail/fs/close_stdout.stderr rename to tests/fail/shims/fs/close_stdout.stderr diff --git a/tests/fail/fs/isolated_file.rs b/tests/fail/shims/fs/isolated_file.rs similarity index 100% rename from tests/fail/fs/isolated_file.rs rename to tests/fail/shims/fs/isolated_file.rs diff --git a/tests/fail/fs/isolated_file.stderr b/tests/fail/shims/fs/isolated_file.stderr similarity index 100% rename from tests/fail/fs/isolated_file.stderr rename to tests/fail/shims/fs/isolated_file.stderr diff --git a/tests/fail/fs/isolated_stdin.rs b/tests/fail/shims/fs/isolated_stdin.rs similarity index 100% rename from tests/fail/fs/isolated_stdin.rs rename to tests/fail/shims/fs/isolated_stdin.rs diff --git a/tests/fail/fs/isolated_stdin.stderr b/tests/fail/shims/fs/isolated_stdin.stderr similarity index 100% rename from tests/fail/fs/isolated_stdin.stderr rename to tests/fail/shims/fs/isolated_stdin.stderr diff --git a/tests/fail/fs/mkstemp_immutable_arg.rs b/tests/fail/shims/fs/mkstemp_immutable_arg.rs similarity index 100% rename from tests/fail/fs/mkstemp_immutable_arg.rs rename to tests/fail/shims/fs/mkstemp_immutable_arg.rs diff --git a/tests/fail/fs/mkstemp_immutable_arg.stderr b/tests/fail/shims/fs/mkstemp_immutable_arg.stderr similarity index 100% rename from tests/fail/fs/mkstemp_immutable_arg.stderr rename to tests/fail/shims/fs/mkstemp_immutable_arg.stderr diff --git a/tests/fail/fs/read_from_stdout.rs b/tests/fail/shims/fs/read_from_stdout.rs similarity index 100% rename from tests/fail/fs/read_from_stdout.rs rename to tests/fail/shims/fs/read_from_stdout.rs diff --git a/tests/fail/fs/read_from_stdout.stderr b/tests/fail/shims/fs/read_from_stdout.stderr similarity index 100% rename from tests/fail/fs/read_from_stdout.stderr rename to tests/fail/shims/fs/read_from_stdout.stderr diff --git a/tests/fail/fs/unix_open_missing_required_mode.rs b/tests/fail/shims/fs/unix_open_missing_required_mode.rs similarity index 100% rename from tests/fail/fs/unix_open_missing_required_mode.rs rename to tests/fail/shims/fs/unix_open_missing_required_mode.rs diff --git a/tests/fail/fs/unix_open_missing_required_mode.stderr b/tests/fail/shims/fs/unix_open_missing_required_mode.stderr similarity index 100% rename from tests/fail/fs/unix_open_missing_required_mode.stderr rename to tests/fail/shims/fs/unix_open_missing_required_mode.stderr diff --git a/tests/fail/fs/write_to_stdin.rs b/tests/fail/shims/fs/write_to_stdin.rs similarity index 100% rename from tests/fail/fs/write_to_stdin.rs rename to tests/fail/shims/fs/write_to_stdin.rs diff --git a/tests/fail/fs/write_to_stdin.stderr b/tests/fail/shims/fs/write_to_stdin.stderr similarity index 100% rename from tests/fail/fs/write_to_stdin.stderr rename to tests/fail/shims/fs/write_to_stdin.stderr diff --git a/tests/fail/shim_arg_size.32bit.stderr b/tests/fail/shims/shim_arg_size.32bit.stderr similarity index 100% rename from tests/fail/shim_arg_size.32bit.stderr rename to tests/fail/shims/shim_arg_size.32bit.stderr diff --git a/tests/fail/shim_arg_size.64bit.stderr b/tests/fail/shims/shim_arg_size.64bit.stderr similarity index 100% rename from tests/fail/shim_arg_size.64bit.stderr rename to tests/fail/shims/shim_arg_size.64bit.stderr diff --git a/tests/fail/shim_arg_size.rs b/tests/fail/shims/shim_arg_size.rs similarity index 100% rename from tests/fail/shim_arg_size.rs rename to tests/fail/shims/shim_arg_size.rs diff --git a/tests/fail/sync/libc_pthread_cond_double_destroy.rs b/tests/fail/shims/sync/libc_pthread_cond_double_destroy.rs similarity index 100% rename from tests/fail/sync/libc_pthread_cond_double_destroy.rs rename to tests/fail/shims/sync/libc_pthread_cond_double_destroy.rs diff --git a/tests/fail/sync/libc_pthread_cond_double_destroy.stderr b/tests/fail/shims/sync/libc_pthread_cond_double_destroy.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_cond_double_destroy.stderr rename to tests/fail/shims/sync/libc_pthread_cond_double_destroy.stderr diff --git a/tests/fail/sync/libc_pthread_condattr_double_destroy.rs b/tests/fail/shims/sync/libc_pthread_condattr_double_destroy.rs similarity index 100% rename from tests/fail/sync/libc_pthread_condattr_double_destroy.rs rename to tests/fail/shims/sync/libc_pthread_condattr_double_destroy.rs diff --git a/tests/fail/sync/libc_pthread_condattr_double_destroy.stderr b/tests/fail/shims/sync/libc_pthread_condattr_double_destroy.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_condattr_double_destroy.stderr rename to tests/fail/shims/sync/libc_pthread_condattr_double_destroy.stderr diff --git a/tests/fail/sync/libc_pthread_mutex_NULL_deadlock.rs b/tests/fail/shims/sync/libc_pthread_mutex_NULL_deadlock.rs similarity index 100% rename from tests/fail/sync/libc_pthread_mutex_NULL_deadlock.rs rename to tests/fail/shims/sync/libc_pthread_mutex_NULL_deadlock.rs diff --git a/tests/fail/sync/libc_pthread_mutex_NULL_deadlock.stderr b/tests/fail/shims/sync/libc_pthread_mutex_NULL_deadlock.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_mutex_NULL_deadlock.stderr rename to tests/fail/shims/sync/libc_pthread_mutex_NULL_deadlock.stderr diff --git a/tests/fail/sync/libc_pthread_mutex_deadlock.rs b/tests/fail/shims/sync/libc_pthread_mutex_deadlock.rs similarity index 100% rename from tests/fail/sync/libc_pthread_mutex_deadlock.rs rename to tests/fail/shims/sync/libc_pthread_mutex_deadlock.rs diff --git a/tests/fail/sync/libc_pthread_mutex_deadlock.stderr b/tests/fail/shims/sync/libc_pthread_mutex_deadlock.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_mutex_deadlock.stderr rename to tests/fail/shims/sync/libc_pthread_mutex_deadlock.stderr diff --git a/tests/fail/sync/libc_pthread_mutex_default_deadlock.rs b/tests/fail/shims/sync/libc_pthread_mutex_default_deadlock.rs similarity index 100% rename from tests/fail/sync/libc_pthread_mutex_default_deadlock.rs rename to tests/fail/shims/sync/libc_pthread_mutex_default_deadlock.rs diff --git a/tests/fail/sync/libc_pthread_mutex_default_deadlock.stderr b/tests/fail/shims/sync/libc_pthread_mutex_default_deadlock.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_mutex_default_deadlock.stderr rename to tests/fail/shims/sync/libc_pthread_mutex_default_deadlock.stderr diff --git a/tests/fail/sync/libc_pthread_mutex_destroy_locked.rs b/tests/fail/shims/sync/libc_pthread_mutex_destroy_locked.rs similarity index 100% rename from tests/fail/sync/libc_pthread_mutex_destroy_locked.rs rename to tests/fail/shims/sync/libc_pthread_mutex_destroy_locked.rs diff --git a/tests/fail/sync/libc_pthread_mutex_destroy_locked.stderr b/tests/fail/shims/sync/libc_pthread_mutex_destroy_locked.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_mutex_destroy_locked.stderr rename to tests/fail/shims/sync/libc_pthread_mutex_destroy_locked.stderr diff --git a/tests/fail/sync/libc_pthread_mutex_double_destroy.rs b/tests/fail/shims/sync/libc_pthread_mutex_double_destroy.rs similarity index 100% rename from tests/fail/sync/libc_pthread_mutex_double_destroy.rs rename to tests/fail/shims/sync/libc_pthread_mutex_double_destroy.rs diff --git a/tests/fail/sync/libc_pthread_mutex_double_destroy.stderr b/tests/fail/shims/sync/libc_pthread_mutex_double_destroy.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_mutex_double_destroy.stderr rename to tests/fail/shims/sync/libc_pthread_mutex_double_destroy.stderr diff --git a/tests/fail/sync/libc_pthread_mutex_normal_deadlock.rs b/tests/fail/shims/sync/libc_pthread_mutex_normal_deadlock.rs similarity index 100% rename from tests/fail/sync/libc_pthread_mutex_normal_deadlock.rs rename to tests/fail/shims/sync/libc_pthread_mutex_normal_deadlock.rs diff --git a/tests/fail/sync/libc_pthread_mutex_normal_deadlock.stderr b/tests/fail/shims/sync/libc_pthread_mutex_normal_deadlock.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_mutex_normal_deadlock.stderr rename to tests/fail/shims/sync/libc_pthread_mutex_normal_deadlock.stderr diff --git a/tests/fail/sync/libc_pthread_mutex_normal_unlock_unlocked.rs b/tests/fail/shims/sync/libc_pthread_mutex_normal_unlock_unlocked.rs similarity index 100% rename from tests/fail/sync/libc_pthread_mutex_normal_unlock_unlocked.rs rename to tests/fail/shims/sync/libc_pthread_mutex_normal_unlock_unlocked.rs diff --git a/tests/fail/sync/libc_pthread_mutex_normal_unlock_unlocked.stderr b/tests/fail/shims/sync/libc_pthread_mutex_normal_unlock_unlocked.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_mutex_normal_unlock_unlocked.stderr rename to tests/fail/shims/sync/libc_pthread_mutex_normal_unlock_unlocked.stderr diff --git a/tests/fail/sync/libc_pthread_mutex_wrong_owner.rs b/tests/fail/shims/sync/libc_pthread_mutex_wrong_owner.rs similarity index 100% rename from tests/fail/sync/libc_pthread_mutex_wrong_owner.rs rename to tests/fail/shims/sync/libc_pthread_mutex_wrong_owner.rs diff --git a/tests/fail/sync/libc_pthread_mutex_wrong_owner.stderr b/tests/fail/shims/sync/libc_pthread_mutex_wrong_owner.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_mutex_wrong_owner.stderr rename to tests/fail/shims/sync/libc_pthread_mutex_wrong_owner.stderr diff --git a/tests/fail/sync/libc_pthread_mutexattr_double_destroy.rs b/tests/fail/shims/sync/libc_pthread_mutexattr_double_destroy.rs similarity index 100% rename from tests/fail/sync/libc_pthread_mutexattr_double_destroy.rs rename to tests/fail/shims/sync/libc_pthread_mutexattr_double_destroy.rs diff --git a/tests/fail/sync/libc_pthread_mutexattr_double_destroy.stderr b/tests/fail/shims/sync/libc_pthread_mutexattr_double_destroy.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_mutexattr_double_destroy.stderr rename to tests/fail/shims/sync/libc_pthread_mutexattr_double_destroy.stderr diff --git a/tests/fail/sync/libc_pthread_rwlock_destroy_read_locked.rs b/tests/fail/shims/sync/libc_pthread_rwlock_destroy_read_locked.rs similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_destroy_read_locked.rs rename to tests/fail/shims/sync/libc_pthread_rwlock_destroy_read_locked.rs diff --git a/tests/fail/sync/libc_pthread_rwlock_destroy_read_locked.stderr b/tests/fail/shims/sync/libc_pthread_rwlock_destroy_read_locked.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_destroy_read_locked.stderr rename to tests/fail/shims/sync/libc_pthread_rwlock_destroy_read_locked.stderr diff --git a/tests/fail/sync/libc_pthread_rwlock_destroy_write_locked.rs b/tests/fail/shims/sync/libc_pthread_rwlock_destroy_write_locked.rs similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_destroy_write_locked.rs rename to tests/fail/shims/sync/libc_pthread_rwlock_destroy_write_locked.rs diff --git a/tests/fail/sync/libc_pthread_rwlock_destroy_write_locked.stderr b/tests/fail/shims/sync/libc_pthread_rwlock_destroy_write_locked.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_destroy_write_locked.stderr rename to tests/fail/shims/sync/libc_pthread_rwlock_destroy_write_locked.stderr diff --git a/tests/fail/sync/libc_pthread_rwlock_double_destroy.rs b/tests/fail/shims/sync/libc_pthread_rwlock_double_destroy.rs similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_double_destroy.rs rename to tests/fail/shims/sync/libc_pthread_rwlock_double_destroy.rs diff --git a/tests/fail/sync/libc_pthread_rwlock_double_destroy.stderr b/tests/fail/shims/sync/libc_pthread_rwlock_double_destroy.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_double_destroy.stderr rename to tests/fail/shims/sync/libc_pthread_rwlock_double_destroy.stderr diff --git a/tests/fail/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.rs b/tests/fail/shims/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.rs similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.rs rename to tests/fail/shims/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.rs diff --git a/tests/fail/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr b/tests/fail/shims/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr rename to tests/fail/shims/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr diff --git a/tests/fail/sync/libc_pthread_rwlock_read_wrong_owner.rs b/tests/fail/shims/sync/libc_pthread_rwlock_read_wrong_owner.rs similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_read_wrong_owner.rs rename to tests/fail/shims/sync/libc_pthread_rwlock_read_wrong_owner.rs diff --git a/tests/fail/sync/libc_pthread_rwlock_read_wrong_owner.stderr b/tests/fail/shims/sync/libc_pthread_rwlock_read_wrong_owner.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_read_wrong_owner.stderr rename to tests/fail/shims/sync/libc_pthread_rwlock_read_wrong_owner.stderr diff --git a/tests/fail/sync/libc_pthread_rwlock_unlock_unlocked.rs b/tests/fail/shims/sync/libc_pthread_rwlock_unlock_unlocked.rs similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_unlock_unlocked.rs rename to tests/fail/shims/sync/libc_pthread_rwlock_unlock_unlocked.rs diff --git a/tests/fail/sync/libc_pthread_rwlock_unlock_unlocked.stderr b/tests/fail/shims/sync/libc_pthread_rwlock_unlock_unlocked.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_unlock_unlocked.stderr rename to tests/fail/shims/sync/libc_pthread_rwlock_unlock_unlocked.stderr diff --git a/tests/fail/sync/libc_pthread_rwlock_write_read_deadlock.rs b/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock.rs similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_write_read_deadlock.rs rename to tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock.rs diff --git a/tests/fail/sync/libc_pthread_rwlock_write_read_deadlock.stderr b/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_write_read_deadlock.stderr rename to tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock.stderr diff --git a/tests/fail/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.rs b/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.rs similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.rs rename to tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.rs diff --git a/tests/fail/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr b/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr rename to tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr diff --git a/tests/fail/sync/libc_pthread_rwlock_write_write_deadlock.rs b/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock.rs similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_write_write_deadlock.rs rename to tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock.rs diff --git a/tests/fail/sync/libc_pthread_rwlock_write_write_deadlock.stderr b/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_write_write_deadlock.stderr rename to tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock.stderr diff --git a/tests/fail/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.rs b/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.rs similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.rs rename to tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.rs diff --git a/tests/fail/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr b/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr rename to tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr diff --git a/tests/fail/sync/libc_pthread_rwlock_write_wrong_owner.rs b/tests/fail/shims/sync/libc_pthread_rwlock_write_wrong_owner.rs similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_write_wrong_owner.rs rename to tests/fail/shims/sync/libc_pthread_rwlock_write_wrong_owner.rs diff --git a/tests/fail/sync/libc_pthread_rwlock_write_wrong_owner.stderr b/tests/fail/shims/sync/libc_pthread_rwlock_write_wrong_owner.stderr similarity index 100% rename from tests/fail/sync/libc_pthread_rwlock_write_wrong_owner.stderr rename to tests/fail/shims/sync/libc_pthread_rwlock_write_wrong_owner.stderr diff --git a/tests/pass/env/args.rs b/tests/pass/shims/env/args.rs similarity index 100% rename from tests/pass/env/args.rs rename to tests/pass/shims/env/args.rs diff --git a/tests/pass/env/args.stdout b/tests/pass/shims/env/args.stdout similarity index 100% rename from tests/pass/env/args.stdout rename to tests/pass/shims/env/args.stdout diff --git a/tests/pass/env/current_dir.rs b/tests/pass/shims/env/current_dir.rs similarity index 100% rename from tests/pass/env/current_dir.rs rename to tests/pass/shims/env/current_dir.rs diff --git a/tests/pass/env/current_dir_with_isolation.rs b/tests/pass/shims/env/current_dir_with_isolation.rs similarity index 100% rename from tests/pass/env/current_dir_with_isolation.rs rename to tests/pass/shims/env/current_dir_with_isolation.rs diff --git a/tests/pass/env/current_dir_with_isolation.stderr b/tests/pass/shims/env/current_dir_with_isolation.stderr similarity index 100% rename from tests/pass/env/current_dir_with_isolation.stderr rename to tests/pass/shims/env/current_dir_with_isolation.stderr diff --git a/tests/pass/env/current_exe.rs b/tests/pass/shims/env/current_exe.rs similarity index 100% rename from tests/pass/env/current_exe.rs rename to tests/pass/shims/env/current_exe.rs diff --git a/tests/pass/env/home.rs b/tests/pass/shims/env/home.rs similarity index 100% rename from tests/pass/env/home.rs rename to tests/pass/shims/env/home.rs diff --git a/tests/pass/env/var-exclude.rs b/tests/pass/shims/env/var-exclude.rs similarity index 100% rename from tests/pass/env/var-exclude.rs rename to tests/pass/shims/env/var-exclude.rs diff --git a/tests/pass/env/var-forward.rs b/tests/pass/shims/env/var-forward.rs similarity index 100% rename from tests/pass/env/var-forward.rs rename to tests/pass/shims/env/var-forward.rs diff --git a/tests/pass/env/var-without-isolation.rs b/tests/pass/shims/env/var-without-isolation.rs similarity index 100% rename from tests/pass/env/var-without-isolation.rs rename to tests/pass/shims/env/var-without-isolation.rs diff --git a/tests/pass/env/var.rs b/tests/pass/shims/env/var.rs similarity index 100% rename from tests/pass/env/var.rs rename to tests/pass/shims/env/var.rs diff --git a/tests/pass/env/var.stdout b/tests/pass/shims/env/var.stdout similarity index 100% rename from tests/pass/env/var.stdout rename to tests/pass/shims/env/var.stdout diff --git a/tests/pass/exit.rs b/tests/pass/shims/exit.rs similarity index 100% rename from tests/pass/exit.rs rename to tests/pass/shims/exit.rs diff --git a/tests/pass/fs.rs b/tests/pass/shims/fs.rs similarity index 100% rename from tests/pass/fs.rs rename to tests/pass/shims/fs.rs diff --git a/tests/pass/fs.stderr b/tests/pass/shims/fs.stderr similarity index 100% rename from tests/pass/fs.stderr rename to tests/pass/shims/fs.stderr diff --git a/tests/pass/fs.stdout b/tests/pass/shims/fs.stdout similarity index 100% rename from tests/pass/fs.stdout rename to tests/pass/shims/fs.stdout diff --git a/tests/pass/fs_with_isolation.rs b/tests/pass/shims/fs_with_isolation.rs similarity index 100% rename from tests/pass/fs_with_isolation.rs rename to tests/pass/shims/fs_with_isolation.rs diff --git a/tests/pass/fs_with_isolation.stderr b/tests/pass/shims/fs_with_isolation.stderr similarity index 100% rename from tests/pass/fs_with_isolation.stderr rename to tests/pass/shims/fs_with_isolation.stderr diff --git a/tests/pass/libc.rs b/tests/pass/shims/libc.rs similarity index 100% rename from tests/pass/libc.rs rename to tests/pass/shims/libc.rs diff --git a/tests/pass/linux-getrandom-without-isolation.rs b/tests/pass/shims/linux-getrandom-without-isolation.rs similarity index 100% rename from tests/pass/linux-getrandom-without-isolation.rs rename to tests/pass/shims/linux-getrandom-without-isolation.rs diff --git a/tests/pass/linux-getrandom.rs b/tests/pass/shims/linux-getrandom.rs similarity index 100% rename from tests/pass/linux-getrandom.rs rename to tests/pass/shims/linux-getrandom.rs diff --git a/tests/pass/posix_memalign.rs b/tests/pass/shims/posix_memalign.rs similarity index 100% rename from tests/pass/posix_memalign.rs rename to tests/pass/shims/posix_memalign.rs diff --git a/tests/pass/sleep_long.rs b/tests/pass/shims/sleep_long.rs similarity index 100% rename from tests/pass/sleep_long.rs rename to tests/pass/shims/sleep_long.rs diff --git a/tests/pass/time.rs b/tests/pass/shims/time.rs similarity index 100% rename from tests/pass/time.rs rename to tests/pass/shims/time.rs From 7c856f88639685faff194ea7d12748ae0936436c Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 17 Aug 2022 21:54:28 -0400 Subject: [PATCH 2/4] move libc pthread tests into separate file --- tests/pass/shims/{libc.rs => libc-misc.rs} | 125 -------------------- tests/pass/shims/pthreads.rs | 127 +++++++++++++++++++++ 2 files changed, 127 insertions(+), 125 deletions(-) rename tests/pass/shims/{libc.rs => libc-misc.rs} (61%) create mode 100644 tests/pass/shims/pthreads.rs diff --git a/tests/pass/shims/libc.rs b/tests/pass/shims/libc-misc.rs similarity index 61% rename from tests/pass/shims/libc.rs rename to tests/pass/shims/libc-misc.rs index f3aaccd57411..a883a3d967a3 100644 --- a/tests/pass/shims/libc.rs +++ b/tests/pass/shims/libc-misc.rs @@ -1,7 +1,6 @@ //@ignore-target-windows: No libc on Windows //@compile-flags: -Zmiri-disable-isolation #![feature(io_error_more)] -#![feature(rustc_private)] use std::fs::{remove_file, File}; use std::os::unix::io::AsRawFd; @@ -161,122 +160,6 @@ fn test_sync_file_range() { assert_eq!(result_2, 0); } -fn test_mutex_libc_init_recursive() { - unsafe { - let mut attr: libc::pthread_mutexattr_t = std::mem::zeroed(); - assert_eq!(libc::pthread_mutexattr_init(&mut attr as *mut _), 0); - assert_eq!( - libc::pthread_mutexattr_settype(&mut attr as *mut _, libc::PTHREAD_MUTEX_RECURSIVE), - 0, - ); - let mut mutex: libc::pthread_mutex_t = std::mem::zeroed(); - assert_eq!(libc::pthread_mutex_init(&mut mutex as *mut _, &mut attr as *mut _), 0); - assert_eq!(libc::pthread_mutex_lock(&mut mutex as *mut _), 0); - assert_eq!(libc::pthread_mutex_trylock(&mut mutex as *mut _), 0); - assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), 0); - assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), 0); - assert_eq!(libc::pthread_mutex_trylock(&mut mutex as *mut _), 0); - assert_eq!(libc::pthread_mutex_lock(&mut mutex as *mut _), 0); - assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), 0); - assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), 0); - assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), libc::EPERM); - assert_eq!(libc::pthread_mutex_destroy(&mut mutex as *mut _), 0); - assert_eq!(libc::pthread_mutexattr_destroy(&mut attr as *mut _), 0); - } -} - -fn test_mutex_libc_init_normal() { - unsafe { - let mut mutexattr: libc::pthread_mutexattr_t = std::mem::zeroed(); - assert_eq!( - libc::pthread_mutexattr_settype(&mut mutexattr as *mut _, 0x12345678), - libc::EINVAL, - ); - assert_eq!( - libc::pthread_mutexattr_settype(&mut mutexattr as *mut _, libc::PTHREAD_MUTEX_NORMAL), - 0, - ); - let mut mutex: libc::pthread_mutex_t = std::mem::zeroed(); - assert_eq!(libc::pthread_mutex_init(&mut mutex as *mut _, &mutexattr as *const _), 0); - assert_eq!(libc::pthread_mutex_lock(&mut mutex as *mut _), 0); - assert_eq!(libc::pthread_mutex_trylock(&mut mutex as *mut _), libc::EBUSY); - assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), 0); - assert_eq!(libc::pthread_mutex_trylock(&mut mutex as *mut _), 0); - assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), 0); - assert_eq!(libc::pthread_mutex_destroy(&mut mutex as *mut _), 0); - } -} - -fn test_mutex_libc_init_errorcheck() { - unsafe { - let mut mutexattr: libc::pthread_mutexattr_t = std::mem::zeroed(); - assert_eq!( - libc::pthread_mutexattr_settype( - &mut mutexattr as *mut _, - libc::PTHREAD_MUTEX_ERRORCHECK, - ), - 0, - ); - let mut mutex: libc::pthread_mutex_t = std::mem::zeroed(); - assert_eq!(libc::pthread_mutex_init(&mut mutex as *mut _, &mutexattr as *const _), 0); - assert_eq!(libc::pthread_mutex_lock(&mut mutex as *mut _), 0); - assert_eq!(libc::pthread_mutex_trylock(&mut mutex as *mut _), libc::EBUSY); - assert_eq!(libc::pthread_mutex_lock(&mut mutex as *mut _), libc::EDEADLK); - assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), 0); - assert_eq!(libc::pthread_mutex_trylock(&mut mutex as *mut _), 0); - assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), 0); - assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), libc::EPERM); - assert_eq!(libc::pthread_mutex_destroy(&mut mutex as *mut _), 0); - } -} - -// Only linux provides PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP, -// libc for macOS just has the default PTHREAD_MUTEX_INITIALIZER. -#[cfg(target_os = "linux")] -fn test_mutex_libc_static_initializer_recursive() { - let mutex = std::cell::UnsafeCell::new(libc::PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP); - unsafe { - assert_eq!(libc::pthread_mutex_lock(mutex.get()), 0); - assert_eq!(libc::pthread_mutex_trylock(mutex.get()), 0); - assert_eq!(libc::pthread_mutex_unlock(mutex.get()), 0); - assert_eq!(libc::pthread_mutex_unlock(mutex.get()), 0); - assert_eq!(libc::pthread_mutex_trylock(mutex.get()), 0); - assert_eq!(libc::pthread_mutex_lock(mutex.get()), 0); - assert_eq!(libc::pthread_mutex_unlock(mutex.get()), 0); - assert_eq!(libc::pthread_mutex_unlock(mutex.get()), 0); - assert_eq!(libc::pthread_mutex_unlock(mutex.get()), libc::EPERM); - assert_eq!(libc::pthread_mutex_destroy(mutex.get()), 0); - } -} - -// Testing the behavior of std::sync::RwLock does not fully exercise the pthread rwlock shims, we -// need to go a layer deeper and test the behavior of the libc functions, because -// std::sys::unix::rwlock::RWLock itself keeps track of write_locked and num_readers. -fn test_rwlock_libc_static_initializer() { - let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER); - unsafe { - assert_eq!(libc::pthread_rwlock_rdlock(rw.get()), 0); - assert_eq!(libc::pthread_rwlock_rdlock(rw.get()), 0); - assert_eq!(libc::pthread_rwlock_unlock(rw.get()), 0); - assert_eq!(libc::pthread_rwlock_tryrdlock(rw.get()), 0); - assert_eq!(libc::pthread_rwlock_unlock(rw.get()), 0); - assert_eq!(libc::pthread_rwlock_trywrlock(rw.get()), libc::EBUSY); - assert_eq!(libc::pthread_rwlock_unlock(rw.get()), 0); - - assert_eq!(libc::pthread_rwlock_wrlock(rw.get()), 0); - assert_eq!(libc::pthread_rwlock_tryrdlock(rw.get()), libc::EBUSY); - assert_eq!(libc::pthread_rwlock_trywrlock(rw.get()), libc::EBUSY); - assert_eq!(libc::pthread_rwlock_unlock(rw.get()), 0); - - assert_eq!(libc::pthread_rwlock_trywrlock(rw.get()), 0); - assert_eq!(libc::pthread_rwlock_tryrdlock(rw.get()), libc::EBUSY); - assert_eq!(libc::pthread_rwlock_trywrlock(rw.get()), libc::EBUSY); - assert_eq!(libc::pthread_rwlock_unlock(rw.get()), 0); - - assert_eq!(libc::pthread_rwlock_destroy(rw.get()), 0); - } -} - /// Tests whether each thread has its own `__errno_location`. fn test_thread_local_errno() { #[cfg(target_os = "linux")] @@ -413,14 +296,6 @@ fn main() { #[cfg(any(target_os = "linux"))] test_sync_file_range(); - test_mutex_libc_init_recursive(); - test_mutex_libc_init_normal(); - test_mutex_libc_init_errorcheck(); - test_rwlock_libc_static_initializer(); - - #[cfg(any(target_os = "linux"))] - test_mutex_libc_static_initializer_recursive(); - test_thread_local_errno(); #[cfg(any(target_os = "linux"))] diff --git a/tests/pass/shims/pthreads.rs b/tests/pass/shims/pthreads.rs new file mode 100644 index 000000000000..d062eda7e90c --- /dev/null +++ b/tests/pass/shims/pthreads.rs @@ -0,0 +1,127 @@ +//@ignore-target-windows: No libc on Windows + +fn main() { + test_mutex_libc_init_recursive(); + test_mutex_libc_init_normal(); + test_mutex_libc_init_errorcheck(); + test_rwlock_libc_static_initializer(); + + #[cfg(any(target_os = "linux"))] + test_mutex_libc_static_initializer_recursive(); +} + +fn test_mutex_libc_init_recursive() { + unsafe { + let mut attr: libc::pthread_mutexattr_t = std::mem::zeroed(); + assert_eq!(libc::pthread_mutexattr_init(&mut attr as *mut _), 0); + assert_eq!( + libc::pthread_mutexattr_settype(&mut attr as *mut _, libc::PTHREAD_MUTEX_RECURSIVE), + 0, + ); + let mut mutex: libc::pthread_mutex_t = std::mem::zeroed(); + assert_eq!(libc::pthread_mutex_init(&mut mutex as *mut _, &mut attr as *mut _), 0); + assert_eq!(libc::pthread_mutex_lock(&mut mutex as *mut _), 0); + assert_eq!(libc::pthread_mutex_trylock(&mut mutex as *mut _), 0); + assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), 0); + assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), 0); + assert_eq!(libc::pthread_mutex_trylock(&mut mutex as *mut _), 0); + assert_eq!(libc::pthread_mutex_lock(&mut mutex as *mut _), 0); + assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), 0); + assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), 0); + assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), libc::EPERM); + assert_eq!(libc::pthread_mutex_destroy(&mut mutex as *mut _), 0); + assert_eq!(libc::pthread_mutexattr_destroy(&mut attr as *mut _), 0); + } +} + +fn test_mutex_libc_init_normal() { + unsafe { + let mut mutexattr: libc::pthread_mutexattr_t = std::mem::zeroed(); + assert_eq!( + libc::pthread_mutexattr_settype(&mut mutexattr as *mut _, 0x12345678), + libc::EINVAL, + ); + assert_eq!( + libc::pthread_mutexattr_settype(&mut mutexattr as *mut _, libc::PTHREAD_MUTEX_NORMAL), + 0, + ); + let mut mutex: libc::pthread_mutex_t = std::mem::zeroed(); + assert_eq!(libc::pthread_mutex_init(&mut mutex as *mut _, &mutexattr as *const _), 0); + assert_eq!(libc::pthread_mutex_lock(&mut mutex as *mut _), 0); + assert_eq!(libc::pthread_mutex_trylock(&mut mutex as *mut _), libc::EBUSY); + assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), 0); + assert_eq!(libc::pthread_mutex_trylock(&mut mutex as *mut _), 0); + assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), 0); + assert_eq!(libc::pthread_mutex_destroy(&mut mutex as *mut _), 0); + } +} + +fn test_mutex_libc_init_errorcheck() { + unsafe { + let mut mutexattr: libc::pthread_mutexattr_t = std::mem::zeroed(); + assert_eq!( + libc::pthread_mutexattr_settype( + &mut mutexattr as *mut _, + libc::PTHREAD_MUTEX_ERRORCHECK, + ), + 0, + ); + let mut mutex: libc::pthread_mutex_t = std::mem::zeroed(); + assert_eq!(libc::pthread_mutex_init(&mut mutex as *mut _, &mutexattr as *const _), 0); + assert_eq!(libc::pthread_mutex_lock(&mut mutex as *mut _), 0); + assert_eq!(libc::pthread_mutex_trylock(&mut mutex as *mut _), libc::EBUSY); + assert_eq!(libc::pthread_mutex_lock(&mut mutex as *mut _), libc::EDEADLK); + assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), 0); + assert_eq!(libc::pthread_mutex_trylock(&mut mutex as *mut _), 0); + assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), 0); + assert_eq!(libc::pthread_mutex_unlock(&mut mutex as *mut _), libc::EPERM); + assert_eq!(libc::pthread_mutex_destroy(&mut mutex as *mut _), 0); + } +} + +// Only linux provides PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP, +// libc for macOS just has the default PTHREAD_MUTEX_INITIALIZER. +#[cfg(target_os = "linux")] +fn test_mutex_libc_static_initializer_recursive() { + let mutex = std::cell::UnsafeCell::new(libc::PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP); + unsafe { + assert_eq!(libc::pthread_mutex_lock(mutex.get()), 0); + assert_eq!(libc::pthread_mutex_trylock(mutex.get()), 0); + assert_eq!(libc::pthread_mutex_unlock(mutex.get()), 0); + assert_eq!(libc::pthread_mutex_unlock(mutex.get()), 0); + assert_eq!(libc::pthread_mutex_trylock(mutex.get()), 0); + assert_eq!(libc::pthread_mutex_lock(mutex.get()), 0); + assert_eq!(libc::pthread_mutex_unlock(mutex.get()), 0); + assert_eq!(libc::pthread_mutex_unlock(mutex.get()), 0); + assert_eq!(libc::pthread_mutex_unlock(mutex.get()), libc::EPERM); + assert_eq!(libc::pthread_mutex_destroy(mutex.get()), 0); + } +} + +// Testing the behavior of std::sync::RwLock does not fully exercise the pthread rwlock shims, we +// need to go a layer deeper and test the behavior of the libc functions, because +// std::sys::unix::rwlock::RWLock itself keeps track of write_locked and num_readers. +fn test_rwlock_libc_static_initializer() { + let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER); + unsafe { + assert_eq!(libc::pthread_rwlock_rdlock(rw.get()), 0); + assert_eq!(libc::pthread_rwlock_rdlock(rw.get()), 0); + assert_eq!(libc::pthread_rwlock_unlock(rw.get()), 0); + assert_eq!(libc::pthread_rwlock_tryrdlock(rw.get()), 0); + assert_eq!(libc::pthread_rwlock_unlock(rw.get()), 0); + assert_eq!(libc::pthread_rwlock_trywrlock(rw.get()), libc::EBUSY); + assert_eq!(libc::pthread_rwlock_unlock(rw.get()), 0); + + assert_eq!(libc::pthread_rwlock_wrlock(rw.get()), 0); + assert_eq!(libc::pthread_rwlock_tryrdlock(rw.get()), libc::EBUSY); + assert_eq!(libc::pthread_rwlock_trywrlock(rw.get()), libc::EBUSY); + assert_eq!(libc::pthread_rwlock_unlock(rw.get()), 0); + + assert_eq!(libc::pthread_rwlock_trywrlock(rw.get()), 0); + assert_eq!(libc::pthread_rwlock_tryrdlock(rw.get()), libc::EBUSY); + assert_eq!(libc::pthread_rwlock_trywrlock(rw.get()), libc::EBUSY); + assert_eq!(libc::pthread_rwlock_unlock(rw.get()), 0); + + assert_eq!(libc::pthread_rwlock_destroy(rw.get()), 0); + } +} From 83953f58e76b8edc236acf56f2526f4fd0957e83 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 17 Aug 2022 21:58:10 -0400 Subject: [PATCH 3/4] remove unneeded rustc_private feature --- tests/fail/concurrency/libc_pthread_create_main_terminate.rs | 2 -- tests/fail/concurrency/libc_pthread_join_detached.rs | 2 -- tests/fail/concurrency/libc_pthread_join_joined.rs | 2 -- tests/fail/concurrency/libc_pthread_join_main.rs | 2 -- tests/fail/concurrency/libc_pthread_join_multiple.rs | 2 -- tests/fail/concurrency/libc_pthread_join_self.rs | 2 -- tests/fail/concurrency/too_few_args.rs | 2 -- tests/fail/concurrency/too_many_args.rs | 2 -- tests/fail/concurrency/unwind_top_of_stack.rs | 2 +- tests/fail/shims/fs/close_stdout.rs | 2 -- tests/fail/shims/fs/isolated_stdin.rs | 2 -- tests/fail/shims/fs/mkstemp_immutable_arg.rs | 2 -- tests/fail/shims/fs/read_from_stdout.rs | 2 -- tests/fail/shims/fs/unix_open_missing_required_mode.rs | 2 -- tests/fail/shims/fs/write_to_stdin.rs | 2 -- tests/fail/shims/sync/libc_pthread_cond_double_destroy.rs | 1 - tests/fail/shims/sync/libc_pthread_condattr_double_destroy.rs | 1 - tests/fail/shims/sync/libc_pthread_mutex_NULL_deadlock.rs | 2 -- tests/fail/shims/sync/libc_pthread_mutex_deadlock.rs | 2 -- tests/fail/shims/sync/libc_pthread_mutex_default_deadlock.rs | 2 -- tests/fail/shims/sync/libc_pthread_mutex_destroy_locked.rs | 2 -- tests/fail/shims/sync/libc_pthread_mutex_double_destroy.rs | 1 - tests/fail/shims/sync/libc_pthread_mutex_normal_deadlock.rs | 2 -- .../shims/sync/libc_pthread_mutex_normal_unlock_unlocked.rs | 2 -- tests/fail/shims/sync/libc_pthread_mutex_wrong_owner.rs | 2 -- tests/fail/shims/sync/libc_pthread_mutexattr_double_destroy.rs | 1 - .../fail/shims/sync/libc_pthread_rwlock_destroy_read_locked.rs | 2 -- .../fail/shims/sync/libc_pthread_rwlock_destroy_write_locked.rs | 2 -- tests/fail/shims/sync/libc_pthread_rwlock_double_destroy.rs | 1 - .../libc_pthread_rwlock_read_write_deadlock_single_thread.rs | 2 -- tests/fail/shims/sync/libc_pthread_rwlock_read_wrong_owner.rs | 2 -- tests/fail/shims/sync/libc_pthread_rwlock_unlock_unlocked.rs | 2 -- .../fail/shims/sync/libc_pthread_rwlock_write_read_deadlock.rs | 2 -- .../libc_pthread_rwlock_write_read_deadlock_single_thread.rs | 2 -- .../fail/shims/sync/libc_pthread_rwlock_write_write_deadlock.rs | 2 -- .../libc_pthread_rwlock_write_write_deadlock_single_thread.rs | 2 -- tests/fail/shims/sync/libc_pthread_rwlock_write_wrong_owner.rs | 2 -- tests/fail/unsupported_signal.rs | 1 - tests/panic/unsupported_syscall.rs | 1 - tests/pass/calloc.rs | 2 -- tests/pass/concurrency/libc_pthread_cond.rs | 2 -- tests/pass/concurrency/linux-futex.rs | 2 -- tests/pass/concurrency/tls_pthread_drop_order.rs | 2 -- tests/pass/foreign-fn-linkname.rs | 1 - tests/pass/malloc.rs | 2 -- tests/pass/regions-mock-trans.rs | 2 -- tests/pass/shims/fs.rs | 1 - tests/pass/shims/fs_with_isolation.rs | 2 -- tests/pass/shims/linux-getrandom-without-isolation.rs | 1 - tests/pass/shims/linux-getrandom.rs | 1 - tests/pass/shims/posix_memalign.rs | 1 - 51 files changed, 1 insertion(+), 89 deletions(-) diff --git a/tests/fail/concurrency/libc_pthread_create_main_terminate.rs b/tests/fail/concurrency/libc_pthread_create_main_terminate.rs index 9da9fbf2029d..065ad2d725f8 100644 --- a/tests/fail/concurrency/libc_pthread_create_main_terminate.rs +++ b/tests/fail/concurrency/libc_pthread_create_main_terminate.rs @@ -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 { diff --git a/tests/fail/concurrency/libc_pthread_join_detached.rs b/tests/fail/concurrency/libc_pthread_join_detached.rs index e81978fc9953..488b14bbcfa8 100644 --- a/tests/fail/concurrency/libc_pthread_join_detached.rs +++ b/tests/fail/concurrency/libc_pthread_join_detached.rs @@ -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 { diff --git a/tests/fail/concurrency/libc_pthread_join_joined.rs b/tests/fail/concurrency/libc_pthread_join_joined.rs index 11e00429c6ce..ebd1710bbf22 100644 --- a/tests/fail/concurrency/libc_pthread_join_joined.rs +++ b/tests/fail/concurrency/libc_pthread_join_joined.rs @@ -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 { diff --git a/tests/fail/concurrency/libc_pthread_join_main.rs b/tests/fail/concurrency/libc_pthread_join_main.rs index f029f08772f2..df6b520431b6 100644 --- a/tests/fail/concurrency/libc_pthread_join_main.rs +++ b/tests/fail/concurrency/libc_pthread_join_main.rs @@ -2,8 +2,6 @@ // Joining the main thread is undefined behavior. -#![feature(rustc_private)] - use std::{ptr, thread}; fn main() { diff --git a/tests/fail/concurrency/libc_pthread_join_multiple.rs b/tests/fail/concurrency/libc_pthread_join_multiple.rs index 017036ab01e1..e5187093befd 100644 --- a/tests/fail/concurrency/libc_pthread_join_multiple.rs +++ b/tests/fail/concurrency/libc_pthread_join_multiple.rs @@ -2,8 +2,6 @@ // Joining the same thread from multiple threads is undefined behavior. -#![feature(rustc_private)] - use std::thread; use std::{mem, ptr}; diff --git a/tests/fail/concurrency/libc_pthread_join_self.rs b/tests/fail/concurrency/libc_pthread_join_self.rs index ae6148893173..0c25c690f372 100644 --- a/tests/fail/concurrency/libc_pthread_join_self.rs +++ b/tests/fail/concurrency/libc_pthread_join_self.rs @@ -4,8 +4,6 @@ // Joining itself is undefined behavior. -#![feature(rustc_private)] - use std::{ptr, thread}; fn main() { diff --git a/tests/fail/concurrency/too_few_args.rs b/tests/fail/concurrency/too_few_args.rs index 4760fbb6b051..43c7c74d410f 100644 --- a/tests/fail/concurrency/too_few_args.rs +++ b/tests/fail/concurrency/too_few_args.rs @@ -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 { diff --git a/tests/fail/concurrency/too_many_args.rs b/tests/fail/concurrency/too_many_args.rs index 6abe767dc8a7..d660037ca669 100644 --- a/tests/fail/concurrency/too_many_args.rs +++ b/tests/fail/concurrency/too_many_args.rs @@ -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 { diff --git a/tests/fail/concurrency/unwind_top_of_stack.rs b/tests/fail/concurrency/unwind_top_of_stack.rs index bd49401e61f5..c2b9d56e19c9 100644 --- a/tests/fail/concurrency/unwind_top_of_stack.rs +++ b/tests/fail/concurrency/unwind_top_of_stack.rs @@ -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}; diff --git a/tests/fail/shims/fs/close_stdout.rs b/tests/fail/shims/fs/close_stdout.rs index e4eab5fd6964..09da8509af41 100644 --- a/tests/fail/shims/fs/close_stdout.rs +++ b/tests/fail/shims/fs/close_stdout.rs @@ -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 diff --git a/tests/fail/shims/fs/isolated_stdin.rs b/tests/fail/shims/fs/isolated_stdin.rs index 86b04a038354..a45f805696d4 100644 --- a/tests/fail/shims/fs/isolated_stdin.rs +++ b/tests/fail/shims/fs/isolated_stdin.rs @@ -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 { diff --git a/tests/fail/shims/fs/mkstemp_immutable_arg.rs b/tests/fail/shims/fs/mkstemp_immutable_arg.rs index 5be1fb394b90..ba9f404d7c9a 100644 --- a/tests/fail/shims/fs/mkstemp_immutable_arg.rs +++ b/tests/fail/shims/fs/mkstemp_immutable_arg.rs @@ -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(); } diff --git a/tests/fail/shims/fs/read_from_stdout.rs b/tests/fail/shims/fs/read_from_stdout.rs index 0fd8ba2fc419..073fca4712e9 100644 --- a/tests/fail/shims/fs/read_from_stdout.rs +++ b/tests/fail/shims/fs/read_from_stdout.rs @@ -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 { diff --git a/tests/fail/shims/fs/unix_open_missing_required_mode.rs b/tests/fail/shims/fs/unix_open_missing_required_mode.rs index 4740dcebe920..ae231d4be667 100644 --- a/tests/fail/shims/fs/unix_open_missing_required_mode.rs +++ b/tests/fail/shims/fs/unix_open_missing_required_mode.rs @@ -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(); } diff --git a/tests/fail/shims/fs/write_to_stdin.rs b/tests/fail/shims/fs/write_to_stdin.rs index 0e9109fc6e23..d039ad718d33 100644 --- a/tests/fail/shims/fs/write_to_stdin.rs +++ b/tests/fail/shims/fs/write_to_stdin.rs @@ -1,7 +1,5 @@ //@ignore-target-windows: No libc on Windows -#![feature(rustc_private)] - fn main() -> std::io::Result<()> { let bytes = b"hello"; unsafe { diff --git a/tests/fail/shims/sync/libc_pthread_cond_double_destroy.rs b/tests/fail/shims/sync/libc_pthread_cond_double_destroy.rs index 90d5997f8712..94ca3496ed94 100644 --- a/tests/fail/shims/sync/libc_pthread_cond_double_destroy.rs +++ b/tests/fail/shims/sync/libc_pthread_cond_double_destroy.rs @@ -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 diff --git a/tests/fail/shims/sync/libc_pthread_condattr_double_destroy.rs b/tests/fail/shims/sync/libc_pthread_condattr_double_destroy.rs index 028a924196f2..13e639a867dc 100644 --- a/tests/fail/shims/sync/libc_pthread_condattr_double_destroy.rs +++ b/tests/fail/shims/sync/libc_pthread_condattr_double_destroy.rs @@ -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 diff --git a/tests/fail/shims/sync/libc_pthread_mutex_NULL_deadlock.rs b/tests/fail/shims/sync/libc_pthread_mutex_NULL_deadlock.rs index d87455877abc..8b2510733831 100644 --- a/tests/fail/shims/sync/libc_pthread_mutex_NULL_deadlock.rs +++ b/tests/fail/shims/sync/libc_pthread_mutex_NULL_deadlock.rs @@ -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(); diff --git a/tests/fail/shims/sync/libc_pthread_mutex_deadlock.rs b/tests/fail/shims/sync/libc_pthread_mutex_deadlock.rs index f77f5c2e2022..6c3cb738e299 100644 --- a/tests/fail/shims/sync/libc_pthread_mutex_deadlock.rs +++ b/tests/fail/shims/sync/libc_pthread_mutex_deadlock.rs @@ -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; diff --git a/tests/fail/shims/sync/libc_pthread_mutex_default_deadlock.rs b/tests/fail/shims/sync/libc_pthread_mutex_default_deadlock.rs index b28101e20b24..f443768819f9 100644 --- a/tests/fail/shims/sync/libc_pthread_mutex_default_deadlock.rs +++ b/tests/fail/shims/sync/libc_pthread_mutex_default_deadlock.rs @@ -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(); diff --git a/tests/fail/shims/sync/libc_pthread_mutex_destroy_locked.rs b/tests/fail/shims/sync/libc_pthread_mutex_destroy_locked.rs index 0f74446fa27e..ec3965c7574e 100644 --- a/tests/fail/shims/sync/libc_pthread_mutex_destroy_locked.rs +++ b/tests/fail/shims/sync/libc_pthread_mutex_destroy_locked.rs @@ -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(); diff --git a/tests/fail/shims/sync/libc_pthread_mutex_double_destroy.rs b/tests/fail/shims/sync/libc_pthread_mutex_double_destroy.rs index 89022f3b5625..622c3eaeae30 100644 --- a/tests/fail/shims/sync/libc_pthread_mutex_double_destroy.rs +++ b/tests/fail/shims/sync/libc_pthread_mutex_double_destroy.rs @@ -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 diff --git a/tests/fail/shims/sync/libc_pthread_mutex_normal_deadlock.rs b/tests/fail/shims/sync/libc_pthread_mutex_normal_deadlock.rs index ab6d9c7739d7..5ea09fa5aac3 100644 --- a/tests/fail/shims/sync/libc_pthread_mutex_normal_deadlock.rs +++ b/tests/fail/shims/sync/libc_pthread_mutex_normal_deadlock.rs @@ -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(); diff --git a/tests/fail/shims/sync/libc_pthread_mutex_normal_unlock_unlocked.rs b/tests/fail/shims/sync/libc_pthread_mutex_normal_unlock_unlocked.rs index f259a4dee7d8..8ce7542edb87 100644 --- a/tests/fail/shims/sync/libc_pthread_mutex_normal_unlock_unlocked.rs +++ b/tests/fail/shims/sync/libc_pthread_mutex_normal_unlock_unlocked.rs @@ -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(); diff --git a/tests/fail/shims/sync/libc_pthread_mutex_wrong_owner.rs b/tests/fail/shims/sync/libc_pthread_mutex_wrong_owner.rs index b8e57f8f74e9..b56775252e4b 100644 --- a/tests/fail/shims/sync/libc_pthread_mutex_wrong_owner.rs +++ b/tests/fail/shims/sync/libc_pthread_mutex_wrong_owner.rs @@ -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; diff --git a/tests/fail/shims/sync/libc_pthread_mutexattr_double_destroy.rs b/tests/fail/shims/sync/libc_pthread_mutexattr_double_destroy.rs index ac6292570e49..474a277516d9 100644 --- a/tests/fail/shims/sync/libc_pthread_mutexattr_double_destroy.rs +++ b/tests/fail/shims/sync/libc_pthread_mutexattr_double_destroy.rs @@ -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 diff --git a/tests/fail/shims/sync/libc_pthread_rwlock_destroy_read_locked.rs b/tests/fail/shims/sync/libc_pthread_rwlock_destroy_read_locked.rs index ae7c1bbde72a..603580ff58ab 100644 --- a/tests/fail/shims/sync/libc_pthread_rwlock_destroy_read_locked.rs +++ b/tests/fail/shims/sync/libc_pthread_rwlock_destroy_read_locked.rs @@ -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 { diff --git a/tests/fail/shims/sync/libc_pthread_rwlock_destroy_write_locked.rs b/tests/fail/shims/sync/libc_pthread_rwlock_destroy_write_locked.rs index 9642595ca4e0..ae44f22d146c 100644 --- a/tests/fail/shims/sync/libc_pthread_rwlock_destroy_write_locked.rs +++ b/tests/fail/shims/sync/libc_pthread_rwlock_destroy_write_locked.rs @@ -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 { diff --git a/tests/fail/shims/sync/libc_pthread_rwlock_double_destroy.rs b/tests/fail/shims/sync/libc_pthread_rwlock_double_destroy.rs index 81b1661ce8d4..800986f7506c 100644 --- a/tests/fail/shims/sync/libc_pthread_rwlock_double_destroy.rs +++ b/tests/fail/shims/sync/libc_pthread_rwlock_double_destroy.rs @@ -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 diff --git a/tests/fail/shims/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.rs b/tests/fail/shims/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.rs index 158dd8c1cda3..782c95b6d2e3 100644 --- a/tests/fail/shims/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.rs +++ b/tests/fail/shims/sync/libc_pthread_rwlock_read_write_deadlock_single_thread.rs @@ -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 { diff --git a/tests/fail/shims/sync/libc_pthread_rwlock_read_wrong_owner.rs b/tests/fail/shims/sync/libc_pthread_rwlock_read_wrong_owner.rs index 23dda68c6a42..1b498ad8fcdb 100644 --- a/tests/fail/shims/sync/libc_pthread_rwlock_read_wrong_owner.rs +++ b/tests/fail/shims/sync/libc_pthread_rwlock_read_wrong_owner.rs @@ -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; diff --git a/tests/fail/shims/sync/libc_pthread_rwlock_unlock_unlocked.rs b/tests/fail/shims/sync/libc_pthread_rwlock_unlock_unlocked.rs index fdcf8e41d36f..05f7e7a06c57 100644 --- a/tests/fail/shims/sync/libc_pthread_rwlock_unlock_unlocked.rs +++ b/tests/fail/shims/sync/libc_pthread_rwlock_unlock_unlocked.rs @@ -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 { diff --git a/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock.rs b/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock.rs index adbb95fc28e8..201844615e18 100644 --- a/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock.rs +++ b/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock.rs @@ -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; diff --git a/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.rs b/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.rs index a7d16caa7a49..538f14ef89f2 100644 --- a/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.rs +++ b/tests/fail/shims/sync/libc_pthread_rwlock_write_read_deadlock_single_thread.rs @@ -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 { diff --git a/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock.rs b/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock.rs index 070373255d32..b1d7e0492e5a 100644 --- a/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock.rs +++ b/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock.rs @@ -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; diff --git a/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.rs b/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.rs index 867c6272c463..2c963d36510e 100644 --- a/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.rs +++ b/tests/fail/shims/sync/libc_pthread_rwlock_write_write_deadlock_single_thread.rs @@ -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 { diff --git a/tests/fail/shims/sync/libc_pthread_rwlock_write_wrong_owner.rs b/tests/fail/shims/sync/libc_pthread_rwlock_write_wrong_owner.rs index cff2a7a2e98c..dd099474d8fe 100644 --- a/tests/fail/shims/sync/libc_pthread_rwlock_write_wrong_owner.rs +++ b/tests/fail/shims/sync/libc_pthread_rwlock_write_wrong_owner.rs @@ -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; diff --git a/tests/fail/unsupported_signal.rs b/tests/fail/unsupported_signal.rs index 20ebcc9bc473..d50041ffbd9d 100644 --- a/tests/fail/unsupported_signal.rs +++ b/tests/fail/unsupported_signal.rs @@ -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 { diff --git a/tests/panic/unsupported_syscall.rs b/tests/panic/unsupported_syscall.rs index 27595bf1071f..31d666e1d9d8 100644 --- a/tests/panic/unsupported_syscall.rs +++ b/tests/panic/unsupported_syscall.rs @@ -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 { diff --git a/tests/pass/calloc.rs b/tests/pass/calloc.rs index e155d53ce812..62ab63c5fc78 100644 --- a/tests/pass/calloc.rs +++ b/tests/pass/calloc.rs @@ -1,7 +1,5 @@ //@ignore-target-windows: No libc on Windows -#![feature(rustc_private)] - use core::slice; fn main() { diff --git a/tests/pass/concurrency/libc_pthread_cond.rs b/tests/pass/concurrency/libc_pthread_cond.rs index c5b0e86666a0..b0325f7d78e5 100644 --- a/tests/pass/concurrency/libc_pthread_cond.rs +++ b/tests/pass/concurrency/libc_pthread_cond.rs @@ -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; diff --git a/tests/pass/concurrency/linux-futex.rs b/tests/pass/concurrency/linux-futex.rs index 2c99bfa1000c..a456528ec207 100644 --- a/tests/pass/concurrency/linux-futex.rs +++ b/tests/pass/concurrency/linux-futex.rs @@ -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; diff --git a/tests/pass/concurrency/tls_pthread_drop_order.rs b/tests/pass/concurrency/tls_pthread_drop_order.rs index 1ccc57da25fa..6200233c8119 100644 --- a/tests/pass/concurrency/tls_pthread_drop_order.rs +++ b/tests/pass/concurrency/tls_pthread_drop_order.rs @@ -1,7 +1,5 @@ //@ignore-target-windows: No libc on Windows -#![feature(rustc_private)] - use std::mem; use std::ptr; diff --git a/tests/pass/foreign-fn-linkname.rs b/tests/pass/foreign-fn-linkname.rs index 40aeb2ef6313..c1cb028f55da 100644 --- a/tests/pass/foreign-fn-linkname.rs +++ b/tests/pass/foreign-fn-linkname.rs @@ -1,5 +1,4 @@ //ignore-windows: Uses POSIX APIs -#![feature(rustc_private)] use std::ffi::CString; diff --git a/tests/pass/malloc.rs b/tests/pass/malloc.rs index 9066e2af25fa..f5e014c000d1 100644 --- a/tests/pass/malloc.rs +++ b/tests/pass/malloc.rs @@ -1,7 +1,5 @@ //@ignore-target-windows: No libc on Windows -#![feature(rustc_private)] - use core::{ptr, slice}; fn main() { diff --git a/tests/pass/regions-mock-trans.rs b/tests/pass/regions-mock-trans.rs index 7432ea958261..caaf48c2bec7 100644 --- a/tests/pass/regions-mock-trans.rs +++ b/tests/pass/regions-mock-trans.rs @@ -1,7 +1,5 @@ //ignore-windows: Uses POSIX APIs -#![feature(rustc_private)] - use std::mem; struct Arena(()); diff --git a/tests/pass/shims/fs.rs b/tests/pass/shims/fs.rs index af9f854ce527..9faced029161 100644 --- a/tests/pass/shims/fs.rs +++ b/tests/pass/shims/fs.rs @@ -1,7 +1,6 @@ //@ignore-target-windows: File handling is not implemented yet //@compile-flags: -Zmiri-disable-isolation -#![feature(rustc_private)] #![feature(io_error_more)] #![feature(io_error_uncategorized)] diff --git a/tests/pass/shims/fs_with_isolation.rs b/tests/pass/shims/fs_with_isolation.rs index f73e64ad17a2..f5420dbc5538 100644 --- a/tests/pass/shims/fs_with_isolation.rs +++ b/tests/pass/shims/fs_with_isolation.rs @@ -2,8 +2,6 @@ //@compile-flags: -Zmiri-isolation-error=warn-nobacktrace //@normalize-stderr-test: "(stat(x)?)" -> "$$STAT" -#![feature(rustc_private)] - use std::ffi::CString; use std::fs::{self, File}; use std::io::{Error, ErrorKind}; diff --git a/tests/pass/shims/linux-getrandom-without-isolation.rs b/tests/pass/shims/linux-getrandom-without-isolation.rs index 12b42552bd5d..349b447569a4 100644 --- a/tests/pass/shims/linux-getrandom-without-isolation.rs +++ b/tests/pass/shims/linux-getrandom-without-isolation.rs @@ -1,6 +1,5 @@ //@only-target-linux //@compile-flags: -Zmiri-disable-isolation -#![feature(rustc_private)] use std::ptr; diff --git a/tests/pass/shims/linux-getrandom.rs b/tests/pass/shims/linux-getrandom.rs index e3309f480d36..a1436c7319d3 100644 --- a/tests/pass/shims/linux-getrandom.rs +++ b/tests/pass/shims/linux-getrandom.rs @@ -1,5 +1,4 @@ //@only-target-linux -#![feature(rustc_private)] use std::ptr; diff --git a/tests/pass/shims/posix_memalign.rs b/tests/pass/shims/posix_memalign.rs index 5dadb62436d6..9bd8a00d68dc 100644 --- a/tests/pass/shims/posix_memalign.rs +++ b/tests/pass/shims/posix_memalign.rs @@ -1,6 +1,5 @@ //@ignore-target-windows: No libc on Windows -#![feature(rustc_private)] #![feature(pointer_is_aligned)] #![feature(strict_provenance)] From ed41f1c96980ed26512e10e39406d8c91033a9e7 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 17 Aug 2022 22:00:54 -0400 Subject: [PATCH 4/4] remove some leftover //ignore that did not do anything --- tests/pass/foreign-fn-linkname.rs | 2 -- tests/pass/regions-mock-trans.rs | 2 -- 2 files changed, 4 deletions(-) diff --git a/tests/pass/foreign-fn-linkname.rs b/tests/pass/foreign-fn-linkname.rs index c1cb028f55da..9f090a4eff5d 100644 --- a/tests/pass/foreign-fn-linkname.rs +++ b/tests/pass/foreign-fn-linkname.rs @@ -1,5 +1,3 @@ -//ignore-windows: Uses POSIX APIs - use std::ffi::CString; mod mlibc { diff --git a/tests/pass/regions-mock-trans.rs b/tests/pass/regions-mock-trans.rs index caaf48c2bec7..57f1b75f4d52 100644 --- a/tests/pass/regions-mock-trans.rs +++ b/tests/pass/regions-mock-trans.rs @@ -1,5 +1,3 @@ -//ignore-windows: Uses POSIX APIs - use std::mem; struct Arena(());