Ignore lots and lots of std tests on emscripten
This commit is contained in:
parent
fcd3279f36
commit
9c4a01ee9e
28 changed files with 255 additions and 0 deletions
|
@ -1000,6 +1000,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn manually_share_arc() {
|
||||
let v = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
||||
let arc_v = Arc::new(v);
|
||||
|
|
|
@ -1294,6 +1294,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_send() {
|
||||
let n = list_from(&[1, 2, 3]);
|
||||
thread::spawn(move || {
|
||||
|
|
|
@ -1116,6 +1116,7 @@ fn test_box_slice_clone() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_box_slice_clone_panics() {
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
|
|
@ -1033,6 +1033,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_var_big() {
|
||||
let mut s = "".to_string();
|
||||
let mut i = 0;
|
||||
|
@ -1046,6 +1047,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_self_exe_path() {
|
||||
let path = current_exe();
|
||||
assert!(path.is_ok());
|
||||
|
@ -1056,6 +1058,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_env_set_get_huge() {
|
||||
let n = make_rand_name();
|
||||
let s = repeat("x").take(10000).collect::<String>();
|
||||
|
|
|
@ -1745,6 +1745,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn file_test_io_smoke_test() {
|
||||
let message = "it's alright. have a good time";
|
||||
let tmpdir = tmpdir();
|
||||
|
@ -1766,6 +1767,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn invalid_path_raises() {
|
||||
let tmpdir = tmpdir();
|
||||
let filename = &tmpdir.join("file_that_does_not_exist.txt");
|
||||
|
@ -1780,6 +1782,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn file_test_iounlinking_invalid_path_should_raise_condition() {
|
||||
let tmpdir = tmpdir();
|
||||
let filename = &tmpdir.join("file_another_file_that_does_not_exist.txt");
|
||||
|
@ -1795,6 +1798,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn file_test_io_non_positional_read() {
|
||||
let message: &str = "ten-four";
|
||||
let mut read_mem = [0; 8];
|
||||
|
@ -1821,6 +1825,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn file_test_io_seek_and_tell_smoke_test() {
|
||||
let message = "ten-four";
|
||||
let mut read_mem = [0; 4];
|
||||
|
@ -1848,6 +1853,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn file_test_io_seek_and_write() {
|
||||
let initial_msg = "food-is-yummy";
|
||||
let overwrite_msg = "-the-bar!!";
|
||||
|
@ -1872,6 +1878,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn file_test_io_seek_shakedown() {
|
||||
// 01234567890123
|
||||
let initial_msg = "qwer-asdf-zxcv";
|
||||
|
@ -1904,6 +1911,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn file_test_stat_is_correct_on_is_file() {
|
||||
let tmpdir = tmpdir();
|
||||
let filename = &tmpdir.join("file_stat_correct_on_is_file.txt");
|
||||
|
@ -1925,6 +1933,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn file_test_stat_is_correct_on_is_dir() {
|
||||
let tmpdir = tmpdir();
|
||||
let filename = &tmpdir.join("file_stat_correct_on_is_dir");
|
||||
|
@ -1937,6 +1946,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn file_test_fileinfo_false_when_checking_is_file_on_a_directory() {
|
||||
let tmpdir = tmpdir();
|
||||
let dir = &tmpdir.join("fileinfo_false_on_dir");
|
||||
|
@ -1946,6 +1956,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn file_test_fileinfo_check_exists_before_and_after_file_creation() {
|
||||
let tmpdir = tmpdir();
|
||||
let file = &tmpdir.join("fileinfo_check_exists_b_and_a.txt");
|
||||
|
@ -1956,6 +1967,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn file_test_directoryinfo_check_exists_before_and_after_mkdir() {
|
||||
let tmpdir = tmpdir();
|
||||
let dir = &tmpdir.join("before_and_after_dir");
|
||||
|
@ -1968,6 +1980,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn file_test_directoryinfo_readdir() {
|
||||
let tmpdir = tmpdir();
|
||||
let dir = &tmpdir.join("di_readdir");
|
||||
|
@ -1997,6 +2010,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn file_create_new_already_exists_error() {
|
||||
let tmpdir = tmpdir();
|
||||
let file = &tmpdir.join("file_create_new_error_exists");
|
||||
|
@ -2006,6 +2020,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn mkdir_path_already_exists_error() {
|
||||
let tmpdir = tmpdir();
|
||||
let dir = &tmpdir.join("mkdir_error_twice");
|
||||
|
@ -2015,6 +2030,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn recursive_mkdir() {
|
||||
let tmpdir = tmpdir();
|
||||
let dir = tmpdir.join("d1/d2");
|
||||
|
@ -2023,6 +2039,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn recursive_mkdir_failure() {
|
||||
let tmpdir = tmpdir();
|
||||
let dir = tmpdir.join("d1");
|
||||
|
@ -2037,11 +2054,13 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn recursive_mkdir_slash() {
|
||||
check!(fs::create_dir_all(&Path::new("/")));
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn recursive_rmdir() {
|
||||
let tmpdir = tmpdir();
|
||||
let d1 = tmpdir.join("d1");
|
||||
|
@ -2061,6 +2080,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn recursive_rmdir_of_symlink() {
|
||||
// test we do not recursively delete a symlink but only dirs.
|
||||
let tmpdir = tmpdir();
|
||||
|
@ -2094,6 +2114,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn unicode_path_is_dir() {
|
||||
assert!(Path::new(".").is_dir());
|
||||
assert!(!Path::new("test/stdtest/fs.rs").is_dir());
|
||||
|
@ -2113,6 +2134,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn unicode_path_exists() {
|
||||
assert!(Path::new(".").exists());
|
||||
assert!(!Path::new("test/nonexistent-bogus-path").exists());
|
||||
|
@ -2126,6 +2148,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn copy_file_does_not_exist() {
|
||||
let from = Path::new("test/nonexistent-bogus-path");
|
||||
let to = Path::new("test/other-bogus-path");
|
||||
|
@ -2140,6 +2163,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn copy_src_does_not_exist() {
|
||||
let tmpdir = tmpdir();
|
||||
let from = Path::new("test/nonexistent-bogus-path");
|
||||
|
@ -2153,6 +2177,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn copy_file_ok() {
|
||||
let tmpdir = tmpdir();
|
||||
let input = tmpdir.join("in.txt");
|
||||
|
@ -2169,6 +2194,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn copy_file_dst_dir() {
|
||||
let tmpdir = tmpdir();
|
||||
let out = tmpdir.join("out");
|
||||
|
@ -2180,6 +2206,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn copy_file_dst_exists() {
|
||||
let tmpdir = tmpdir();
|
||||
let input = tmpdir.join("in");
|
||||
|
@ -2195,6 +2222,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn copy_file_src_dir() {
|
||||
let tmpdir = tmpdir();
|
||||
let out = tmpdir.join("out");
|
||||
|
@ -2206,6 +2234,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn copy_file_preserves_perm_bits() {
|
||||
let tmpdir = tmpdir();
|
||||
let input = tmpdir.join("in.txt");
|
||||
|
@ -2234,6 +2263,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn symlinks_work() {
|
||||
let tmpdir = tmpdir();
|
||||
if !got_symlink_permission(&tmpdir) { return };
|
||||
|
@ -2252,6 +2282,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn symlink_noexist() {
|
||||
// Symlinks can point to things that don't exist
|
||||
let tmpdir = tmpdir();
|
||||
|
@ -2265,6 +2296,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn read_link() {
|
||||
if cfg!(windows) {
|
||||
// directory symlink
|
||||
|
@ -2285,6 +2317,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn readlink_not_symlink() {
|
||||
let tmpdir = tmpdir();
|
||||
match fs::read_link(tmpdir.path()) {
|
||||
|
@ -2294,6 +2327,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn links_work() {
|
||||
let tmpdir = tmpdir();
|
||||
let input = tmpdir.join("in.txt");
|
||||
|
@ -2322,6 +2356,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn chmod_works() {
|
||||
let tmpdir = tmpdir();
|
||||
let file = tmpdir.join("in.txt");
|
||||
|
@ -2345,6 +2380,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn sync_doesnt_kill_anything() {
|
||||
let tmpdir = tmpdir();
|
||||
let path = tmpdir.join("in.txt");
|
||||
|
@ -2358,6 +2394,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn truncate_works() {
|
||||
let tmpdir = tmpdir();
|
||||
let path = tmpdir.join("in.txt");
|
||||
|
@ -2392,6 +2429,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn open_flavors() {
|
||||
use fs::OpenOptions as OO;
|
||||
fn c<T: Clone>(t: &T) -> T { t.clone() }
|
||||
|
@ -2511,6 +2549,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn binary_file() {
|
||||
let mut bytes = [0; 1024];
|
||||
StdRng::new().unwrap().fill_bytes(&mut bytes);
|
||||
|
@ -2524,6 +2563,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn file_try_clone() {
|
||||
let tmpdir = tmpdir();
|
||||
|
||||
|
@ -2546,6 +2586,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
#[cfg(not(windows))]
|
||||
fn unlink_readonly() {
|
||||
let tmpdir = tmpdir();
|
||||
|
@ -2558,6 +2599,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn mkdir_trailing_slash() {
|
||||
let tmpdir = tmpdir();
|
||||
let path = tmpdir.join("file");
|
||||
|
@ -2565,6 +2607,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn canonicalize_works_simple() {
|
||||
let tmpdir = tmpdir();
|
||||
let tmpdir = fs::canonicalize(tmpdir.path()).unwrap();
|
||||
|
@ -2574,6 +2617,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn realpath_works() {
|
||||
let tmpdir = tmpdir();
|
||||
if !got_symlink_permission(&tmpdir) { return };
|
||||
|
@ -2599,6 +2643,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn realpath_works_tricky() {
|
||||
let tmpdir = tmpdir();
|
||||
if !got_symlink_permission(&tmpdir) { return };
|
||||
|
@ -2628,6 +2673,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn dir_entry_methods() {
|
||||
let tmpdir = tmpdir();
|
||||
|
||||
|
@ -2662,12 +2708,14 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn read_dir_not_found() {
|
||||
let res = fs::read_dir("/path/that/does/not/exist");
|
||||
assert_eq!(res.err().unwrap().kind(), ErrorKind::NotFound);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn create_dir_all_with_junctions() {
|
||||
let tmpdir = tmpdir();
|
||||
let target = tmpdir.join("target");
|
||||
|
@ -2695,6 +2743,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn metadata_access_times() {
|
||||
let tmpdir = tmpdir();
|
||||
|
||||
|
|
|
@ -1107,6 +1107,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn panic_in_write_doesnt_flush_in_drop() {
|
||||
static WRITES: AtomicUsize = AtomicUsize::new(0);
|
||||
|
||||
|
|
|
@ -1761,6 +1761,7 @@ mod tests {
|
|||
use super::repeat;
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn read_until() {
|
||||
let mut buf = Cursor::new(&b"12"[..]);
|
||||
let mut v = Vec::new();
|
||||
|
@ -1971,6 +1972,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[bench]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn bench_read_to_end(b: &mut test::Bencher) {
|
||||
b.iter(|| {
|
||||
let mut lr = repeat(1).take(10000000);
|
||||
|
|
|
@ -668,6 +668,7 @@ mod tests {
|
|||
use super::*;
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn panic_doesnt_poison() {
|
||||
thread::spawn(|| {
|
||||
let _a = stdin();
|
||||
|
|
|
@ -533,6 +533,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn to_socket_addr_str_u16() {
|
||||
let a = sa4(Ipv4Addr::new(77, 88, 21, 11), 24352);
|
||||
assert_eq!(Ok(vec![a]), tsa(("77.88.21.11", 24352)));
|
||||
|
@ -545,6 +546,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn to_socket_addr_str() {
|
||||
let a = sa4(Ipv4Addr::new(77, 88, 21, 11), 24352);
|
||||
assert_eq!(Ok(vec![a]), tsa("77.88.21.11:24352"));
|
||||
|
@ -559,6 +561,7 @@ mod tests {
|
|||
// FIXME: figure out why this fails on openbsd and bitrig and fix it
|
||||
#[test]
|
||||
#[cfg(not(any(windows, target_os = "openbsd", target_os = "bitrig")))]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn to_socket_addr_str_bad() {
|
||||
assert!(tsa("1200::AB00:1234::2552:7777:1313:34300").is_err());
|
||||
}
|
||||
|
|
|
@ -454,6 +454,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn bind_error() {
|
||||
match TcpListener::bind("1.1.1.1:9999") {
|
||||
Ok(..) => panic!(),
|
||||
|
@ -463,6 +464,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn connect_error() {
|
||||
match TcpStream::connect("0.0.0.0:1") {
|
||||
Ok(..) => panic!(),
|
||||
|
@ -475,6 +477,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn listen_localhost() {
|
||||
let socket_addr = next_test_ip4();
|
||||
let listener = t!(TcpListener::bind(&socket_addr));
|
||||
|
@ -492,6 +495,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn connect_loopback() {
|
||||
each_ip(&mut |addr| {
|
||||
let acceptor = t!(TcpListener::bind(&addr));
|
||||
|
@ -513,6 +517,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn smoke_test() {
|
||||
each_ip(&mut |addr| {
|
||||
let acceptor = t!(TcpListener::bind(&addr));
|
||||
|
@ -533,6 +538,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn read_eof() {
|
||||
each_ip(&mut |addr| {
|
||||
let acceptor = t!(TcpListener::bind(&addr));
|
||||
|
@ -552,6 +558,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn write_close() {
|
||||
each_ip(&mut |addr| {
|
||||
let acceptor = t!(TcpListener::bind(&addr));
|
||||
|
@ -578,6 +585,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn multiple_connect_serial() {
|
||||
each_ip(&mut |addr| {
|
||||
let max = 10;
|
||||
|
@ -600,6 +608,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn multiple_connect_interleaved_greedy_schedule() {
|
||||
const MAX: usize = 10;
|
||||
each_ip(&mut |addr| {
|
||||
|
@ -635,6 +644,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn multiple_connect_interleaved_lazy_schedule() {
|
||||
const MAX: usize = 10;
|
||||
each_ip(&mut |addr| {
|
||||
|
@ -668,6 +678,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn socket_and_peer_name() {
|
||||
each_ip(&mut |addr| {
|
||||
let listener = t!(TcpListener::bind(&addr));
|
||||
|
@ -683,6 +694,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn partial_read() {
|
||||
each_ip(&mut |addr| {
|
||||
let (tx, rx) = channel();
|
||||
|
@ -704,6 +716,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn double_bind() {
|
||||
each_ip(&mut |addr| {
|
||||
let _listener = t!(TcpListener::bind(&addr));
|
||||
|
@ -720,6 +733,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn fast_rebind() {
|
||||
each_ip(&mut |addr| {
|
||||
let acceptor = t!(TcpListener::bind(&addr));
|
||||
|
@ -735,6 +749,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn tcp_clone_smoke() {
|
||||
each_ip(&mut |addr| {
|
||||
let acceptor = t!(TcpListener::bind(&addr));
|
||||
|
@ -766,6 +781,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn tcp_clone_two_read() {
|
||||
each_ip(&mut |addr| {
|
||||
let acceptor = t!(TcpListener::bind(&addr));
|
||||
|
@ -800,6 +816,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn tcp_clone_two_write() {
|
||||
each_ip(&mut |addr| {
|
||||
let acceptor = t!(TcpListener::bind(&addr));
|
||||
|
@ -827,6 +844,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn shutdown_smoke() {
|
||||
each_ip(&mut |addr| {
|
||||
let a = t!(TcpListener::bind(&addr));
|
||||
|
@ -847,6 +865,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn close_readwrite_smoke() {
|
||||
each_ip(&mut |addr| {
|
||||
let a = t!(TcpListener::bind(&addr));
|
||||
|
@ -885,6 +904,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn close_read_wakes_up() {
|
||||
each_ip(&mut |addr| {
|
||||
let a = t!(TcpListener::bind(&addr));
|
||||
|
@ -912,6 +932,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn clone_while_reading() {
|
||||
each_ip(&mut |addr| {
|
||||
let accept = t!(TcpListener::bind(&addr));
|
||||
|
@ -952,6 +973,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn clone_accept_smoke() {
|
||||
each_ip(&mut |addr| {
|
||||
let a = t!(TcpListener::bind(&addr));
|
||||
|
@ -970,6 +992,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn clone_accept_concurrent() {
|
||||
each_ip(&mut |addr| {
|
||||
let a = t!(TcpListener::bind(&addr));
|
||||
|
@ -998,6 +1021,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn debug() {
|
||||
let name = if cfg!(windows) {"socket"} else {"fd"};
|
||||
let socket_addr = next_test_ip4();
|
||||
|
@ -1024,6 +1048,7 @@ mod tests {
|
|||
// no longer has rounding errors.
|
||||
#[cfg_attr(any(target_os = "bitrig", target_os = "netbsd", target_os = "openbsd"), ignore)]
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn timeouts() {
|
||||
let addr = next_test_ip4();
|
||||
let listener = t!(TcpListener::bind(&addr));
|
||||
|
@ -1050,6 +1075,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_read_timeout() {
|
||||
let addr = next_test_ip4();
|
||||
let listener = t!(TcpListener::bind(&addr));
|
||||
|
@ -1066,6 +1092,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_read_with_timeout() {
|
||||
let addr = next_test_ip4();
|
||||
let listener = t!(TcpListener::bind(&addr));
|
||||
|
@ -1088,6 +1115,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn nodelay() {
|
||||
let addr = next_test_ip4();
|
||||
let _listener = t!(TcpListener::bind(&addr));
|
||||
|
@ -1102,6 +1130,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn ttl() {
|
||||
let ttl = 100;
|
||||
|
||||
|
@ -1118,6 +1147,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn set_nonblocking() {
|
||||
let addr = next_test_ip4();
|
||||
let listener = t!(TcpListener::bind(&addr));
|
||||
|
|
|
@ -378,6 +378,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn bind_error() {
|
||||
match UdpSocket::bind("1.1.1.1:9999") {
|
||||
Ok(..) => panic!(),
|
||||
|
@ -388,6 +389,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn socket_smoke_test_ip4() {
|
||||
each_ip(&mut |server_ip, client_ip| {
|
||||
let (tx1, rx1) = channel();
|
||||
|
@ -412,6 +414,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn socket_name_ip4() {
|
||||
each_ip(&mut |addr, _| {
|
||||
let server = t!(UdpSocket::bind(&addr));
|
||||
|
@ -420,6 +423,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn udp_clone_smoke() {
|
||||
each_ip(&mut |addr1, addr2| {
|
||||
let sock1 = t!(UdpSocket::bind(&addr1));
|
||||
|
@ -449,6 +453,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn udp_clone_two_read() {
|
||||
each_ip(&mut |addr1, addr2| {
|
||||
let sock1 = t!(UdpSocket::bind(&addr1));
|
||||
|
@ -481,6 +486,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn udp_clone_two_write() {
|
||||
each_ip(&mut |addr1, addr2| {
|
||||
let sock1 = t!(UdpSocket::bind(&addr1));
|
||||
|
@ -519,6 +525,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn debug() {
|
||||
let name = if cfg!(windows) {"socket"} else {"fd"};
|
||||
let socket_addr = next_test_ip4();
|
||||
|
@ -534,6 +541,7 @@ mod tests {
|
|||
// no longer has rounding errors.
|
||||
#[cfg_attr(any(target_os = "bitrig", target_os = "netbsd", target_os = "openbsd"), ignore)]
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn timeouts() {
|
||||
let addr = next_test_ip4();
|
||||
|
||||
|
@ -558,6 +566,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_read_timeout() {
|
||||
let addr = next_test_ip4();
|
||||
|
||||
|
@ -573,6 +582,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_read_with_timeout() {
|
||||
let addr = next_test_ip4();
|
||||
|
||||
|
@ -592,6 +602,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn connect_send_recv() {
|
||||
let addr = next_test_ip4();
|
||||
|
||||
|
@ -606,6 +617,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn ttl() {
|
||||
let ttl = 100;
|
||||
|
||||
|
@ -618,6 +630,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn set_nonblocking() {
|
||||
let addr = next_test_ip4();
|
||||
|
||||
|
|
|
@ -819,6 +819,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "android", ignore)]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn smoke() {
|
||||
let p = Command::new("true").spawn();
|
||||
assert!(p.is_ok());
|
||||
|
@ -837,6 +838,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "android", ignore)]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn exit_reported_right() {
|
||||
let p = Command::new("false").spawn();
|
||||
assert!(p.is_ok());
|
||||
|
@ -848,6 +850,7 @@ mod tests {
|
|||
#[test]
|
||||
#[cfg(unix)]
|
||||
#[cfg_attr(target_os = "android", ignore)]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn signal_reported_right() {
|
||||
use os::unix::process::ExitStatusExt;
|
||||
|
||||
|
@ -876,6 +879,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "android", ignore)]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn stdout_works() {
|
||||
let mut cmd = Command::new("echo");
|
||||
cmd.arg("foobar").stdout(Stdio::piped());
|
||||
|
@ -884,6 +888,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
#[cfg_attr(any(windows, target_os = "android"), ignore)]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn set_current_dir_works() {
|
||||
let mut cmd = Command::new("/bin/sh");
|
||||
cmd.arg("-c").arg("pwd")
|
||||
|
@ -894,6 +899,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
#[cfg_attr(any(windows, target_os = "android"), ignore)]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn stdin_works() {
|
||||
let mut p = Command::new("/bin/sh")
|
||||
.arg("-c").arg("read line; echo $line")
|
||||
|
@ -912,6 +918,7 @@ mod tests {
|
|||
#[test]
|
||||
#[cfg_attr(target_os = "android", ignore)]
|
||||
#[cfg(unix)]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn uid_works() {
|
||||
use os::unix::prelude::*;
|
||||
use libc;
|
||||
|
@ -938,6 +945,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "android", ignore)]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_process_status() {
|
||||
let mut status = Command::new("false").status().unwrap();
|
||||
assert!(status.code() == Some(1));
|
||||
|
@ -947,6 +955,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_process_output_fail_to_start() {
|
||||
match Command::new("/no-binary-by-this-name-should-exist").output() {
|
||||
Err(e) => assert_eq!(e.kind(), ErrorKind::NotFound),
|
||||
|
@ -956,6 +965,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "android", ignore)]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_process_output_output() {
|
||||
let Output {status, stdout, stderr}
|
||||
= Command::new("echo").arg("hello").output().unwrap();
|
||||
|
@ -968,6 +978,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "android", ignore)]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_process_output_error() {
|
||||
let Output {status, stdout, stderr}
|
||||
= Command::new("mkdir").arg(".").output().unwrap();
|
||||
|
@ -979,6 +990,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "android", ignore)]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_finish_once() {
|
||||
let mut prog = Command::new("false").spawn().unwrap();
|
||||
assert!(prog.wait().unwrap().code() == Some(1));
|
||||
|
@ -986,6 +998,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "android", ignore)]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_finish_twice() {
|
||||
let mut prog = Command::new("false").spawn().unwrap();
|
||||
assert!(prog.wait().unwrap().code() == Some(1));
|
||||
|
@ -994,6 +1007,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "android", ignore)]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_wait_with_output_once() {
|
||||
let prog = Command::new("echo").arg("hello").stdout(Stdio::piped())
|
||||
.spawn().unwrap();
|
||||
|
@ -1024,6 +1038,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_inherit_env() {
|
||||
use env;
|
||||
|
||||
|
@ -1049,6 +1064,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_override_env() {
|
||||
use env;
|
||||
|
||||
|
@ -1069,6 +1085,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_add_to_env() {
|
||||
let result = env_cmd().env("RUN_TEST_NEW_ENV", "123").output().unwrap();
|
||||
let output = String::from_utf8_lossy(&result.stdout).to_string();
|
||||
|
|
|
@ -242,6 +242,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_os_rng_tasks() {
|
||||
|
||||
let mut txs = vec!();
|
||||
|
|
|
@ -118,6 +118,7 @@ mod tests {
|
|||
use thread;
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_barrier() {
|
||||
const N: usize = 10;
|
||||
|
||||
|
|
|
@ -270,6 +270,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn notify_one() {
|
||||
let m = Arc::new(Mutex::new(()));
|
||||
let m2 = m.clone();
|
||||
|
@ -286,6 +287,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn notify_all() {
|
||||
const N: usize = 10;
|
||||
|
||||
|
@ -322,6 +324,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn wait_timeout_ms() {
|
||||
let m = Arc::new(Mutex::new(()));
|
||||
let m2 = m.clone();
|
||||
|
@ -343,6 +346,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn two_mutexes() {
|
||||
let m = Arc::new(Mutex::new(()));
|
||||
let m2 = m.clone();
|
||||
|
|
|
@ -1314,6 +1314,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn smoke_threads() {
|
||||
let (tx, rx) = channel::<i32>();
|
||||
let _t = thread::spawn(move|| {
|
||||
|
@ -1346,6 +1347,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn port_gone_concurrent() {
|
||||
let (tx, rx) = channel::<i32>();
|
||||
let _t = thread::spawn(move|| {
|
||||
|
@ -1355,6 +1357,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn port_gone_concurrent_shared() {
|
||||
let (tx, rx) = channel::<i32>();
|
||||
let tx2 = tx.clone();
|
||||
|
@ -1381,6 +1384,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn chan_gone_concurrent() {
|
||||
let (tx, rx) = channel::<i32>();
|
||||
let _t = thread::spawn(move|| {
|
||||
|
@ -1391,6 +1395,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn stress() {
|
||||
let (tx, rx) = channel::<i32>();
|
||||
let t = thread::spawn(move|| {
|
||||
|
@ -1403,6 +1408,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn stress_shared() {
|
||||
const AMT: u32 = 10000;
|
||||
const NTHREADS: u32 = 8;
|
||||
|
@ -1429,6 +1435,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn send_from_outside_runtime() {
|
||||
let (tx1, rx1) = channel::<()>();
|
||||
let (tx2, rx2) = channel::<i32>();
|
||||
|
@ -1449,6 +1456,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn recv_from_outside_runtime() {
|
||||
let (tx, rx) = channel::<i32>();
|
||||
let t = thread::spawn(move|| {
|
||||
|
@ -1463,6 +1471,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn no_runtime() {
|
||||
let (tx1, rx1) = channel::<i32>();
|
||||
let (tx2, rx2) = channel::<i32>();
|
||||
|
@ -1501,6 +1510,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn oneshot_single_thread_recv_chan_close() {
|
||||
// Receiving on a closed chan will panic
|
||||
let res = thread::spawn(move|| {
|
||||
|
@ -1570,6 +1580,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn oneshot_multi_task_recv_then_send() {
|
||||
let (tx, rx) = channel::<Box<i32>>();
|
||||
let _t = thread::spawn(move|| {
|
||||
|
@ -1580,6 +1591,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn oneshot_multi_task_recv_then_close() {
|
||||
let (tx, rx) = channel::<Box<i32>>();
|
||||
let _t = thread::spawn(move|| {
|
||||
|
@ -1592,6 +1604,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn oneshot_multi_thread_close_stress() {
|
||||
for _ in 0..stress_factor() {
|
||||
let (tx, rx) = channel::<i32>();
|
||||
|
@ -1603,6 +1616,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn oneshot_multi_thread_send_close_stress() {
|
||||
for _ in 0..stress_factor() {
|
||||
let (tx, rx) = channel::<i32>();
|
||||
|
@ -1616,6 +1630,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn oneshot_multi_thread_recv_close_stress() {
|
||||
for _ in 0..stress_factor() {
|
||||
let (tx, rx) = channel::<i32>();
|
||||
|
@ -1634,6 +1649,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn oneshot_multi_thread_send_recv_stress() {
|
||||
for _ in 0..stress_factor() {
|
||||
let (tx, rx) = channel::<Box<isize>>();
|
||||
|
@ -1645,6 +1661,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn stream_send_recv_stress() {
|
||||
for _ in 0..stress_factor() {
|
||||
let (tx, rx) = channel();
|
||||
|
@ -1683,6 +1700,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn stress_recv_timeout_two_threads() {
|
||||
let (tx, rx) = channel();
|
||||
let stress = stress_factor() + 100;
|
||||
|
@ -1724,6 +1742,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn stress_recv_timeout_shared() {
|
||||
let (tx, rx) = channel();
|
||||
let stress = stress_factor() + 100;
|
||||
|
@ -1762,6 +1781,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn shared_recv_timeout() {
|
||||
let (tx, rx) = channel();
|
||||
let total = 5;
|
||||
|
@ -1780,6 +1800,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn shared_chan_stress() {
|
||||
let (tx, rx) = channel();
|
||||
let total = stress_factor() + 100;
|
||||
|
@ -1796,6 +1817,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_nested_recv_iter() {
|
||||
let (tx, rx) = channel::<i32>();
|
||||
let (total_tx, total_rx) = channel::<i32>();
|
||||
|
@ -1816,6 +1838,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_recv_iter_break() {
|
||||
let (tx, rx) = channel::<i32>();
|
||||
let (count_tx, count_rx) = channel();
|
||||
|
@ -1841,6 +1864,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_recv_try_iter() {
|
||||
let (request_tx, request_rx) = channel();
|
||||
let (response_tx, response_rx) = channel();
|
||||
|
@ -1895,6 +1919,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn try_recv_states() {
|
||||
let (tx1, rx1) = channel::<i32>();
|
||||
let (tx2, rx2) = channel::<()>();
|
||||
|
@ -1921,6 +1946,7 @@ mod tests {
|
|||
// This bug used to end up in a livelock inside of the Receiver destructor
|
||||
// because the internal state of the Shared packet was corrupted
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn destroy_upgraded_shared_port_when_sender_still_active() {
|
||||
let (tx, rx) = channel();
|
||||
let (tx2, rx2) = channel();
|
||||
|
@ -1988,6 +2014,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn smoke_threads() {
|
||||
let (tx, rx) = sync_channel::<i32>(0);
|
||||
let _t = thread::spawn(move|| {
|
||||
|
@ -2013,6 +2040,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn port_gone_concurrent() {
|
||||
let (tx, rx) = sync_channel::<i32>(0);
|
||||
let _t = thread::spawn(move|| {
|
||||
|
@ -2022,6 +2050,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn port_gone_concurrent_shared() {
|
||||
let (tx, rx) = sync_channel::<i32>(0);
|
||||
let tx2 = tx.clone();
|
||||
|
@ -2048,6 +2077,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn chan_gone_concurrent() {
|
||||
let (tx, rx) = sync_channel::<i32>(0);
|
||||
thread::spawn(move|| {
|
||||
|
@ -2058,6 +2088,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn stress() {
|
||||
let (tx, rx) = sync_channel::<i32>(0);
|
||||
thread::spawn(move|| {
|
||||
|
@ -2069,6 +2100,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn stress_recv_timeout_two_threads() {
|
||||
let (tx, rx) = sync_channel::<i32>(0);
|
||||
|
||||
|
@ -2092,6 +2124,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn stress_recv_timeout_shared() {
|
||||
const AMT: u32 = 1000;
|
||||
const NTHREADS: u32 = 8;
|
||||
|
@ -2130,6 +2163,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn stress_shared() {
|
||||
const AMT: u32 = 1000;
|
||||
const NTHREADS: u32 = 8;
|
||||
|
@ -2180,6 +2214,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn oneshot_single_thread_recv_chan_close() {
|
||||
// Receiving on a closed chan will panic
|
||||
let res = thread::spawn(move|| {
|
||||
|
@ -2264,6 +2299,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn oneshot_multi_task_recv_then_send() {
|
||||
let (tx, rx) = sync_channel::<Box<i32>>(0);
|
||||
let _t = thread::spawn(move|| {
|
||||
|
@ -2274,6 +2310,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn oneshot_multi_task_recv_then_close() {
|
||||
let (tx, rx) = sync_channel::<Box<i32>>(0);
|
||||
let _t = thread::spawn(move|| {
|
||||
|
@ -2286,6 +2323,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn oneshot_multi_thread_close_stress() {
|
||||
for _ in 0..stress_factor() {
|
||||
let (tx, rx) = sync_channel::<i32>(0);
|
||||
|
@ -2297,6 +2335,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn oneshot_multi_thread_send_close_stress() {
|
||||
for _ in 0..stress_factor() {
|
||||
let (tx, rx) = sync_channel::<i32>(0);
|
||||
|
@ -2310,6 +2349,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn oneshot_multi_thread_recv_close_stress() {
|
||||
for _ in 0..stress_factor() {
|
||||
let (tx, rx) = sync_channel::<i32>(0);
|
||||
|
@ -2328,6 +2368,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn oneshot_multi_thread_send_recv_stress() {
|
||||
for _ in 0..stress_factor() {
|
||||
let (tx, rx) = sync_channel::<Box<i32>>(0);
|
||||
|
@ -2339,6 +2380,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn stream_send_recv_stress() {
|
||||
for _ in 0..stress_factor() {
|
||||
let (tx, rx) = sync_channel::<Box<i32>>(0);
|
||||
|
@ -2375,6 +2417,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn shared_chan_stress() {
|
||||
let (tx, rx) = sync_channel(0);
|
||||
let total = stress_factor() + 100;
|
||||
|
@ -2391,6 +2434,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_nested_recv_iter() {
|
||||
let (tx, rx) = sync_channel::<i32>(0);
|
||||
let (total_tx, total_rx) = sync_channel::<i32>(0);
|
||||
|
@ -2411,6 +2455,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_recv_iter_break() {
|
||||
let (tx, rx) = sync_channel::<i32>(0);
|
||||
let (count_tx, count_rx) = sync_channel(0);
|
||||
|
@ -2436,6 +2481,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn try_recv_states() {
|
||||
let (tx1, rx1) = sync_channel::<i32>(1);
|
||||
let (tx2, rx2) = sync_channel::<()>(1);
|
||||
|
@ -2462,6 +2508,7 @@ mod sync_tests {
|
|||
// This bug used to end up in a livelock inside of the Receiver destructor
|
||||
// because the internal state of the Shared packet was corrupted
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn destroy_upgraded_shared_port_when_sender_still_active() {
|
||||
let (tx, rx) = sync_channel::<()>(0);
|
||||
let (tx2, rx2) = sync_channel::<()>(0);
|
||||
|
@ -2483,6 +2530,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn send1() {
|
||||
let (tx, rx) = sync_channel::<i32>(0);
|
||||
let _t = thread::spawn(move|| { rx.recv().unwrap(); });
|
||||
|
@ -2490,6 +2538,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn send2() {
|
||||
let (tx, rx) = sync_channel::<i32>(0);
|
||||
let _t = thread::spawn(move|| { drop(rx); });
|
||||
|
@ -2497,6 +2546,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn send3() {
|
||||
let (tx, rx) = sync_channel::<i32>(1);
|
||||
assert_eq!(tx.send(1), Ok(()));
|
||||
|
@ -2505,6 +2555,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn send4() {
|
||||
let (tx, rx) = sync_channel::<i32>(0);
|
||||
let tx2 = tx.clone();
|
||||
|
@ -2545,6 +2596,7 @@ mod sync_tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn issue_15761() {
|
||||
fn repro() {
|
||||
let (tx1, rx1) = sync_channel::<()>(3);
|
||||
|
|
|
@ -161,6 +161,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test() {
|
||||
let nthreads = 8;
|
||||
let nmsgs = 1000;
|
||||
|
|
|
@ -444,6 +444,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn unblocks() {
|
||||
let (tx1, rx1) = channel::<i32>();
|
||||
let (_tx2, rx2) = channel::<i32>();
|
||||
|
@ -468,6 +469,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn both_ready() {
|
||||
let (tx1, rx1) = channel::<i32>();
|
||||
let (tx2, rx2) = channel::<i32>();
|
||||
|
@ -494,6 +496,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn stress() {
|
||||
const AMT: i32 = 10000;
|
||||
let (tx1, rx1) = channel::<i32>();
|
||||
|
@ -521,6 +524,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn cloning() {
|
||||
let (tx1, rx1) = channel::<i32>();
|
||||
let (_tx2, rx2) = channel::<i32>();
|
||||
|
@ -543,6 +547,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn cloning2() {
|
||||
let (tx1, rx1) = channel::<i32>();
|
||||
let (_tx2, rx2) = channel::<i32>();
|
||||
|
@ -565,6 +570,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn cloning3() {
|
||||
let (tx1, rx1) = channel::<()>();
|
||||
let (tx2, rx2) = channel::<()>();
|
||||
|
@ -682,6 +688,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn oneshot_data_waiting() {
|
||||
let (tx1, rx1) = channel();
|
||||
let (tx2, rx2) = channel();
|
||||
|
@ -698,6 +705,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn stream_data_waiting() {
|
||||
let (tx1, rx1) = channel();
|
||||
let (tx2, rx2) = channel();
|
||||
|
@ -718,6 +726,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn shared_data_waiting() {
|
||||
let (tx1, rx1) = channel();
|
||||
let (tx2, rx2) = channel();
|
||||
|
@ -746,6 +755,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn sync2() {
|
||||
let (tx, rx) = sync_channel::<i32>(0);
|
||||
let _t = thread::spawn(move|| {
|
||||
|
@ -758,6 +768,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn sync3() {
|
||||
let (tx1, rx1) = sync_channel::<i32>(0);
|
||||
let (tx2, rx2): (Sender<i32>, Receiver<i32>) = channel();
|
||||
|
|
|
@ -305,6 +305,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn stress() {
|
||||
unsafe {
|
||||
stress_bound(0);
|
||||
|
|
|
@ -375,6 +375,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn lots_and_lots() {
|
||||
const J: u32 = 1000;
|
||||
const K: u32 = 3;
|
||||
|
@ -435,6 +436,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_into_inner_poison() {
|
||||
let m = Arc::new(Mutex::new(NonCopy(10)));
|
||||
let m2 = m.clone();
|
||||
|
@ -458,6 +460,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_get_mut_poison() {
|
||||
let m = Arc::new(Mutex::new(NonCopy(10)));
|
||||
let m2 = m.clone();
|
||||
|
@ -474,6 +477,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_mutex_arc_condvar() {
|
||||
let packet = Packet(Arc::new((Mutex::new(false), Condvar::new())));
|
||||
let packet2 = Packet(packet.0.clone());
|
||||
|
@ -497,6 +501,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_arc_condvar_poison() {
|
||||
let packet = Packet(Arc::new((Mutex::new(1), Condvar::new())));
|
||||
let packet2 = Packet(packet.0.clone());
|
||||
|
@ -526,6 +531,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_mutex_arc_poison() {
|
||||
let arc = Arc::new(Mutex::new(1));
|
||||
assert!(!arc.is_poisoned());
|
||||
|
@ -539,6 +545,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_mutex_arc_nested() {
|
||||
// Tests nested mutexes and access
|
||||
// to underlying data.
|
||||
|
@ -555,6 +562,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_mutex_arc_access_in_unwind() {
|
||||
let arc = Arc::new(Mutex::new(1));
|
||||
let arc2 = arc.clone();
|
||||
|
|
|
@ -385,6 +385,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn stampede_once() {
|
||||
static O: Once = Once::new();
|
||||
static mut run: bool = false;
|
||||
|
@ -447,6 +448,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn wait_for_force_to_finish() {
|
||||
static O: Once = Once::new();
|
||||
|
||||
|
|
|
@ -403,6 +403,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn frob() {
|
||||
const N: usize = 10;
|
||||
const M: usize = 1000;
|
||||
|
@ -430,6 +431,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_rw_arc_poison_wr() {
|
||||
let arc = Arc::new(RwLock::new(1));
|
||||
let arc2 = arc.clone();
|
||||
|
@ -441,6 +443,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_rw_arc_poison_ww() {
|
||||
let arc = Arc::new(RwLock::new(1));
|
||||
assert!(!arc.is_poisoned());
|
||||
|
@ -454,6 +457,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_rw_arc_no_poison_rr() {
|
||||
let arc = Arc::new(RwLock::new(1));
|
||||
let arc2 = arc.clone();
|
||||
|
@ -465,6 +469,7 @@ mod tests {
|
|||
assert_eq!(*lock, 1);
|
||||
}
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_rw_arc_no_poison_rw() {
|
||||
let arc = Arc::new(RwLock::new(1));
|
||||
let arc2 = arc.clone();
|
||||
|
@ -477,6 +482,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_rw_arc() {
|
||||
let arc = Arc::new(RwLock::new(0));
|
||||
let arc2 = arc.clone();
|
||||
|
@ -515,6 +521,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_rw_arc_access_in_unwind() {
|
||||
let arc = Arc::new(RwLock::new(1));
|
||||
let arc2 = arc.clone();
|
||||
|
@ -587,6 +594,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_into_inner_poison() {
|
||||
let m = Arc::new(RwLock::new(NonCopy(10)));
|
||||
let m2 = m.clone();
|
||||
|
@ -610,6 +618,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_get_mut_poison() {
|
||||
let m = Arc::new(RwLock::new(NonCopy(10)));
|
||||
let m2 = m.clone();
|
||||
|
|
|
@ -165,6 +165,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[bench]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn bench_uninitialized(b: &mut ::test::Bencher) {
|
||||
b.iter(|| {
|
||||
let mut lr = repeat(1).take(10000000);
|
||||
|
|
|
@ -181,6 +181,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn is_mutex() {
|
||||
let m = Arc::new(ReentrantMutex::new(RefCell::new(0)));
|
||||
let m2 = m.clone();
|
||||
|
@ -198,6 +199,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn trylock_works() {
|
||||
let m = Arc::new(ReentrantMutex::new(()));
|
||||
let m2 = m.clone();
|
||||
|
@ -218,6 +220,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn poison_works() {
|
||||
let m = Arc::new(ReentrantMutex::new(RefCell::new(0)));
|
||||
let mc = m.clone();
|
||||
|
|
|
@ -806,6 +806,7 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn basic() {
|
||||
let dir = tmpdir();
|
||||
let socket_path = dir.path().join("sock");
|
||||
|
@ -834,6 +835,7 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn pair() {
|
||||
let msg1 = b"hello";
|
||||
let msg2 = b"world!";
|
||||
|
@ -857,6 +859,7 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn try_clone() {
|
||||
let dir = tmpdir();
|
||||
let socket_path = dir.path().join("sock");
|
||||
|
@ -883,6 +886,7 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn iter() {
|
||||
let dir = tmpdir();
|
||||
let socket_path = dir.path().join("sock");
|
||||
|
@ -905,6 +909,7 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn long_path() {
|
||||
let dir = tmpdir();
|
||||
let socket_path = dir.path()
|
||||
|
@ -930,6 +935,7 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn timeouts() {
|
||||
let dir = tmpdir();
|
||||
let socket_path = dir.path().join("sock");
|
||||
|
@ -957,6 +963,7 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_read_timeout() {
|
||||
let dir = tmpdir();
|
||||
let socket_path = dir.path().join("sock");
|
||||
|
@ -972,6 +979,7 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_read_with_timeout() {
|
||||
let dir = tmpdir();
|
||||
let socket_path = dir.path().join("sock");
|
||||
|
@ -993,6 +1001,7 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_unix_datagram() {
|
||||
let dir = tmpdir();
|
||||
let path1 = dir.path().join("sock1");
|
||||
|
@ -1009,6 +1018,7 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_unnamed_unix_datagram() {
|
||||
let dir = tmpdir();
|
||||
let path1 = dir.path().join("sock1");
|
||||
|
@ -1026,6 +1036,7 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_connect_unix_datagram() {
|
||||
let dir = tmpdir();
|
||||
let path1 = dir.path().join("sock1");
|
||||
|
@ -1052,6 +1063,7 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_unix_datagram_recv() {
|
||||
let dir = tmpdir();
|
||||
let path1 = dir.path().join("sock1");
|
||||
|
@ -1069,6 +1081,7 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn datagram_pair() {
|
||||
let msg1 = b"hello";
|
||||
let msg2 = b"world!";
|
||||
|
|
|
@ -630,6 +630,7 @@ mod tests {
|
|||
#[test]
|
||||
#[cfg_attr(target_os = "macos", ignore)]
|
||||
#[cfg_attr(target_os = "nacl", ignore)] // no signals on NaCl.
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_process_mask() {
|
||||
unsafe {
|
||||
// Test to make sure that a signal mask does not get inherited.
|
||||
|
|
|
@ -541,6 +541,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn smoke_no_dtor() {
|
||||
thread_local!(static FOO: Cell<i32> = Cell::new(1));
|
||||
|
||||
|
@ -563,6 +564,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn states() {
|
||||
struct Foo;
|
||||
impl Drop for Foo {
|
||||
|
@ -586,6 +588,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn smoke_dtor() {
|
||||
thread_local!(static FOO: UnsafeCell<Option<Foo>> = UnsafeCell::new(None));
|
||||
|
||||
|
@ -600,6 +603,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn circular() {
|
||||
struct S1;
|
||||
struct S2;
|
||||
|
@ -640,6 +644,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn self_referential() {
|
||||
struct S1;
|
||||
thread_local!(static K1: UnsafeCell<Option<S1>> = UnsafeCell::new(None));
|
||||
|
@ -661,6 +666,7 @@ mod tests {
|
|||
// test on OSX.
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "macos", ignore)]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn dtors_in_dtors_in_dtors() {
|
||||
struct S1(Sender<()>);
|
||||
thread_local!(static K1: UnsafeCell<Option<S1>> = UnsafeCell::new(None));
|
||||
|
|
|
@ -755,6 +755,7 @@ mod tests {
|
|||
// !!! instead of exiting cleanly. This might wedge the buildbots. !!!
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_unnamed_thread() {
|
||||
thread::spawn(move|| {
|
||||
assert!(thread::current().name().is_none());
|
||||
|
@ -762,6 +763,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_named_thread() {
|
||||
Builder::new().name("ada lovelace".to_string()).spawn(move|| {
|
||||
assert!(thread::current().name().unwrap() == "ada lovelace".to_string());
|
||||
|
@ -770,11 +772,13 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_invalid_named_thread() {
|
||||
let _ = Builder::new().name("ada l\0velace".to_string()).spawn(|| {});
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_run_basic() {
|
||||
let (tx, rx) = channel();
|
||||
thread::spawn(move|| {
|
||||
|
@ -784,6 +788,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_join_panic() {
|
||||
match thread::spawn(move|| {
|
||||
panic!()
|
||||
|
@ -794,6 +799,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_spawn_sched() {
|
||||
let (tx, rx) = channel();
|
||||
|
||||
|
@ -813,6 +819,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_spawn_sched_childs_on_default_sched() {
|
||||
let (tx, rx) = channel();
|
||||
|
||||
|
@ -841,6 +848,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_avoid_copying_the_body_spawn() {
|
||||
avoid_copying_the_body(|v| {
|
||||
thread::spawn(move || v());
|
||||
|
@ -848,6 +856,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_avoid_copying_the_body_thread_spawn() {
|
||||
avoid_copying_the_body(|f| {
|
||||
thread::spawn(move|| {
|
||||
|
@ -857,6 +866,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_avoid_copying_the_body_join() {
|
||||
avoid_copying_the_body(|f| {
|
||||
let _ = thread::spawn(move|| {
|
||||
|
@ -866,6 +876,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_child_doesnt_ref_parent() {
|
||||
// If the child refcounts the parent thread, this will stack overflow when
|
||||
// climbing the thread tree to dereference each ancestor. (See #1789)
|
||||
|
@ -883,11 +894,13 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_simple_newsched_spawn() {
|
||||
thread::spawn(move || {});
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_try_panic_message_static_str() {
|
||||
match thread::spawn(move|| {
|
||||
panic!("static string");
|
||||
|
@ -902,6 +915,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_try_panic_message_owned_str() {
|
||||
match thread::spawn(move|| {
|
||||
panic!("owned string".to_string());
|
||||
|
@ -916,6 +930,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_try_panic_message_any() {
|
||||
match thread::spawn(move|| {
|
||||
panic!(box 413u16 as Box<Any + Send>);
|
||||
|
@ -932,6 +947,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_try_panic_message_unit_struct() {
|
||||
struct Juju;
|
||||
|
||||
|
@ -944,6 +960,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_park_timeout_unpark_before() {
|
||||
for _ in 0..10 {
|
||||
thread::current().unpark();
|
||||
|
@ -952,6 +969,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_park_timeout_unpark_not_called() {
|
||||
for _ in 0..10 {
|
||||
thread::park_timeout(Duration::from_millis(10));
|
||||
|
@ -959,6 +977,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||
fn test_park_timeout_unpark_called_other_thread() {
|
||||
for _ in 0..10 {
|
||||
let th = thread::current();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue