Skip to content

Commit 83bed09

Browse files
committed
fix libc join tests
1 parent 34e9346 commit 83bed09

7 files changed

+14
-14
lines changed

tests/fail/concurrency/libc_pthread_join_detached.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: trying to join a detached or already joined thread
1+
error: Undefined Behavior: trying to join a detached thread
22
--> $DIR/libc_pthread_join_detached.rs:LL:CC
33
|
4-
LL | ... assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0);
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join a detached thread
4+
LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0);
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join a detached thread
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/concurrency/libc_pthread_join_joined.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ fn main() {
1717
// assert_eq!(libc::pthread_attr_init(&mut attr), 0); FIXME: this function is not yet implemented.
1818
assert_eq!(libc::pthread_create(&mut native, &attr, thread_start, ptr::null_mut()), 0);
1919
assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0);
20-
assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); //~ ERROR: Undefined Behavior: trying to join a detached or already joined thread
20+
assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); //~ ERROR: Undefined Behavior: trying to join an already joined thread
2121
}
2222
}

tests/fail/concurrency/libc_pthread_join_joined.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: trying to join a detached or already joined thread
1+
error: Undefined Behavior: trying to join an already joined thread
22
--> $DIR/libc_pthread_join_joined.rs:LL:CC
33
|
4-
LL | ... assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0);
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join a detached or already joined thread
4+
LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0);
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join an already joined thread
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/concurrency/libc_pthread_join_main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fn main() {
1010
let thread_id: libc::pthread_t = unsafe { libc::pthread_self() };
1111
let handle = thread::spawn(move || {
1212
unsafe {
13-
assert_eq!(libc::pthread_join(thread_id, ptr::null_mut()), 0); //~ ERROR: Undefined Behavior: trying to join a detached or already joined thread
13+
assert_eq!(libc::pthread_join(thread_id, ptr::null_mut()), 0); //~ ERROR: Undefined Behavior: trying to join a detached thread
1414
}
1515
});
1616
thread::yield_now();

tests/fail/concurrency/libc_pthread_join_main.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: trying to join a detached or already joined thread
1+
error: Undefined Behavior: trying to join a detached thread
22
--> $DIR/libc_pthread_join_main.rs:LL:CC
33
|
4-
LL | ... assert_eq!(libc::pthread_join(thread_id, ptr::null_mut()), 0);
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join a detached or already joined thread
4+
LL | assert_eq!(libc::pthread_join(thread_id, ptr::null_mut()), 0);
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join a detached thread
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

tests/fail/concurrency/libc_pthread_join_multiple.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn main() {
2323
let mut native_copy: libc::pthread_t = mem::zeroed();
2424
ptr::copy_nonoverlapping(&native, &mut native_copy, 1);
2525
let handle = thread::spawn(move || {
26-
assert_eq!(libc::pthread_join(native_copy, ptr::null_mut()), 0); //~ ERROR: Undefined Behavior: trying to join a detached or already joined thread
26+
assert_eq!(libc::pthread_join(native_copy, ptr::null_mut()), 0); //~ ERROR: Undefined Behavior: trying to join an already joined thread
2727
});
2828
assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0);
2929
handle.join().unwrap();

tests/fail/concurrency/libc_pthread_join_multiple.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: Undefined Behavior: trying to join a detached or already joined thread
1+
error: Undefined Behavior: trying to join an already joined thread
22
--> $DIR/libc_pthread_join_multiple.rs:LL:CC
33
|
44
LL | ... assert_eq!(libc::pthread_join(native_copy, ptr::null_mut()), 0);
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join a detached or already joined thread
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join an already joined thread
66
|
77
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
88
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information

0 commit comments

Comments
 (0)