diff options
| author | bors <bors@rust-lang.org> | 2015-11-10 11:34:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-11-10 11:34:13 +0000 |
| commit | 4afa9d90036b2b092bd277215a1291377ca7d9bf (patch) | |
| tree | af34101e97bc5f408684d7e7b8788b25b0c36a1f /src/test/run-pass | |
| parent | 4b23a0962db486c8a96d673a1b17decc26a26b34 (diff) | |
| parent | 269a8111920b0d5faecd98d94d750608a6c09379 (diff) | |
| download | rust-4afa9d90036b2b092bd277215a1291377ca7d9bf.tar.gz rust-4afa9d90036b2b092bd277215a1291377ca7d9bf.zip | |
Auto merge of #29699 - tamird:valgrind-supp, r=alexcrichton
Quite a bit of cruft in the valgrind suppressions. I started from a clean slate and found a few unique failures; this commit also moves the tests "fixed" by these suppressions into run-pass-valgrind.
Diffstat (limited to 'src/test/run-pass')
| -rw-r--r-- | src/test/run-pass/atomic-print.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/down-with-thread-dtors.rs | 47 | ||||
| -rw-r--r-- | src/test/run-pass/exit-flushes.rs | 25 | ||||
| -rw-r--r-- | src/test/run-pass/osx-frameworks.rs | 29 |
4 files changed, 1 insertions, 102 deletions
diff --git a/src/test/run-pass/atomic-print.rs b/src/test/run-pass/atomic-print.rs index ae0a358ac4e..aa1ef2025a0 100644 --- a/src/test/run-pass/atomic-print.rs +++ b/src/test/run-pass/atomic-print.rs @@ -41,7 +41,7 @@ fn main(){ match line.chars().next().unwrap() { '1' => assert_eq!(line, "11111"), '2' => assert_eq!(line, "22222"), - _ => panic!("Unexpected character") + chr => panic!("unexpected character {:?}", chr) } } } diff --git a/src/test/run-pass/down-with-thread-dtors.rs b/src/test/run-pass/down-with-thread-dtors.rs deleted file mode 100644 index 5c449d511d5..00000000000 --- a/src/test/run-pass/down-with-thread-dtors.rs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -thread_local!(static FOO: Foo = Foo); -thread_local!(static BAR: Bar = Bar(1)); -thread_local!(static BAZ: Baz = Baz); - -static mut HIT: bool = false; - -struct Foo; -struct Bar(i32); -struct Baz; - -impl Drop for Foo { - fn drop(&mut self) { - BAR.with(|_| {}); - } -} - -impl Drop for Bar { - fn drop(&mut self) { - assert_eq!(self.0, 1); - self.0 = 2; - BAZ.with(|_| {}); - assert_eq!(self.0, 2); - } -} - -impl Drop for Baz { - fn drop(&mut self) { - unsafe { HIT = true; } - } -} - -fn main() { - std::thread::spawn(|| { - FOO.with(|_| {}); - }).join().unwrap(); - assert!(unsafe { HIT }); -} diff --git a/src/test/run-pass/exit-flushes.rs b/src/test/run-pass/exit-flushes.rs deleted file mode 100644 index 76ecbfd2f22..00000000000 --- a/src/test/run-pass/exit-flushes.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -use std::env; -use std::process::{exit, Command}; - -fn main() { - if env::args().len() > 1 { - print!("hello!"); - exit(0); - } else { - let out = Command::new(env::args().next().unwrap()).arg("foo") - .output().unwrap(); - assert!(out.status.success()); - assert_eq!(String::from_utf8(out.stdout).unwrap(), "hello!"); - assert_eq!(String::from_utf8(out.stderr).unwrap(), ""); - } -} diff --git a/src/test/run-pass/osx-frameworks.rs b/src/test/run-pass/osx-frameworks.rs deleted file mode 100644 index 41b34dc79bd..00000000000 --- a/src/test/run-pass/osx-frameworks.rs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// pretty-expanded FIXME #23616 - -#![feature(libc)] - -extern crate libc; - -#[cfg(target_os = "macos")] -#[link(name = "CoreFoundation", kind = "framework")] -extern { - fn CFRunLoopGetTypeID() -> libc::c_ulong; -} - -#[cfg(target_os = "macos")] -pub fn main() { - unsafe { CFRunLoopGetTypeID(); } -} - -#[cfg(not(target_os = "macos"))] -pub fn main() {} |
