Skip to content

Commit

Permalink
Make I/O tests use run_in_mt_newsched_task to get more multi-threaded…
Browse files Browse the repository at this point in the history
… test coverage
  • Loading branch information
anasazi committed Sep 6, 2013
1 parent 73bb4de commit 6840076
Show file tree
Hide file tree
Showing 6 changed files with 187 additions and 50 deletions.
14 changes: 7 additions & 7 deletions src/libstd/rt/io/file.rs
Expand Up @@ -146,7 +146,7 @@ impl Seek for FileStream {
}

fn file_test_smoke_test_impl() {
do run_in_newsched_task {
do run_in_mt_newsched_task {
let message = "it's alright. have a good time";
let filename = &Path("./tmp/file_rt_io_file_test.txt");
{
Expand Down Expand Up @@ -174,7 +174,7 @@ fn file_test_io_smoke_test() {
}

fn file_test_invalid_path_opened_without_create_should_raise_condition_impl() {
do run_in_newsched_task {
do run_in_mt_newsched_task {
let filename = &Path("./tmp/file_that_does_not_exist.txt");
let mut called = false;
do io_error::cond.trap(|_| {
Expand All @@ -192,7 +192,7 @@ fn file_test_io_invalid_path_opened_without_create_should_raise_condition() {
}

fn file_test_unlinking_invalid_path_should_raise_condition_impl() {
do run_in_newsched_task {
do run_in_mt_newsched_task {
let filename = &Path("./tmp/file_another_file_that_does_not_exist.txt");
let mut called = false;
do io_error::cond.trap(|_| {
Expand All @@ -209,7 +209,7 @@ fn file_test_iounlinking_invalid_path_should_raise_condition() {
}

fn file_test_io_non_positional_read_impl() {
do run_in_newsched_task {
do run_in_mt_newsched_task {
use str;
let message = "ten-four";
let mut read_mem = [0, .. 8];
Expand Down Expand Up @@ -242,7 +242,7 @@ fn file_test_io_non_positional_read() {
}

fn file_test_io_seeking_impl() {
do run_in_newsched_task {
do run_in_mt_newsched_task {
use str;
let message = "ten-four";
let mut read_mem = [0, .. 4];
Expand Down Expand Up @@ -276,7 +276,7 @@ fn file_test_io_seek_and_tell_smoke_test() {

fn file_test_io_seek_and_write_impl() {
use io;
do run_in_newsched_task {
do run_in_mt_newsched_task {
use str;
let initial_msg = "food-is-yummy";
let overwrite_msg = "-the-bar!!";
Expand Down Expand Up @@ -307,7 +307,7 @@ fn file_test_io_seek_and_write() {
}

fn file_test_io_seek_shakedown_impl() {
do run_in_newsched_task {
do run_in_mt_newsched_task {
use str; // 01234567890123
let initial_msg = "qwer-asdf-zxcv";
let chunk_one = "qwer";
Expand Down

10 comments on commit 6840076

@bors
Copy link
Contributor

@bors bors commented on 6840076 Sep 10, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from brson
at anasazi@6840076

@bors
Copy link
Contributor

@bors bors commented on 6840076 Sep 10, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging anasazi/rust/multi-threaded-io-tests = 6840076 into auto

@bors
Copy link
Contributor

@bors bors commented on 6840076 Sep 10, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anasazi/rust/multi-threaded-io-tests = 6840076 merged ok, testing candidate = 2b2427c1

@bors
Copy link
Contributor

@bors bors commented on 6840076 Sep 11, 2013

@anasazi
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors retry

@bors
Copy link
Contributor

@bors bors commented on 6840076 Sep 11, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from brson
at anasazi@6840076

@bors
Copy link
Contributor

@bors bors commented on 6840076 Sep 11, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging anasazi/rust/multi-threaded-io-tests = 6840076 into auto

@bors
Copy link
Contributor

@bors bors commented on 6840076 Sep 11, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anasazi/rust/multi-threaded-io-tests = 6840076 merged ok, testing candidate = f711650

@bors
Copy link
Contributor

@bors bors commented on 6840076 Sep 11, 2013

@bors
Copy link
Contributor

@bors bors commented on 6840076 Sep 11, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = f711650

Please sign in to comment.